Skip to main content
Teams orchestrate multiple agents working together to accomplish complex tasks. AgentChat provides several built-in team patterns.

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

participants
List[ChatAgent]
required
List of agents in the team
model_client
ChatCompletionClient
required
LLM used to select the next speaker
selector_prompt
str
Custom prompt for the selector model
allow_repeated_speaker
bool
default:"False"
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.
MagenticOne includes specialized agents:
  • Orchestrator - Coordinates the team
  • WebSurfer - Browses the web
  • FileSurfer - Reads and analyzes files
  • Coder - Writes and reviews code
  • ComputerTerminal - Executes commands
See Magentic-One documentation for details.

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
See Graph Orchestration example for a complete example.

Termination conditions

All teams require a termination condition to know when to stop:

Team comparison

Nested teams

You can nest teams using SocietyOfMindAgent:

Best practices

Each team should have a clear purpose. Don’t create overly complex teams with too many agents.
Always set termination conditions to prevent infinite loops. Combine conditions for safety.
Agent descriptions help LLM-based selectors choose the right agent. Be specific.
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