Skip to main content
A Team internally has a team-leader “agent” that delegates tasks and requests to team members. When you call run or arun on a team, the team leader uses a model to determine which member to delegate the task to. Team delegation flow The basic flow is:
  1. The team receives user input
  2. The team leader analyzes the input and decides how to break it down into subtasks
  3. The team leader delegates specific tasks to appropriate team members.
  4. Team members complete their assigned tasks and return their results
  5. The team leader then either delegates to more team members, or synthesizes all outputs into a final, cohesive response to return to the user
Delegating to members is done by the team leader deciding to use a tool, namely the delegate_task_to_member tool.When running the team asynchronously (using arun), and the team leader decides to delegate to multiple members at once, these members will run concurrently. Behind the scenes this is just concurrent execution of the delegate_task_to_member tool.
There are various ways to control how the team delegates tasks to members:

Members respond directly

By default, the team leader processes responses from members and synthesizes them into a single cohesive response. Set respond_directly=True to return member responses directly without team leader synthesis. Team direct response flow
Use this feature with determine_input_for_members=False to create a passthrough pattern team — the team leader is effectively bypassed and all communication is directly with a team member.
Example: Create a language router that directs questions to language-specific agents:
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team

english_agent = Agent(
    name="English Agent",
    role="You can only answer in English",
    model=OpenAIChat(id="gpt-5-mini"),
    instructions=[
        "You must only respond in English",
    ],
)

japanese_agent = Agent(
    name="Japanese Agent",
    role="You can only answer in Japanese",
    model=OpenAIChat(id="gpt-5-mini"),
    instructions=[
        "You must only respond in Japanese",
    ],
)
multi_language_team = Team(
    name="Multi Language Team",
    model=OpenAIChat("gpt-4.5-preview"),
    respond_directly=True,
    members=[
        english_agent,
        japanese_agent,
    ],
    markdown=True,
    instructions=[
        "You are a language router that directs questions to the appropriate language agent.",
        "If the user asks in a language whose agent is not a team member, respond in English with:",
        "'I can only answer in the following languages: English and Japanese. Please ask your question in one of these languages.'",
        "Always check the language of the user's input before routing to an agent.",
        "For unsupported languages like Italian, respond in English with the above message.",
    ],
    show_members_responses=True,
)


# Ask "How are you?" in all supported languages
multi_language_team.print_response(
    "How are you?", stream=True  # English
)

multi_language_team.print_response(
    "お元気ですか?", stream=True  # Japanese
)
respond_directly is not compatible with delegate_to_all_members.
When using respond_directly and the team leader decides to delegate the task to multiple members at the same time, the final content will be the results of all member responses concatenated together.

Send input directly to members

By default, the team leader determines what “task” to give each member based on the user input. Set determine_input_for_members=False to send the original user input directly to member agents. The team leader still selects which members to delegate to, but doesn’t transform the input. Send input directly to members flow
This is useful for structured inputs (like Pydantic models) that you want members to receive unchanged, or when you have specialized agents and want queries routed automatically without modification.
Example: Send structured Pydantic input directly to a specialized research agent:
from typing import List

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.hackernews import HackerNewsTools
from pydantic import BaseModel, Field


class ResearchTopic(BaseModel):
    """Structured research topic with specific requirements."""

    topic: str = Field(description="The main research topic")
    focus_areas: List[str] = Field(description="Specific areas to focus on")
    target_audience: str = Field(description="Who this research is for")
    sources_required: int = Field(description="Number of sources needed", default=5)


# Create specialized Hacker News research agent
hackernews_agent = Agent(
    name="Hackernews Agent",
    model=OpenAIChat(id="gpt-5-mini"),
    tools=[HackerNewsTools()],
    role="Extract key insights and content from Hackernews posts",
    instructions=[
        "Search Hacker News for relevant articles and discussions",
        "Extract key insights and summarize findings",
        "Focus on high-quality, well-discussed posts",
    ],
)

# Create collaborative research team
team = Team(
    name="Hackernews Research Team",
    model=OpenAIChat(id="gpt-5-mini"),
    members=[hackernews_agent],
    determine_input_for_members=False,  # The member gets the input directly, without the team leader synthesizing it
    instructions=[
        "Conduct thorough research based on the structured input",
        "Address all focus areas mentioned in the research topic",
        "Tailor the research to the specified target audience",
        "Provide the requested number of sources",
    ],
    show_members_responses=True,
)

