What is a Supervisor?
A supervisor agent acts as an intelligent orchestrator that:- Routes user requests to the most appropriate specialist agent
- Manages handoffs between multiple agents
- Evaluates worker outputs and decides next steps
- Coordinates multi-step workflows across different domains
Use
architecture: "supervisor" to enable supervisor-based multi-agent coordination. The supervisor dynamically routes tasks without requiring explicit edges.When to Use Supervisors
Best For
- Multi-domain systems (e.g., research + analysis + writing)
- Complex workflows requiring task delegation
- Systems with specialized agent teams
- Dynamic routing based on request type
Capabilities
- ✅ Streaming support
- ✅ Tool calling (for handoffs)
- ✅ Memory support
- ✅ Dynamic agent routing
- ✅ Agent handoffs
- ✅ Workflow coordination
Supervisor Configuration
Basic Structure
Supervisor Parameters
List of agent names that this supervisor coordinates. These are the worker agents the supervisor can delegate to.
Controls coordination flow:
false: One-way delegation (worker responds directly to user)true: Iterative coordination (worker returns to supervisor for next steps)
Maximum number of agent handoffs to prevent infinite coordination loops
System prompt defining the supervisor’s coordination strategy. Should clearly describe each worker’s role and delegation instructions.
Coordination Patterns
One-Way Delegation
Setreturn_to_supervisor: false for simple routing:
- Tasks are simple and don’t require multi-step coordination
- Each agent can complete its work independently
- You want minimal overhead
Iterative Coordination
Setreturn_to_supervisor: true for multi-step workflows:
- Tasks require multiple agents working in sequence
- Supervisor needs to evaluate intermediate results
- Complex workflows with conditional routing
Complete Example
Here’s a research team supervisor coordinating three specialized agents:Best Practices
Supervisor vs Workflow Architecture
| Feature | Supervisor | Workflow |
|---|---|---|
| Routing | Dynamic (supervisor decides) | Static (predefined edges) |
| Edges Required | ❌ No | ✅ Yes |
| Complexity | Lower config, smarter routing | More config, explicit control |
| Best For | Task delegation, dynamic routing | Sequential flows, conditional logic |
| Coordination | Supervisor manages handoffs | Edges define transitions |
Use supervisors when you need intelligent task delegation and don’t want to define all possible paths
Use workflows when you need explicit control over agent transitions and conditional routing
Common Use Cases
Content Creation Team
Content Creation Team
Setup: Supervisor + research agent + writer agent + editor agentThe supervisor routes tasks: research gathers info, writer creates content, editor polishes.
Customer Support System
Customer Support System
Setup: Supervisor + technical support + billing support + general supportThe supervisor classifies requests and routes to the appropriate specialist.
Data Analysis Pipeline
Data Analysis Pipeline
Setup: Supervisor + data collector + analyzer + visualizerThe supervisor coordinates: collector gathers data, analyzer processes it, visualizer creates reports.
Multi-Domain Expert System
Multi-Domain Expert System
Setup: Supervisor + multiple domain-specific ReAct agentsEach agent is an expert in a specific domain (legal, medical, technical). Supervisor routes based on domain.
Next Steps
Agent Types
Learn about different agent types to use as workers
Workflow Patterns
Compare with workflow-based multi-agent patterns
YAML Configuration
Complete YAML reference for all parameters
Tool Configuration
Configure tools for ReAct worker agents