Skip to main content

Teams

In plain terms

A team is several AI agents working together — like a department instead of a single employee. One agent researches, another writes, a third reviews. A team coordinates them so the customer gets one polished answer. You choose how they cooperate:
  • Coordinate — a manager splits the work and merges the results (“you research, you draft, you edit”).
  • Route — a receptionist sends each request to the right specialist (“billing question → billing agent”).
  • Broadcast — ask everyone at once and combine their answers (good for second opinions).
  • Collaborate — the agents discuss until they agree (for high-stakes decisions).
The analogy: one agent is an employee; a team is the org chart. You use a team when a job is too big or too varied for one specialist.
Teams enable multiple agents to work together. Choose how tasks are distributed: an orchestrator can pick agents, route to the best one, broadcast to all, or run iterative collaboration rounds.

Multi-Agent Collaboration

Coordinate

An orchestrator model picks which member agent handles the task.

Route

Routes to the single best agent based on input.

Broadcast

Sends input to ALL agents and merges results.

Collaborate

Iterative rounds between agents (maxRounds configurable).

TeamMode


TeamConfig

string
required
Display name for the team.
TeamMode
required
How the team distributes work: coordinate, route, broadcast, or collaborate.
ModelProvider
required
The orchestrator model (for coordinate/route) or shared model for the team.
Agent[]
required
Array of member agents.
string
System instructions for the orchestrator (coordinate/route) or team context.
StorageDriver
Storage for session state.
number
Max collaboration rounds (collaborate mode only).
EventBus
Custom event bus for team events.

Basic Example


Next Steps

Coordinate Mode

Orchestrator picks which agent handles each task.

Route Mode

Route to the single best agent.

Broadcast Mode

All agents process; merge results.

Collaborate Mode

Iterative rounds between agents.