Agno's team pattern lets agents delegate, collaborate, and specialise. Here is the setup most tutorials skip.
Single Agent vs Team
A single Agno agent with many tools works well up to a point. Beyond that point -- complex multi-step tasks, specialised domains, parallel workstreams -- a team of focused agents outperforms one generalist agent every time. Each specialist has a tighter prompt, fewer tools, and makes better decisions within its domain.
Agno's Team class makes this straightforward to configure. This article explains the patterns and the common setup mistakes.
The Basic Team Setup
from agno.agent import Agent
from agno.team import Team
from agno.models.anthropic import Claude
from agno.tools.exa import ExaTools
from agno.tools.file import FileTools
# Specialist agents -- each focused on one job
researcher = Agent(
name="Researcher",
role="Research a topic thoroughly using web search",
model=Claude(id="claude-sonnet-4-6"),
tools=[ExaTools()],
instructions=[
"Always search for at least 3 sources before summarising",
"Include source URLs in your output",
"Flag any conflicting information between sources",
],
)
writer = Agent(
name="Writer",
role="Write clear, engaging content based on research provided",
model=Claude(id="claude-sonnet-4-6"),
instructions=[
"Write for an intermediate technical audience",
"Use the research provided -- do not add unsourced claims",
"Structure content with clear headings",
],
)
reviewer = Agent(
name="Reviewer",
role="Review content for accuracy, clarity, and completeness",
model=Claude(id="claude-haiku-4-5-20251001"), # cheaper model for review
instructions=[
"Check that all claims match the research provided",
"Flag any sections that need more detail",
"Approve or request revisions with specific feedback",
],
)
# Team coordinates the specialists
team = Team(
name="Content Team",
mode="coordinate", # team lead decides which agent handles what
model=Claude(id="claude-sonnet-4-6"),
members=[researcher, writer, reviewer],
instructions=[
"Always start by researching before writing",
"Ensure the reviewer approves before returning the final output",
],
markdown=True,
)
result = await team.arun("Write a tutorial on Agno multi-agent teams")
print(result.content)Team Modes
| Mode | How it works | Best for |
|---|---|---|
| coordinate | Team lead (an LLM) reads the task and decides which member to delegate to, in what order | Complex tasks where the sequence depends on the input |
| route | Team lead routes the entire task to exactly one member based on the query type | Classification-style routing: billing vs support vs technical |
| collaborate | All members work on the task independently and outputs are combined | Tasks that benefit from multiple perspectives (e.g. debate, review) |
# Route mode -- one specialist handles the whole task
support_team = Team(
name="Support Team",
mode="route",
model=Claude(id="claude-sonnet-4-6"),
members=[billing_agent, technical_agent, general_agent],
instructions=["Route billing questions to the Billing agent, "
"technical issues to the Technical agent, "
"everything else to the General agent."],
)
# Collaborate mode -- all members contribute
review_team = Team(
name="Review Team",
mode="collaborate",
model=Claude(id="claude-sonnet-4-6"),
members=[legal_reviewer, technical_reviewer, ux_reviewer],
instructions=["All members review the document and provide their perspective. "
"Summarise all feedback into a unified review."],
)Passing Context Between Team Members
In coordinate mode, the team lead passes the original task plus accumulated context to each member it delegates to. Members do not automatically share outputs with each other -- the team lead mediates. This is important to understand when writing your team instructions.
team = Team(
name="Content Team",
mode="coordinate",
model=Claude(id="claude-sonnet-4-6"),
members=[researcher, writer, reviewer],
instructions=[
# Tell the team lead HOW to coordinate
"Step 1: Ask the Researcher to research the topic and provide findings.",
"Step 2: Pass the Researcher's full findings to the Writer to draft content.",
"Step 3: Pass both the research and the draft to the Reviewer for approval.",
"Step 4: If the Reviewer requests changes, send the feedback back to the Writer.",
"Return the final approved content.",
],
)Write team instructions as an explicit numbered sequence when you need a specific order of operations. The team lead LLM is smart but benefits from clear orchestration instructions, especially when members need to see each other's outputs.Adding Memory to Teams
Teams support the same storage and memory configuration as individual agents. For a conversational team (one that users interact with across multiple sessions), add session storage to the team, not to individual members.
from agno.storage.postgres import PostgresStorage
team = Team(
name="Content Team",
mode="coordinate",
model=Claude(id="claude-sonnet-4-6"),
members=[researcher, writer, reviewer],
# Session memory lives on the team
storage=PostgresStorage(
table_name="team_sessions",
db_url=DB_URL,
),
add_history_to_messages=True,
num_history_responses=5,
)
result = await team.arun(
"Continue the article we started last time",
session_id="user-123-content-session",
)Common Mistakes
- Giving all members the same broad instructions -- defeats the purpose of specialisation. Each member should have a narrow, specific role.
- Using collaborate mode when you need a specific sequence -- collaborate runs all members in parallel with no guaranteed order.
- Not telling the team lead how to pass context between members -- it will try to figure it out, often poorly.
- Adding memory to individual members instead of the team -- in team mode, the team lead manages context, not the members.
- Using expensive models for all members -- use a capable model for the team lead, cheaper models for straightforward members like reviewers.
Quick Reference
- coordinate: team lead delegates to members in a sequence it determines
- route: team lead picks exactly one member for the whole task
- collaborate: all members work independently, outputs combined
- Write explicit numbered steps in team instructions for predictable coordinate sequences
- Session storage goes on the Team, not on individual members
- Use cheaper models (Haiku, GPT-4o-mini) for reviewer or approval-type members