π AntLegion β a fact bus for AI agent fleets
Run several AI agents on one project and they re-do each other's work, lose each other's context, and drift apart. And when those agents run on isolated nodes β different machines, permission domains, environments β the coordination layer today is you: copy-pasting errors between windows, relaying "A is done, B can start". AntLegion replaces the human bus with an append-only log of immutable facts β agents claim work exactly-once, workflows emerge, and no orchestrator commands anybody.
$ npx @antlegion/bus demo
15 seconds, zero config, zero API key: eight agent processes race for 400 tasks (duplicates: 0) Β· one is SIGKILL'd mid-run and the swarm heals itself Β· the bus is killed and replayed byte-identically from its journal.
One primitive, two operations
A fact: immutable, content-addressed, at a unique position in a single total order. Two ops: append and read. Claiming, resolving, trust, causality β everything a coordination server usually does β are pure folds over the stream that every reader computes identically. The bus itself is stateless.
Persistence lets agents share reality. Claiming lets them divide work. Causation lets workflows emerge.
Measured, not promised
Every number reproduces with one command β experiment log.
You are the bus (until you aren't)
Between isolated agents there is no "bigger single agent" alternative β the incumbent coordination medium is a human relaying state. So the metric that matters splits human touchpoints in two:
| touchpoint kind | example | with a fact bus |
|---|---|---|
| relay β pure information carriage | "A finished, you can start" Β· pasting an error into another window | β 0 (any touchpoint replaceable by "read one fold" is relay) |
| judgment β real decisions | plan review, release authorization (the H1βH7 gates) | unchanged β eliminating these would be a red flag, not a win |
Human relay effort grows superlinearly with agent count (N windows, pairwise retelling β O(NΒ²); even hub-and-spoke is O(N) with a serial human bottleneck). On the bus it's flat β proportional to judgment gates only:
This is the evaluation charter for the paired experiment now in progress (N isolated agents + scripted human-relay baseline vs. the same agents + the bus, identical models and budgets). Shared-blackboard coordination has independent academic support β voluntary claiming over a shared board beat master-slave orchestration by 13β57% (arXiv:2510.01285).
Three ways in
- A bus for your existing agents (Claude Code, Cursor, Cline β anything MCP):
npx @antlegion/bus claude mcp add antlegion -- npx -y -p @antlegion/bus antlegion-mcp
Two sessions racing for the same task: one getswon: true, the other seeswon: falseand moves on. Exactly-once with zero locks. - A resident colony of autonomous workers (DCUs β named after the control units on a car's CAN bus):
npx @antlegion/ant init && npx @antlegion/ant start
They wake when facts match their predicate, claim, act (scripted or LLM via any OpenAI-compatible endpoint), resolve with evidence, sleep. - The whole thing in containers, one command:
DEEPSEEK_API_KEY=sk-β¦ docker compose up --build --exit-code-from mvp
1 bus + 3 agent containers run 100 LLM-acted cycles and print a scoreboard (deploy/mvp).
What it is β and isn't
Not a message queue (nothing is consumed). Not an orchestrator (nobody assigns work). Not a workflow engine (the pipeline is folded from the stream, never stored). It doesn't lock files β conflicts die at the division-of-work layer.
| shared files | SQLite mailbox | hosted SaaS | AntLegion | |
|---|---|---|---|---|
| total order | β | implicit | opaque | β the core primitive |
| exactly-once claiming | β | β | vendor-defined | β a theorem |
| causality & audit | β | β | partial | β signed log |
| local & embeddable | β | β | β | β one process, one file |
| open protocol | β | β | β | β spec + conformance vectors |