RoundRobinGroupChat
Agents take turns speaking in a fixed sequence. Simple and predictable.When to use
- Fixed workflow with clear stages
- Each agent has a distinct role
- Order of operations matters
SelectorGroupChat
An LLM selects the next speaker based on the conversation context.Parameters
List of agents in the team
LLM used to select the next speaker
Custom prompt for the selector model
Whether the same agent can speak twice in a row
When to use
- Dynamic conversations where next speaker depends on context
- Agents with overlapping capabilities
- Flexible, adaptive workflows
Swarm
Agents hand off tasks to each other dynamically using handoff messages.When to use
- Customer service and triage scenarios
- Specialized agents for different domains
- Dynamic routing based on task content
MagenticOneGroupChat
A powerful multi-agent team designed for complex web and file-based tasks.- Orchestrator - Coordinates the team
- WebSurfer - Browses the web
- FileSurfer - Reads and analyzes files
- Coder - Writes and reviews code
- ComputerTerminal - Executes commands
GraphFlow
Define custom orchestration logic using a directed graph.When to use
- Complex workflows with conditional logic
- Loops and retries
- Multiple exit conditions
- Fine-grained control over flow
Termination conditions
All teams require a termination condition to know when to stop:Team comparison
Nested teams
You can nest teams usingSocietyOfMindAgent:
Best practices
Keep teams focused
Keep teams focused
Each team should have a clear purpose. Don’t create overly complex teams with too many agents.
Set appropriate termination conditions
Set appropriate termination conditions
Always set termination conditions to prevent infinite loops. Combine conditions for safety.
Use clear agent descriptions
Use clear agent descriptions
Agent descriptions help LLM-based selectors choose the right agent. Be specific.
Monitor token usage
Monitor token usage
Multi-agent conversations can use many tokens. Use
TokenUsageTermination to control costs.Next steps
Multi-Agent Workflows
Learn to design effective multi-agent systems
Swarm Example
See Swarm pattern in action
Graph Orchestration
Build custom graph-based workflows
Orchestration Patterns
Explore advanced patterns