v0.6.0, the server, shipped on 17 November 2026. Phase 6 is done. Phase 7, the browser VM and the reference frontend, is next. Read the changelog

The process database
for AI agents.

Authority to act, with the evidence built in.

FadoDB is an embeddable active document database. An enterprise process is one document: typed fields, Excel-style formulas, a statechart, rules and access. Agents design it and run it. FadoDB computes it deterministically, records every change and answers in SQL.

pure Go·Apache 2.0·SQLite inside·v0.6.0 pre-release

main.go · the Go APIshipped · v0.6.0
db, err := fado.Open("app.fado", fado.Options{})
setup := fado.As(fado.Principal{ID: "setup",
    System: []string{fado.GroupDesigners, fado.GroupAnalysts}})
_, err = db.DefineClass(ctx, invoiceJSON, setup)

me := fado.Principal{ID: "alice", Groups: []string{"sales"}}
doc, err := db.Create(ctx, "Invoice",
    fado.Values{"customer": "ACME", "net": "100.00 PLN"},
    fado.As(me), fado.Key("order-42"))  // idempotent
doc, err = db.Set(ctx, "Invoice", doc.ID,
    fado.Values{"discount": "0.10"}, fado.As(me))
fmt.Println(doc.Values["total"])  // 90.00 PLN, version 2
doc, err = db.Transition(ctx, "Invoice", doc.ID,
    "submit", nil, fado.As(me))
fmt.Println(doc.State)  // submitted, version 3

open, err := db.Query(ctx, fado.Filter{Class: "Invoice",
    Where: "state = \"draft\" AND total > 50.00"}, fado.As(me))
rows, err := db.SQL(ctx,  // every row: for analysts
    `SELECT count(*), sum(total) FROM Invoice`, nil, setup)
try, err := db.Preview(ctx, "Invoice", doc.ID,  // dry run
    fado.Values{"discount": "0.50"}, "", fado.As(me))
Why FadoDB

Logic lives in the document. Not in code around it.

Most systems split a business process three ways: a schema in the database, logic in application code, approvals in a workflow tool. An agent asked to build that must get all three right, and nobody can read what it built. In FadoDB the whole process is one document, and the engine refuses anything that does not hold together before a row is written.

Declarative in progress

A process is one JSON document: fields, formulas, states, guards, rules and access. A person reads it in two minutes. An agent writes it in one call. The engine validates it and names the exact place of every problem.

See the document

Deterministic shipped

One compiled bytecode runs on the Go VM and as generated SQL on SQLite and DuckDB, with the same result. The conformance suite is the specification, and property tests check that the runtimes agree. The browser VM on the same bytecode is designed.

The conformance suite

Exact shipped

decimal, int and money are an int64 mantissa at a declared scale. Rounding is written in the formula. Overflow is an error, not a surprise. 0.10 + 0.20 = 0.30, and currencies must agree.

ADR-0022, exact numbers

Auditable shipped

An append-only event log with who, when and the business date a change belongs to. Nothing is ever rewritten. Every class is a SQL view with its full history and its events, and process mining is a query over the log.

ADR-0006, the event log

Embeddable shipped

Pure Go on the standard library plus SQLite. No cgo in the core. One file on disk, opened from your program. DuckDB analytics is a separate module, and Postgres will be, so the core stays small.

ADR-0002, the dependency budget

Open shipped

Apache 2.0 licensed and built in the open. Every decision is a public architecture record. Benchmarks are CI gates and their numbers are published with each release. The README says what works today, and nothing more.

The decision records
The document

One class. Four layers. Nothing hidden in code.

An Invoice, as a document class. Pick a layer to see where it lives. The variables, the formulas, the statechart, the rules and the access rules are stored, computed, run and enforced today on v0.6.0: paying this invoice creates its receipt through the outbox, finance, sales and the customer see it, and nobody deletes it.

