06. Multi-agent systems
What is a multi-agent system?
A multi-agent system uses more than one agent, where each agent has a distinct role.
Example roles:
- planner
- researcher
- coder
- reviewer
- critic
- executor
Instead of one big general-purpose agent doing everything, the work is split across specialists.
Why use multiple agents?
Sometimes specialization helps.
A planner may be good at decomposition. A researcher may be good at collecting evidence. A critic may be good at checking mistakes.
This can improve modularity and make some workflows easier to reason about.
Typical pattern
User goal
↓
Coordinator agent
↓
Delegates to specialists
↓
Specialists return outputs
↓
Coordinator merges results
↓
Final answer
Common designs
1. Coordinator + workers
One main agent delegates to helper agents.
2. Debate / critique
One agent proposes, another challenges, another refines.
3. Pipeline
Each agent handles one stage in sequence.
4. Swarm / distributed
Many agents act semi-independently toward a shared objective.
Benefits
- specialization
- modularity
- cleaner task separation
- easier replacement of components
- better support for parallel workflows
Costs
Multi-agent systems are often overused.
Problems include:
- more latency
- higher cost
- coordination failures
- duplicated work
- harder debugging
- inconsistent outputs between agents
Good rule
Do not use multiple agents unless one of these is true:
- tasks are clearly separable
- specialization gives measurable gains
- parallelism matters
- one-agent design is becoming too brittle
Next
Continue to 12-Factor Agents.
