···11# mill
2233-A runtime for executing TypeScript programs that spawn and coordinate AI agents. Write plain TS with `await` and `Promise.all` — mill handles the lifecycle, persistence, and observability.
33+A runtime for executing TypeScript programs that can spawn agents. Write plain TS with `await` and `Promise.all` — mill handles the lifecycle, persistence, and observability.
4455## What you can do
66···10101111**Swap agent backends** — drivers are generic adapters. Ship with pi, Claude, and Codex drivers. Write your own by implementing a codec that parses process output into structured events.
12121313-**Observe everything** — structured NDJSON event log per run, real-time streaming via `mill watch`, and full session replay via `mill inspect --session`.
1313+**Observe everything** — structured NDJSON event log per run, real-time streaming via `mill watch`, and full session replay via `mill inspect --session`. Use the built-in `mill watch` or build a TUI around it.
14141515## Quick example
1616···2727 agent: "planner",
2828 systemPrompt: "You turn findings into an execution-ready plan.",
2929 prompt: `Create remediation steps from:\n\n${scan.text}`,
3030+ model: "anthropic/claude-opus-4.6",
3031});
31323233console.log(plan.text);