{
  "name": "Invoice",
  "title": "\"Invoice for \" & customer",
  "variables": {
    "customer": {"type": "text", "required": true},
    "due": {"type": "date", "default": "ADDDAYS(TODAY(), 30)"},
    "discount": {"type": "decimal", "scale": 2, "default": "0", "min": 0, "max": "0.50"},
    "net": {"type": "money", "scale": 2},
    "lines": {
      "type": "rows",
      "schema": {"sku": "text", "qty": "int", "price": "money"}
    },
    "total": {"formula": "ROUND(net * (1 - discount), 2)"}
  },
  "states": {"initial": "draft",
             "list": ["draft", "submitted", "approved", "paid"],
             "final": ["paid"]},
  "transitions": [
    {"name": "submit", "from": "draft", "to": "submitted",
     "guard": "total > 0"},
    {"name": "approve", "from": "submitted", "to": "approved",
     "guard": "INGROUP(\"finance\")"},
    {"name": "pay", "from": "approved", "to": "paid"}
  ],
  "rules": [
    {"on": "enter", "state": "paid",
     "do": [{"action": "create", "class": "Receipt",
             "values": {"invoice": "ID()", "amount": "total"}}]}
  ],
  "access": {
    "read":
    "INGROUP(\"finance\") OR INGROUP(\"sales\") OR customer = USER()",
    "create": "INGROUP(\"sales\")",
    "update": "INGROUP(\"sales\") AND STATE() = \"draft\"",
    "delete": "FALSE",
    "transition": {"approve": "INGROUP(\"finance\")",
                   "pay": "INGROUP(\"finance\")"}
  },
  "rights": {"*": {"discount": {"write": ["sales"]}},
             "approved": {"discount": {"read": ["finance"]}}}
}
Sample use cases for your agents

Anything with a state is a document.

Not only forms that wait for a signature. An invoice has a state, and so do a purchase order, a supplier, a leave balance, a permit, a loan, a batch, a field in a farm and a period in the general ledger. Each is one class: fields, formulas, a statechart, rules and access, written so an agent can draft it and run it without a screen. Here are six of the 186 samples.

Company Office Simulation

agentperson

Illustration · the documents, people and agents are invented

Financial journal and period close

Rows of account, debit and credit; a guard refuses an unbalanced entry. A closed period is a terminal state, so nothing posted in it can change. A reversal is a new entry, never an edit.

enteredpostedperiod locked
Finance use cases

Order management

Lines, discounts, taxes and shipping as formulas with exact money. Confirmation checks credit through a lookup, picking and shipping are states with timestamps, and a rule creates the invoice.

placedconfirmedshippedclosed
Sales use cases

Expense reconciliation

Receipt rows converted at the business date's rate, policy limits as guards, card statement lines matched to receipts. What is left unmatched is a query, not a Friday afternoon.

submittedreviewedreimbursed
Reconciliation use cases

Data breach notification

The deadline is a formula: seventy-two hours from awareness. Severity decides who must be told, the hours left sit on the document, and the log proves when each step happened.

detectedassessednotifiedclosed
Legal and risk use cases

Permit to work

Valid from an hour to an hour, with isolations as rows and a gas test as a field. Issuer and acceptor must be different people, a guard. Expiry is a scheduled transition no work may outlive.

issuedactivesuspendedclosed
Operations use cases

The agent's approval inbox

An agent proposes, a person disposes. Each proposed action is a document the agent creates and may not approve. The person's decision is a transition; the agent reads it and acts.

proposedawaiting reviewapprovedexecuted
Agent patterns
Browse all 186 sample use cases Finance, procurement, sales, people, legal, IT, security, operations, facilities and fourteen industries.
Works with your stack

One engine, wherever the process runs.

The same formulas, the same answers, from a Go program, a SQL client, a browser or an agent. Each dot says how far along that piece is.

Runs on

  • Go VM
  • SQLite SQL
  • DuckDB SQL
  • Browser VM

Stores in

  • SQLite
  • DuckDB analytics
  • Postgres

Speaks

  • Go API
  • HTTP
  • MCP
  • C ABI

Called from

  • CLI
  • Your Go program
  • AI agents
  • Any frontend
  • Python
shippedin progressdesigned, with a decision record
Install FadoDB

Get the document store today.

v0.6.0 is a pre-release. The Go API opens a database file, defines classes, commits documents and moves them through their statecharts, enforcing each class's access rules and the principal's rights, and runs their rules, with actions through an outbox and timers that fire by themselves. The same binary serves a database over HTTP to callers with a key, and opens it to an agent as MCP tools.

All releases and checksums
# Go 1.26 or newer
go install github.com/MojoHand70/fadodb/cmd/fadodb@latest

Builds the fadodb binary into your Go bin directory. fadodb version prints the version, the commit and the build date.

Then try it shipped

$ fadodb init acme.fado
$ fadodb user add olga --kind person --system administrators --db acme.fado
$ fadodb key new olga --label laptop --db acme.fado > olga.key
$ fadodb serve acme.fado                # this machine only, port 8080

