Technology · Discipline

State-machine design for multi-agent workflows

Work-order lifecycles, stand-down and resume, and transition compilation: the governance platform is state machines all the way down.

AgentOSPostgreSQL registryCompiled workflow law
Transitions and receipts
Transitions
Receipts
Pending step
stored in the registry, replayed on recoveryone next step

The state machine lives in data

AgentOS is a state machine for multi-agent work, and I decided the state machine would live in data where agents cannot rewrite it. A PostgreSQL registry holds objects with kinds, typed edges between them, and a stored transition for every change of state. Work orders, tasks, evidence and verdicts are all instances of that model.

Where a piece of work stands is in the graph, and the documents agents read are generated from it. Because the machine is data, it can be queried, audited and changed under migration discipline.

The registry
Generated for agents to read
an agent writing to the graph: no path

Every move leaves a receipt

Movement is deterministic. A pending step is stored durably and maps to exactly one next step. When it runs, it leaves a receipt, and only that receipt can consume it, so resume is a replay and no agent has to reconstruct what happened from prose or files. Faults are typed and route to defined handling, which ends improvised recoveries.

Pausing is its own state, separate from closing, so stood-down work resumes and is never taken for finished.

Paused is not closed
Paused work
Closed work
stood down, then resumed where it stoodclosed only by its own transition

A system that cannot tell stopped from done eventually closes unfinished work.

Workflow law is compiled

New workflow law enters only through a compiler. To test the machine itself I had a pure, I/O-free walker built that traverses states and transitions looking for places where work can get stuck or never reach an end, before an agent finds them. Its first runs found real gaps in the platform's own design, and they were fixed as governed work.

Specification
Compiled bundle
Isolated database
Work graph
applied only after qualification
The walker over the state graph
every state and transition visited; the lit ones are places work could stick or never end (illustrative)

Why long agent runs fail and Separation of duties for AI work tell where this design came from.