Minimal Example
research_team.py
Team Modes
Teams default to coordinate mode (leader delegates and synthesizes). Setmode to change how the leader collaborates with members.
Tasks mode runs an iterative task loop. Use
max_iterations to cap how many cycles the leader can run.
Team Members
Each member should have aname and role. The team leader uses these to decide who handles what.
id:
id and name are set on a member, team delegation uses id as the member identifier.
Members must be native Agno
Agent or Team instances. External-framework
adapters (ClaudeAgent, LangGraphAgent, DSPyAgent) can be served by
AgentOS as standalone agents but cannot be a member agent of an Agno Team or an agent of a Workflow Step yet. See
Multi-Framework Support.Nested Teams
Teams can contain other teams. The top-level leader delegates to sub-team leaders, who delegate to their members.Model Inheritance
Agent members inherit the parent team’smodel when their own model is unset. Nested teams initialize their own model unless you set one explicitly.
Callable Factories
Pass a function instead of a static list formembers, tools, or knowledge. The function is called at the start of each run, so the composition can vary per user or session.
team_callable_members.py
tools and knowledge. Agents also support callable factories for tools and knowledge.
Injected Parameters
Name your factory function parameters to receive context automatically:
Use any combination. A zero-argument factory also works.
add_tool and set_tools
add_tool() raises RuntimeError when tools is a callable factory. Use set_tools() to replace the factory entirely:
Callable Caching Settings
Factory results are cached by default. The cache key is resolved in this order: custom key function >user_id > session_id. If none are available, caching is skipped and the factory runs every time.
Set
cache_callables=False when session_state changes between runs and the factory should re-evaluate each time.
Clear cached results programmatically:
aclear_callable_cache() in async code.
Team Features
Teams support the same features as agents:
See the guides below to add these features.