Multi-Agent Systems
From One Agent to Many
You know the ReAct pattern, Plan-and-Execute, and Tool Use. You can build a single agent that solves tasks autonomously. But what happens when the task becomes too large, too complex, or too diverse for a single agent to handle?
Imagine building a system that needs to simultaneously write code, review code, run tests, and generate documentation. A single agent would need to fit all these capabilities into one context window -- and would quickly hit its limits.
The solution: Multiple specialized agents working together. Just like a team where everyone brings their strengths to the table.
iThe Paradigm Shift
With a single agent, you optimize the prompt and the tools. With multi-agent systems, you optimize the architecture: Who communicates with whom? Who decides what? How are conflicts resolved?
When Do You Need Multiple Agents?
Not every problem requires a multi-agent system. The added complexity is only worth it under specific conditions:
1. Specialization Beats Generalism
When your task requires different expertise -- e.g., one agent that analyzes code, one that runs security checks, and one that evaluates architecture -- specialized agents outperform a generalist. Each agent gets its own system prompt, its own tools, and its own model.
2. The Context Window Isn't Enough
Even with 1M+ token contexts: if your agent needs to analyze an entire codebase, read all relevant documentation, and then make informed decisions, a single agent hits its limits. Multiple agents can divide the work and merge their results.
3. Parallelization Is Critical
A single ReAct agent works sequentially. If you need to process 20 tasks simultaneously, you need multiple agents working in parallel and reporting their results to a coordinator.
4. Checks and Balances
In safety-critical scenarios, you don't want a single agent making all the decisions. A multi-agent system can have built-in quality assurance: one agent creates, another reviews, a third decides.
!Rule of Thumb
If you can solve your task with a single, well-prompted agent -- do it. Multi-agent systems bring complexity in coordination, debugging, and cost. Only use them when the added value justifies the complexity.
The Three Agentic AI Levels
Not every agent is equally "agentic." There are three levels that describe how much autonomy an agent has:
| Level | Name | Description | Example |
|---|---|---|---|
| 1 | Output Decisions | The agent decides on the format and content of its response | Chatbot choosing between text and table |
| 2 | Task Decisions | The agent decides which tools to use and in what order | ReAct agent that researches on its own |
| 3 | Process Decisions | The agent decides on its own workflow, delegates to other agents | Orchestrator that spawns sub-agents |
Multi-agent systems operate at Level 3 -- the highest level. Here, an agent doesn't just decide what to do, but how the entire system works. That's a fundamental difference.
The "Agentic Levels" section goes deeper into this distinction.
What This Module Covers
- Orchestration Patterns -- Four architecture patterns for multi-agent systems: Meta-Controller, Plan-and-Execute (deep dive), Blackboard Architecture, and Ensemble Decision-Making
- Frameworks -- LangGraph, Mastra, and CrewAI compared: When do you need which framework?
- Agentic Levels -- The three autonomy levels in detail, with practical examples
- Best Practices -- Communication patterns, error handling, and cost management in multi-agent systems
*Learning Objective
After this module, you'll be able to evaluate and design multi-agent architectures. You'll make informed design decisions: Which orchestration pattern? Which framework? How many agents? You're operating at Bloom's level "Evaluate" and "Create."
Let's start -- with the four orchestration patterns that form the foundation of every multi-agent system.
Reflect
Multi-agent systems are the next step beyond individual AI agents. In this module, you will learn when multiple agents make sense, how to orchestrate them, and which patterns and frameworks can help. The foundation consists of four orchestration patterns, which we will explore first.