v0.1.0, the formula engine, shipped on 6 November 2026. Phase 2, the document store, is in progress. Read the changelog

The process database
for AI agents.

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·MIT·SQLite inside·v0.1.0 pre-release

fadodb formula evalshipped · v0.1.0
$ fadodb formula eval \
    -var qty:int=3 -var price:money='9.99 PLN' \
    'ROUND(qty * price * (1 - 10%), 2)'
26.97 PLN

$ fadodb formula eval -var a:decimal=0.10 -var b:decimal=0.20 \
    'a + b = 0.30'
TRUE

$ fadodb formula eval -sql duckdb -var due:date \
    'DAYS(due, TODAY())'
value  (CAST("due" AS DOUBLE) - floor(CAST($now AS DOUBLE) / CAST(86400 AS DOUBLE)))
error  NULL
params now
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 designed

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 table with its full history, and process mining is a query over the log.

ADR-0006, the event log

Embeddable in progress

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

ADR-0002, the dependency budget

Open shipped

MIT 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 formulas run today on v0.1.0. The store, the statechart, the rules and the access rules are Phases 2 to 5. in progress

{
  "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"},
    "lines": {
      "type": "rows",
      "schema": {"sku": "text", "qty": "int", "price": "money"}
    },
    "subtotal": {"formula": "SUM(lines.qty * lines.price)"},
    "total": {"formula": "ROUND(subtotal * (1 - discount), 2)"}
  },
  "states": {"initial": "draft",
             "list": ["draft", "submitted", "approved", "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 customer = USER()"}
}
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
  • WebSocket
  • C ABI
  • MCP

Called from

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

Get the formula engine today.

v0.1.0 is a pre-release: the command-line tool evaluates formulas on the Go VM and shows the SQL it generates. Nothing stores a document yet.

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 formula eval -var name:text=invoice 'UPPER(LEFT(name, 3)) & "-" & TEXT(42)'
"INV-42"
$ fadodb formula eval -var a:decimal=0.10 -var b:decimal=0.20 'a + b = 0.30'
TRUE
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.1.0: the formula engine

Lexer, parser, binder, bytecode, the Go VM and the SQL generator for SQLite and DuckDB, with the conformance suite as the specification and benchmark gates in CI.

Release notes

Phase 2 opens with measurements

The primary-store and point-lookup benchmarks that choose the store, proposed as ADR-0035, SQLite as the transactional store, and ADR-0036, an in-memory index for lookups inside commits.

Decision records

Exact numbers, calendar days, IFERROR

decimal, int and money; a date that is a calendar day beside datetime; division by zero as an error, and IFERROR to catch one.

Changelog
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. 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 and groups. The log records what it did, and a rule can keep "pay" for a human.
  • 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, MIT. 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, WebSocket, 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.
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 start with the formula engine today.