Multi-Agent Orchestration
Build an AI Agent Team in 30 Days
You split the job across five agents. One stalls. One loops. One burns $50. In 30 days you turn a single babysat agent into a team: a lead that assigns bounded work to cheaper models, a fan-out that takes on jobs one context window cannot hold, a gate that blocks bad handoffs, and a spend cap that kills a runaway run before it costs $500.
The five patterns are teaching vocabulary, not a standard. There is no committee and no canonical list: six published taxonomies contradict each other, and one contradicts itself across two pages of the same site. What is real underneath the naming noise is a small number of distinct data-flow shapes that keep reappearing.
Every layer ships with a companion GitHub repo: the finished pipeline under the book’s own names, organized chapter by chapter, with the drills wired up.
What You'll Build
Why the model you pay most for should decide things, not type them, and what that split is worth.
Build a two-file orchestrator-and-worker pipeline you extend in every remaining chapter.
Pipeline, supervisor, fan-out, debate, and evaluator, each with a runnable skeleton and a routing test.
Run three parallel workers on the cheap tier under a lead-tier planner, with token totals reported.
Dispatch workers in parallel and watch the context budget stay flat instead of filling up.
Typed envelopes, atomic writes that survive a kill, and a claim registry that queues colliding workers.
A gate that blocks on exit 2 and deadlines that propagate so a child never outlives its parent.
NDJSON spans and a locator that names the earliest failing stage in under a minute.
A cost model that refuses placeholder rates and a hard spend cap wired into the run.
A parameterized pipeline driven by a job file, with validation, a worker ceiling, and a budget ceiling.
A runbook indexed by symptom, plus quarantine and resumable checkpoints at stage boundaries.
A dated 30-day plan on your own project and a scaffold generated for the pattern you picked.