Architecture
Decision records
On this page
An architecture decision record, or ADR, captures one decision: the context that forced it, what was decided, and what it costs. Delegate has one for every architectural choice, and they are the best place to learn why the code is shaped the way it is.
Each record is a Markdown file in docs/. When a decision changes, a later record amends or supersedes the earlier one and says so, or a dated amendment is added at the end of the original.
All records#
- 0001Hand-written agent runtime on the Messages APIAccepted · 2026-11-24
- 0002Quarantined reader (dual-LLM pattern) for untrusted contentAccepted · 2026-11-24
- 0003Zero-cost, keyless-first model routingAccepted · 2026-11-24
- 0004Keyless research sources and a hardened fetch toolAccepted (crawl limits amended by ADR 0012) · 2026-11-24
- 0005Run execution, event storage and streaming before durable jobsAccepted · 2026-11-24
- 0006Planner, orchestrator and critic as the multi-agent coreAccepted · 2026-11-25
- 0007Durable runs from the event log, without a job serviceAccepted · 2026-11-24
- 0008Retrieval without paid embeddingsAccepted · 2026-11-24
- 0009Fork from step, replay and run compare, all from the event logAccepted · 2026-11-25
- 0010Repo X-ray: tarball ingestion, untrusted repository content, citations to linesAccepted · 2026-11-25
- 0011Ship-a-PR with a hand-written Engineer loop, Vercel Sandbox and a GitHub AppAccepted · 2026-11-25
- 0012One crawl engine, parallel across hosts and polite per hostAccepted · 2026-11-25
- 0013Evolving playbooks — agents that learn from their own runsAccepted · 2026-11-25
- 0014Platform connections (MCP server, MCP client connectors, GitHub)Accepted · 2026-11-25
- 0015Deep research, specificity and long-horizon plansAccepted · 2026-11-25
- 0016Autopilot, a parent run that carries a goal through child missionsAccepted · 2026-11-25
- 0018Platform interfaces (REST v1, OpenAPI, SDK, CLI, signed webhooks)Accepted · 2026-11-25
- 0019Mission Control and SettingsAccepted · 2026-11-25
- 0020Agent teams, a run blackboard, one typed-output path and learned routingAccepted
- 0021The training loop — measured prompt, playbook and routing improvements for every missionAccepted · 2026-11-25
How to read one#
- Status and date are at the top, with the records it builds on or amends.
- Context states the constraints. Three recur in almost every record: the default path must cost $0 and need no account, production is serverless with a 300-second limit per invocation, and the event log is the only source of truth.
- Decision is what the code does. It names files, limits and schemas, so it can be checked against the repository.
- Consequences lists what the decision costs and the known gaps. Records here state their weaknesses plainly, and the security model tracks the risks that remain.
Where to start#
- ADR 0001 explains why the agent loop is written by hand.
- ADR 0002 explains the quarantined reader, the control everything else leans on.
- ADR 0003 explains how the platform runs on free models.
- ADR 0007 explains how a run survives a restart without a job service.
The architecture overview shows how the pieces fit together.