What are Teams?
Groups of agents that collaborate to solve complex tasks.
A Team coordinates agents or nested teams. In the default coordinate mode, the leader can delegate tasks based on member roles and synthesize their results.
from agno.team import Team
from agno.agent import Agent
team = Team(members=[
Agent(name="English Agent", role="You answer questions in English"),
Agent(name="Chinese Agent", role="You answer questions in Chinese"),
Team(
name="Germanic Team",
role="You coordinate the team members to answer questions in German and Dutch",
members=[
Agent(name="German Agent", role="You answer questions in German"),
Agent(name="Dutch Agent", role="You answer questions in Dutch"),
],
),
])Why Teams?
Use a team when separate roles, tools, or execution paths make a task easier to control.
| Benefit | Description |
|---|---|
| Specialization | Give each member a focused role and toolset |
| Coordination | Select coordinate, route, broadcast, or tasks mode |
| Composition | Nest teams when a sub-team needs its own leader and members |
| Inspection | Keep member responses and metrics separate from the leader response |
The leader and members make separate model calls. This adds latency, token usage, and coordination state.
When to Use Teams
Use a team when:
- A task requires multiple specialized agents with different tools or expertise
- You need an explicit routing, broadcast, or task-list pattern
- Member runs need separate outputs or metrics
Use a single agent when:
- The task fits one domain of expertise
- Minimizing token costs matters
- The extra coordination does not improve the result
Team Capabilities
Callable Factories
Pass a function instead of a static list for tools, knowledge, or members. Agno resolves the factory during run setup, reusing a cached result when available. When it calls the factory, it injects context based on the function’s parameter names.
| Behavior | Details |
|---|---|
| Injected parameters | agent, team, run_context, session_state |
| Caching | Cached by custom key > user_id > session_id. Disable with cache_callables=False |
| Return types | Tools and members return a list or tuple. Knowledge returns a KnowledgeProtocol instance or None |
knowledge, tools, and members all accept callable factories. Agents also support callable factories for knowledge and tools. See callable factories for examples and caching settings for cache key configuration.
Team Modes
TeamMode makes collaboration styles explicit. Prefer mode= instead of toggling respond_directly or delegate_to_all_members directly.
from agno.team import Team, TeamMode
team = Team(
name="Research Team",
members=[...],
mode=TeamMode.broadcast,
)Mode selection controls how the leader delegates. The leader can still answer directly or use its own tools. mode overrides legacy flags. If mode is not set, respond_directly=True maps to TeamMode.route and delegate_to_all_members=True maps to TeamMode.broadcast. Otherwise the team uses TeamMode.coordinate.
| Mode | Configuration | Use case |
|---|---|---|
| Coordinate | mode=TeamMode.coordinate (default) | Decompose work, delegate to members, synthesize results |
| Route | mode=TeamMode.route | Route to a single specialist and return their response directly |
| Broadcast | mode=TeamMode.broadcast | Delegate the same task to all members and synthesize |
| Tasks | mode=TeamMode.tasks | Run a task list loop until the goal is complete |
Modes define the delegation path without changing member configuration. See Delegation.
Guides
Build Teams
Define members, roles, and structure.
Run Teams
Execute teams and handle responses.
Debug Teams
Inspect and troubleshoot team behavior.