# in another terminal: an agent with a user and a key of its own
$ export FADODB_KEY=$(cat olga.key)
$ fadodb exec create_user '{"id": "my-agent", "kind": "agent", "system_groups": ["designers"]}'
$ fadodb exec create_key '{"user": "my-agent", "label": "claude"}'   # shown once
{"mcpServers": {"acme": {
  "command": "fadodb", "args": ["mcp"],
  "env": {"FADODB_KEY": "fado_3TKK5GZH24_…"}}}}

Put the second block in your agent's MCP settings, in Claude Desktop, Claude Code, Cursor or any agent framework, with the agent's key. It finds the commands as 62 tools, defines classes and works their documents under their rules, is refused what it was not given, and every event names my-agent, an agent. The door for agents says more. In a Go program the same calls are import "github.com/MojoHand70/fadodb/fado" and the code at the top of this page.

Project state

What works today, and nothing more.

Thirteen phases, each ending in a tagged release with its benchmarks published. A phase is never called done before its acceptance criteria pass.

0Foundations
1Formula engine
2Document store
3Statechart
4Rules
5Security
6Server
7Browser VM
8Analytics
9Embedding
10Postgres
11AI layer
121.0
donein progressnot startedThe full roadmap

v0.6.0: the server

fadodb serve answers every command of the Go API as JSON over HTTP, to callers with a key the database keeps. fadodb mcp offers the same commands to an agent as tools. A stream of changes filtered by the read rule, an image for containers, and a way in for messages from outside.

Release notes

The Phase 6 numbers

A transition through the server in 0.55 ms at p99, nothing measurable over the same call made in Go inside a request; a key checked in 0.1 µs; an event on the stream within 2.03 ms at p99 to a hundred subscribers; the door for agents started and listed its tools in 0.33 ms. Every budget met, the server's as ADR-0066 measures it.

The measurements

Phase 7: the browser VM designed

The same bytecode on a VM in one plain JavaScript file, so a form computes what the engine will. Layouts and a reference frontend, signing in with a password or a company's sign-on, and the door for agents at the server itself.

ADR-0029, the browser VM
The rule this page follows. The README describes what works today. Every claim here carries one of three marks: shipped, in progress or designed. A designed feature has a decision record you can read. If a mark on this page is wrong, that is a bug: open an issue.
Who it is for

Agents that run the process. People who answer for it.

For AI agents

  • Declare, don't code. Fields, formulas, states, guards, rules and access are data the engine validates.
  • Dry-run everything. Preview a document, a transition or a whole draft class against live data, at a moment you choose. Nothing is written until you commit.
  • Never do arithmetic. Formulas run in the engine with exact money. The model proposes, the VM computes.
  • Act as a principal. An agent has an identity, groups and the person it acts for. The log records all three, and a rule can keep "pay" for a person.
  • No screen required. Some processes will never have a human interface. Every command is complete without one.

For developers

  • One import, one file. Pure Go, Apache 2.0. No cgo in the core. SQLite inside for transactions.
  • Every class a table. Current values, full history and child rows, queried with SELECT.
  • One bytecode, three runtimes. The Go VM, generated SQL, and a browser VM in one plain JavaScript file.
  • One command set. HTTP, MCP, a C ABI and the Go API carry the same JSON messages.
  • Benchmarks are gates. CI fails on a regression. Numbers ship with every release.

For the enterprise

  • Append-only history. Every change carries who, when and the business date it belongs to.
  • Access as a formula. Compiled into every query as a SQL predicate, the same on the server, the API and the browser.
  • Process mining is a query. Cycle times, bottlenecks and rework are SQL over the event log. No export, no second system.
  • Exact money. Rounding is written in the formula. Overflow is an error.
  • Readable by an auditor. The process is one document, not generated code.
  • Controls you can evidence. What an agent may do alone is a formula the engine enforces, and the log proves it held. Agent governance
What FadoDB is not

The place where a process is defined, computed and remembered.

Whether a person ever opens a screen or not.

  • Not a workflow engine you program against. No BPMN, no SDK of handlers. The process is declared in the document the engine stores.
  • Not a low-code tool that needs a screen. Layouts are optional and versioned apart from the class. An agent with no UI is a first-class caller.
  • Not a document store with your logic somewhere else. Formulas, states, rules and access live with the data and are evaluated by the same engine everywhere.

Built in the open.

Decision records, a conformance suite, benchmark gates and a changelog that says what changed. Read along, or store your first document today.