## Definition
A **multi-agent system** decomposes a task across multiple specialised agents that coordinate via structured handoffs. Each agent has its own role, prompt, tool surface, and often its own model — see [[Specialized Agent]].
## Why More Than One Agent
- **Specialisation.** Different roles tune differently for cost and quality — see [[Model Selection Strategy]].
- **Independence.** A verifier reading the artifact cold catches issues the builder won't see — see [[Verifier Independence]].
- **Parallelism.** Independent subtasks can run in parallel — see [[Parallel Agents via Worktrees]].
- **Context isolation.** Each agent has its own context window; noisy intermediate work doesn't pollute the main thread.
## Coordination Patterns
Anthropic's *Building Effective AI Agents* names the canonical shapes — see [[Building Effective AI Agents]]:
| Pattern | Shape | When to use |
| -------------------- | ----------------------------------------------- | ------------------------------------ |
| Prompt chaining | A → B → C, fixed pipeline | Tasks with stable phases |
| Routing | Router → one of N specialists | Heterogeneous inputs |
| Parallelisation | N agents on independent subtasks, then aggregate | Embarrassingly parallel work |
| Orchestrator-workers | Orchestrator dynamically spawns workers | Unpredictable complexity |
| Evaluator-optimizer | Generator + critic loop | Quality-sensitive output |
## Failure Modes
- **Telephone game.** Each agent paraphrases the previous one's output; intent drifts.
- **Conflicting personalities.** Two agents argue indefinitely. Need a tie-breaker or a budget.
- **Hidden coupling.** Two agents "agree" because they share the same base model's bias.
- **Coordination overhead exceeding the work.** Three agents for a one-file change. The trifecta runs but no benefit accrues.
## When NOT to Reach For Multi-Agent
- Single-file changes.
- Tasks small enough to fit in one focused prompt.
- Cases where you can't articulate what each agent *uniquely* adds. If you can't, you don't need it.
## In Practice
Most production multi-agent systems are **shallow** — 2–4 roles, fixed pipeline. Deep orchestrator-worker hierarchies sound impressive in papers and are brittle in deployment. Start shallow; add depth only when the data demands it.
## Related
- [[AI Agent]]
- [[Specialized Agent]]
- [[Sequential Pipeline]]
- [[Builder-Critic Pattern]]
- [[Building Effective AI Agents]]