FadoDB / Use cases / Agent governance

Authority to act,
with the evidence built in.

AI agents are reaching decisions faster than companies can say what those agents may decide. In the TCS Enterprise AI Study of November 2026, a survey of 1,333 senior leaders in 25 countries and 12 industries, only 10% of enterprises let AI agents execute decisions without human approval across multiple functions, and just 9% of executives report agents capable of securely orchestrating workflows across enterprise applications.

FadoDB puts the authority in the record itself. A process is one document class: what an agent may do alone is a formula on the transition, its limits come from a table, what it may change is a right per field and state, and every change is an event with the principal who made it. The controls are the class. The evidence is the log.

Where it stands today: the controls and the log below shipped · v0.5.0 actions on other systems shipped · v0.4.0 row-level access shipped · v0.5.0
Authority, written down

The controls a board asks about. Each is a line of the class.

A policy in a document and an instruction in a prompt are intentions. In FadoDB the same controls are formulas the engine evaluates on every command, for every principal, agent or person, and a refusal names the formula that refused.

Who may take a step shipped

An access formula on each transition. Agents may approve a payment within their limit, finance at any amount, and nobody outside those groups at all.

"approve": "INGROUP(\"finance\") OR (INGROUP(\"agents\") AND …)"

Delegated limits shipped

How far an agent may go comes from a delegation-of-authority table, read when the step is taken, not from its prompt. Raise a limit and the very next approval follows it.

amount <= LOOKUP(Limits, agents, category = THIS.category)

Segregation of duties shipped

The engine stamps the requester from the principal, and nobody may set it by hand. A guard keeps whoever asked from approving, agent or person, and a guard holds for administrators too.

"guard": "requester <> USER()"

Frozen once decided shipped

Rights per field and per state. After submission nothing changes, so what was approved is what gets paid, whoever asks to change it.

"approved": {"*": {"write": "FALSE"}}

Conditions on the record shipped

A guard allows a step only when the document says so: an amount above zero, the evidence attached, the check passed.

"guard": "amount > 0"

Seen only by whom it should be shipped

The read rule of the class, compiled into every query as a SQL predicate: a payment a caller may not see does not exist for them. Read rights per field and state hide what an agent need not see.

"read": "INGROUP(\"agents\") OR INGROUP(\"finance\") OR …"
Runs today on v0.6.0

One payment class, three principals. The engine decides.

This is the class, and the Go code that ran it on the released v0.6.0 with the output shown. The drafting agent cannot approve its own payment. The approval agent approves 4,800.00 within its limit of 5,000.00 from the table and is refused at 48,000.00, which the finance controller then approves. Changing the amount after approval is refused, whoever asks.

payment.json · the classshipped · v0.6.0
{
  "name": "SupplierPayment",
  "title": "supplier & \" · \" & category",
  "variables": {
    "supplier":  {"type": "text", "required": true},
    "category":  {"type": "text", "required": true},
    "amount":    {"type": "decimal", "scale": 2, "min": 0, "required": true},
    "requester": {"type": "text", "default": "USER()"}
  },
  "states": {"initial": "draft", "list": ["draft", "submitted", "approved", "rejected", "paid"], "final": ["rejected", "paid"]},
  "transitions": [
    {"name": "submit",  "from": "draft",     "to": "submitted", "guard": "amount > 0"},
    {"name": "approve", "from": "submitted", "to": "approved",  "guard": "requester <> USER()"},
    {"name": "reject",  "from": "submitted", "to": "rejected"},
    {"name": "pay",     "from": "approved",  "to": "paid"}
  ],
  "access": {
    "read":   "INGROUP(\"agents\") OR INGROUP(\"finance\") OR INGROUP(\"treasury\")",
    "create": "INGROUP(\"agents\") OR INGROUP(\"finance\")",
    "update": "INGROUP(\"agents\") OR INGROUP(\"finance\")",
    "delete": "FALSE",
    "transition": {
      "approve": "INGROUP(\"finance\") OR (INGROUP(\"agents\") AND amount <= LOOKUP(Limits, agents, category = THIS.category))",
      "reject":  "INGROUP(\"finance\") OR INGROUP(\"agents\")",
      "pay":     "INGROUP(\"treasury\")"
    }
  },
  "rights": {
    "*":         {"requester": {"write": "FALSE"}},
    "submitted": {"*": {"write": "FALSE"}},
    "approved":  {"*": {"write": "FALSE"}}
  }
}
main.go · two agents and a controllershipped · v0.6.0
setup := fado.As(fado.Principal{ID: "governance-setup", Kind: fado.ActorService,
	System: []string{fado.GroupDesigners, fado.GroupAnalysts}})
db.DefineTable(ctx, []byte(`{"name": "Limits", "columns": {"category": "text", "agents": "decimal(2)"}, "key": ["category"],
	"access": {"read": "TRUE", "write": "INGROUP(\"designers\")"}}`), setup)
