multi-agent architecture
A system design involving multiple agents with distinct roles, such as planning, generating, and evaluating, to enhance task performance and output quality.
Learn
When to use it
Use multi-agent architecture when a single agent handling all tasks is insufficient. Multi-agent systems coordinate specialized agents for roles like planning, generating, and evaluating to improve task performance and output quality, such as in complex coding or simulation environments.
Quick example
In a complex coding environment like Claude Code, tasks such as planning, coding, and testing can be distributed among different agents. You configure a multi-agent architecture within Claude Code, where one agent plans the code structure, another writes the code, and a third tests it. Claude Code includes this architecture, allowing each agent to focus on its specific role, enhancing overall efficiency.
┌─ planner ─┐
input →│ multi-agent architecture │→ output
└─ tester ───┘
Ecosystem
Multi-agent architectures integrate with other components like agent harnesses and tool interfaces, enabling complex workflows.
┌─ agent harness ─┐
input →│ multi-agent architecture │→ output
└─ tools ─────────┘
Misconceptions
| Misconception | Rebuttal |
|---|---|
| All agents must be AI-based | Agents can be rule-based or AI-based, depending on the task |
| More agents always mean better performance | Coordination overhead can reduce efficiency |
Trade-offs
- Specialization — requires precise role definitions
- Scalability — increased complexity in coordination
- Performance — potential bottlenecks in agent communication