# Use Pydantic model as structured input
research_request = ResearchTopic(
    topic="AI Agent Frameworks",
    focus_areas=["AI Agents", "Framework Design", "Developer Tools", "Open Source"],
    target_audience="Software Developers and AI Engineers",
    sources_required=7,
)
# Execute research with structured input
team.print_response(input=research_request)

Passthrough Teams

It is a common pattern to have a team that decides which member to delegate the request to, and then passes the request to the team member without any modification, and also applies no processing to the response before returning it to the user. I.e. this team is a “passthrough” team (or “router” team). This means setting both respond_directly=True and determine_input_for_members=False. Passthrough team flow For example:
from agno.team.team import Team
from agno.agent import Agent
from agno.models.openai import OpenAIChat

team = Team(
    name="Question Router Team",
    model=OpenAIChat(id="gpt-5-mini"),
    members=[
        Agent(name="Big Question Agent", role="You handle BIG questions"),
        Agent(name="Small Question Agent", role="You handle SMALL questions"),
    ],
    respond_directly=True,  # The team leader doesn't process the response from the members and instead returns them directly
    determine_input_for_members=False,  # The member gets the input directly, without the team leader synthesizing it
)

team.print_response(input="What is the capital of France?", stream=True)
team.print_response(input="What is the meaning of life?", stream=True)

Delegate tasks to all members simultaneously

Set delegate_to_all_members=True to delegate the task to all members at once, rather than selectively choosing members. When running asynchronously (using arun), all members execute concurrently for maximum parallelism. Delegate tasks to all members simultaneously flow Example: Research team that gathers perspectives from multiple sources simultaneously:
import asyncio
from textwrap import dedent

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.arxiv import ArxivTools
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.hackernews import HackerNewsTools

reddit_researcher = Agent(
    name="Reddit Researcher",
    role="Research a topic on Reddit",
    model=OpenAIChat(id="gpt-5-mini"),
    tools=[DuckDuckGoTools()],
    add_name_to_context=True,
    instructions=dedent("""
    You are a Reddit researcher.
    You will be given a topic to research on Reddit.
    You will need to find the most relevant posts on Reddit.
    """),
)

hackernews_researcher = Agent(
    name="HackerNews Researcher",
    model=OpenAIChat("gpt-5-mini"),
    role="Research a topic on HackerNews.",
    tools=[HackerNewsTools()],
    add_name_to_context=True,
    instructions=dedent("""
    You are a HackerNews researcher.
    You will be given a topic to research on HackerNews.
    You will need to find the most relevant posts on HackerNews.
    """),
)

academic_paper_researcher = Agent(
    name="Academic Paper Researcher",
    model=OpenAIChat("gpt-5-mini"),
    role="Research academic papers and scholarly content",
    tools=[DuckDuckGoTools(), ArxivTools()],
    add_name_to_context=True,
    instructions=dedent("""
    You are a academic paper researcher.
    You will be given a topic to research in academic literature.
    You will need to find relevant scholarly articles, papers, and academic discussions.
    Focus on peer-reviewed content and citations from reputable sources.
    Provide brief summaries of key findings and methodologies.
    """),
)

twitter_researcher = Agent(
    name="Twitter Researcher",
    model=OpenAIChat("gpt-5-mini"),
    role="Research trending discussions and real-time updates",
    tools=[DuckDuckGoTools()],
    add_name_to_context=True,
    instructions=dedent("""
    You are a Twitter/X researcher.
    You will be given a topic to research on Twitter/X.
    You will need to find trending discussions, influential voices, and real-time updates.
    Focus on verified accounts and credible sources when possible.
    Track relevant hashtags and ongoing conversations.
    """),
)


agent_team = Team(
    name="Discussion Team",
    model=OpenAIChat("gpt-5-mini"),
    members=[
        reddit_researcher,
        hackernews_researcher,
        academic_paper_researcher,
        twitter_researcher,
    ],
    instructions=[
        "You are a discussion master.",
        "You have to stop the discussion when you think the team has reached a consensus.",
    ],
    delegate_to_all_members=True,
    markdown=True,
    show_members_responses=True,
)

if __name__ == "__main__":
    asyncio.run(
        agent_team.aprint_response(
            input="Start the discussion on the topic: 'What is the best way to learn to code?'",
            stream=True,
        )
    )

More Examples

Developer Resources