
Why Teams?
Single agents hit limits fast. Context windows fill up, decision-making gets muddy, debugging becomes impossible. Teams distribute work across specialized agents:| Benefit | Description |
|---|---|
| Specialization | Each agent masters one domain instead of being mediocre at everything |
| Parallel processing | Multiple agents work simultaneously on independent subtasks |
| Maintainability | When something breaks, you know exactly which agent to fix |
| Scalability | Add capabilities by adding agents, not rewriting everything |
When to Use Teams
Use a team when:- A task requires multiple specialized agents with different tools or expertise
- A single agent’s context window gets exceeded
- You want each agent focused on a narrow scope
- The task fits one domain of expertise
- Minimizing token costs matters
- You’re not sure yet (start simple, add agents when you hit limits)
Team Capabilities
Modular Execution
Agno agents and teams are modular. Message building, session handling, storage, and background managers are separated into dedicated components for separation of coordination logic with the APIs.Callable Factories
Callable factories let you supply callables for agents, team members, tools, or knowledge. Agno resolves them at run time with access to the run context and uses their return values for that run. This enables per-run or per-session configuration, deferred setup, and dynamic team composition.| Behavior | Details |
|---|---|
| Injected parameters | team, run_context, session_state when present in the factory signature |
| Caching | cache_callables=True caches by custom key, then user_id, then session_id, see caching settings |
| Return types | Tools and members return list or tuple. Knowledge returns a KnowledgeProtocol instance |
| Async factories | Async factories require arun() or aprint_response() |
Team.members can be a callable factory returning a list of members (agents/teams). Team.tools and Team.knowledge also support callable factories.
Team also supports caching settings for callables such as callable_members_cache_key, tools/knowledge cache keys.
Team Modes
Team 2.0 introducesTeamMode to make collaboration styles explicit. Prefer mode= instead of toggling respond_directly or delegate_to_all_members directly.
mode overrides legacy flags. If mode is not set, respond_directly=True maps to TeamMode.route, delegate_to_all_members=True maps to TeamMode.broadcast, otherwise 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 |
Guides
Build Teams
Define members, roles, and structure.
Run Teams
Execute teams and handle responses.
Debug Teams
Inspect and troubleshoot team behavior.
