Skip to content

Orchestration and multi-agent

Building agents · topic building-agents/orchestration

When one agent is not enough, something has to coordinate several. This topic contrasts orchestration written as code with orchestration decided by a model, surveys sequential, hierarchical and collaborative arrangements, and names the coordination cost that every extra agent adds.

Concepts

Code- vs model-driven orchestration
Two ways to coordinate agents. In code-driven orchestration a program decides which agent runs when, passing outputs along fixed paths; it is predictable, testable and cheap. In model-driven orchestration a model decides, delegating to other agents as tools; it adapts to unforeseen cases and is harder to bound. Use code for known workflows and a model for the genuinely open parts. glossary
Sequential / hierarchical / collaborative
Three arrangements. Sequential: agents form a pipeline, each transforming the previous output. Hierarchical: a manager agent delegates subtasks to workers and integrates their results. Collaborative: peer agents share a workspace or conversation and negotiate. Complexity and unpredictability rise in that order; sequential is enough far more often than it seems. glossary
Orchestration tax
The cost every additional agent adds: more tokens for handoffs and repeated context, latency from extra calls, information lost at each boundary, new failure modes when agents disagree or wait on each other, and harder debugging. A multi-agent design has to beat a single well-equipped agent by more than this tax, and often it does not. glossary

Lessons

Your reference

Each lesson above adds its takeaways and its example here once you finish it. Your reference lists every lesson you have finished.

Orchestration in code or by a model

Unlocks when you finish Orchestration in code or by a model.

What every extra agent costs

Unlocks when you finish What every extra agent costs.

Sources