db.ImportRows(ctx, "Limits", []fado.Values{{"category": "software", "agents": "5000.00"}}, setup)
db.DefineClass(ctx, paymentJSON, setup)

drafter := fado.Principal{ID: "ap-agent", Kind: fado.ActorAgent, Groups: []string{"agents"}}
approver := fado.Principal{ID: "approval-agent", Kind: fado.ActorAgent, Groups: []string{"agents"}}
controller := fado.Principal{ID: "a.wisniewska", Kind: fado.ActorPerson, Groups: []string{"finance"}}

small, _ := db.Create(ctx, "SupplierPayment", fado.Values{"supplier": "Atlassian", "category": "software",
	"amount": "4800.00"}, fado.As(drafter), fado.Key("inv-2026-1187"))
db.Transition(ctx, "SupplierPayment", small.ID, "submit", nil, fado.As(drafter))
_, err := db.Transition(ctx, "SupplierPayment", small.ID, "approve", nil, fado.As(drafter))
fmt.Println(err)
// the guard of approve is not TRUE for the document in submitted [guard_false];
// the guard: requester <> USER()
small, _ = db.Transition(ctx, "SupplierPayment", small.ID, "approve", nil, fado.As(approver))
fmt.Println(small.State)
// approved

big, _ := db.Create(ctx, "SupplierPayment", fado.Values{"supplier": "Snowflake", "category": "software",
	"amount": "48000.00"}, fado.As(drafter), fado.Key("inv-2026-1188"))
db.Transition(ctx, "SupplierPayment", big.ID, "submit", nil, fado.As(drafter))
_, err = db.Transition(ctx, "SupplierPayment", big.ID, "approve", nil, fado.As(approver))
fmt.Println(err)
// approval-agent may not take approve from submitted [forbidden]
// in /access/transition/approve; the rule of approve: ...
big, _ = db.Transition(ctx, "SupplierPayment", big.ID, "approve", nil, fado.As(controller))
fmt.Println(big.State)
// approved

_, err = db.Set(ctx, "SupplierPayment", big.ID, fado.Values{"amount": "4800.00"}, fado.As(drafter))
fmt.Println(err)
// amount: ap-agent may not set amount while the document is in approved [forbidden];
// the write right of amount: FALSE

rows, _ := db.SQL(ctx, `SELECT actor_id, actor_kind, count(*) FROM SupplierPayment_events
	WHERE name = 'approve' GROUP BY actor_id, actor_kind`, nil, setup)
fmt.Println(rows.Rows)
// [[a.wisniewska person 1] [approval-agent agent 1]]
Refusals are answers. Each refusal carries a stable code, forbidden or guard_false, and the formula that refused, so an agent can tell the person it serves exactly why and who may take the step instead. Before trying, it can ask: db.Transitions lists every step with whether this principal may take it, and db.Preview shows what a change would do without writing it.
Value and control, from one log

The controls are the class. The evidence is the log.

Every create, change and transition is an event with its principal, its business date and its idempotency key, in the same file as the documents. The questions a board or an auditor asks become queries, and so do the questions about value.

Who approved this, and when? shipped

The history of the document gives every version with the principal who committed it and the time, and the events say which transition each one was. Nothing is overwritten: every earlier version stays in the history.

What did agents decide alone? shipped

Count the transitions by principal over the class's events view, where every event says whether an agent or a person acted, and for whom. The query in the example above is the whole report: who approved, how many times, agent or person.

How long does a case wait for a person? shipped

The states view has one row per visit to a state with its duration. Time spent in submitted, split by who moved it on, is the value of letting agents approve within their limit.

Model independence

Change the model. Keep the process.

When the controls live in prompts and in a platform's agent configuration, switching models means writing them again. In FadoDB they live in your file, and the model is just another caller.

The process is not in the prompt shipped

States, limits, rights and history live in the class and its documents. Any model and any agent framework call the same commands and meet the same formulas.

The arithmetic is not in tokens shipped

Limits, totals and deadlines are computed by the engine with exact decimals. The agent reads the result instead of working it out again on every turn, and never gets it slightly wrong.

A rehearsal is a file copy shipped

Copy the file, let the new model work on the copy, and compare the two event logs before you switch. A preview shows what any step would do without writing it.

How to read this page. The class and the Go code above ran on the released v0.6.0, with the output shown. Actions that reach other systems run today through the outbox. An agent outside Go reaches the same class over HTTP, or as MCP tools through fadodb mcp, with a key of its own, and the log records it the same way. The use cases are samples an agent could draft, not systems someone has run. The survey figures are from the TCS Enterprise AI Study, released on 4 November 2026. If this page claims more than the roadmap does, that is a bug: open an issue.

Governing agents in your company?

Tell us which decisions your agents may take alone, which they never will, and what your auditors ask for. It shapes what we build next.