Krepis
Back-Office Software Designed for AI Agents. Business software is built for people who navigate screens: menus, forms and formatted tables. Agents work through APIs and logs, and before anyone trusts them with money or payroll they need guarantees that today's suites don't give. Krepis starts from one question: what would an accounting system look like if it were designed for agents? The answer is a family of kernels, each limited to the critical core of its domain, in which every action can be previewed, retried and traced. Customer-specific policy lives above the kernels as logic, so the guarantees extend to the parts of each domain the kernels don't cover.
General notes
- Operated by agents, unsupervised: AI agents ran a fictional 12-employee company’s September (180 shifts, payroll, two supplier deliveries, inventory close, 14 payments and the books) through six kernels in one process on PostgreSQL, with no human supervising at any point. An independent checker that computed every expected figure from the source facts found zero differences across 4,913 comparisons (3 October 2026).
- Seven kernels: double-entry accounting, payroll, workforce management, money movement, inventory, commitments and a work ledger.
- Event-sourced and append-only: balances are computed from the log rather than stored, so every number traces back to the events behind it.
- Safe for agents by construction: every action is idempotent and has a dry run, so an agent can preview any effect and retry without doubling it.
- Rules as logic: business policy is expressed as Logica predicates above the kernels, so it can change without touching kernel code.
Construction notes
- One family: kernels couple through a shared core, never by importing each other, and every kernel must pass the same conformance suite.
- Safe to hand to an agent: of the 330 calls the operating agent made, the kernels rejected 11 invalid ones (2 deliberate probes, such as an overlapping shift and a journal off by 1 ISK, and 9 ordinary agent slips) and wrote nothing for any of them.
- One Postgres: a schema per kernel, mirrored into a lakehouse for analytics.
- Contracts for agents: each kernel publishes its OpenAPI contract, which Sókrates compiles into the agents' tools.
4,913 independent checks against the source facts, zero differences, in a business month run entirely by AI agents with no human supervisor
4,125,040 ISK gross payroll for 12 employees, exact to the króna
14 payments settled (4,835,120 ISK), each matching its source amount, into a 27-transaction ledger with zero unbalanced entries
30/30 stored records identical after a restart; replayed handoffs and duplicate submissions created no new effects
Materials
- Python
- Pydantic
- Postgres
- Event sourcing
- Logica
- FastAPI
- OpenAPI
- Project
- Hákon Freyr Gunnarsson
- Sheet
- Detail B
- Title
- Krepis
- Scale
- N.T.S.
- Rev
- 2026-10