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
| Mode | Behavior |
|---|---|
coordinate | Orchestrator decides which agent(s) to invoke |
route | Single best agent selected based on input |
broadcast | All agents process input; results merged |
collaborate | Agents pass work in rounds until done (maxRounds) |
TeamConfig
Display name for the team.
How the team distributes work:
coordinate, route, broadcast, or collaborate.The orchestrator model (for coordinate/route) or shared model for the team.
Array of member agents.
System instructions for the orchestrator (coordinate/route) or team context.
Storage for session state.
Max collaboration rounds (collaborate mode only).
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.