Can agno achieve parallelization?

I want to split a large set of data into multiple smaller parts (split by an agent), then assign them to multiple same(or not same) agents/workflows/teams for parallel execution, and finally merge the results.

I can manually split the data and assign tasks, but I want to know if agno can handle this entirely on its own.

Hi @huangsh
Thanks for reaching out and for using Agno! I’ve looped in the right engineers to help with your question. We usually respond within 48 hours, but if this is urgent, just let us know, and we’ll do our best to prioritize it.
Appreciate your patience—we’ll get back to you soon! :smile:

Yes! There are various ways and it depends on how you want to construct it specifically.
Perhaps a collaborative team could work Collaborate - Agno

Otherwise the Coordinate - Agno coordinate team

For both of these I can recommend running in async mode, i.e. to use arun or aprint_response

@Dirk Hi, thank your for your reply. What I mean is the parallelization task is planned by agent, not by human. could you provide some demo code?

Yes so the links I provided is for a team of agents, where the Team actually is itself an agent. So it does plan which agents in the team to call. If run in async mode, then these functions are also run in parallel, so it then achieves parallelization

1 Like

@Dirk Hi Dirk, i’ve tried using a team in async mode with arun and aprint_response, but i have found it still unable to achieve parallelization. I’m using coordinate mode.

Do you have any tips?

Hi @ahmedsamirio

It would require the team-lead to call multiple members at the same time, I.e. decide to delegate to multiple at the same time.

Can you share your team config?

@Dirk so i get it now, if it delegated to the same member it will execute the tasks sequentially, but if delegated to multiple members they can execute in parallel?

As you see in my config, i only create a single member, but in that case i think it makes sense to dynamically create as many members as the count of claims that i have to verify.

verification_agent = Agent(
    name="Web Verification Agent",
    role="Verify claims online",
    model=OpenAIResponses(id="o3-mini"),
    tools=[
        GoogleSearchTools(exclude_tools=["extract_webpage_content", "extract_multiple_webpages"])
    ],
    instructions=CLAIM_VERIFICATION_SYSTEM_PROMPT,
    show_tool_calls=True,
    response_model=ClaimVerificationResponse
)

agent_team = Team(
    members=[verification_agent],
    model=OpenAIResponses(id="o3", parallel_tool_calls=True),
    instructions=dedent("""\
        You are the a user facing agent in control of verification agents.
        Your role is to manage and coordinate the activities of these agents to ensure accurate and efficient verification of employment claims,
        and be a bridge between the users and the agents. Each verification member should only verify a single claim. You can dispatch multiple claims in parallel.
    """),
    show_tool_calls=True,
    markdown=True,
    show_members_responses=True,
    enable_agentic_context=True,
    debug_mode=True,
    response_model=FinalVerificationResponse,
    add_datetime_to_instructions=True
)

# Example usage with diverse queries
agent_team.aprint_response(
    "verify the employment of allen carr as co-founder of bioup between 2017 and 2019 and as co-founder of admit analytics between 2024 and present"
)

No even if you only have one member, the team leader can choose to call them multiple times at once. To delegate is just a tool call, so it is the same as calling the same tool multiple times.

It might be related to the behaviour of o3 and setting parallel_tool_calls=True?

i’ll check doing it without it :+1:

I’ve tested this quite a lot, and currently testing it with v2, but i’m quite sure that the parallelism is only on the level of the delegation, not on the level of agents runs themselves.

You can run the following snippet and check the events, you won’t find any concurrent RunStarted events. Only when you uncomment delegate_task_to_all_members you will see the RunStarted concurrent events.

Is there anyways to actually delegate tasks to members and have them run concurrently in a real sense?

Thanks!

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.reasoning import ReasoningTools
from agno.tools.googlesearch import GoogleSearchTools


web_agent = Agent(
    name="Web Search Agent",
    role="Handle web search requests and general research",
    model=OpenAIChat(id="gpt-4.1"),
    tools=[GoogleSearchTools()],
    instructions="Always include sources",
    stream=True,
    stream_intermediate_steps=True,
)

news_agent = Agent(
    name="News Agent",
    role="Handle news requests and current events analysis",
    model=OpenAIChat(id="gpt-4.1"),
    tools=[GoogleSearchTools()],
    instructions=[
        "Use tables to display news information and findings.",
        "Clearly state the source and publication date.",
        "Focus on delivering current and relevant news insights.",
    ],
    stream=True,
    stream_intermediate_steps=True,
)

reasoning_research_team = Team(
    name="Reasoning Research Team",
    model=OpenAIChat(id="gpt-4.1"),
    members=[web_agent, news_agent],
    tools=[ReasoningTools(add_instructions=True)],
    instructions=[
        "Collaborate to provide comprehensive research and news insights",
        "Consider both current events and trending topics",
        "Use tables and charts to display data clearly and professionally",
        "Present findings in a structured, easy-to-follow format",
        "Only output the final consolidated analysis, not individual agent responses",
    ],
    markdown=True,
    show_members_responses=True,
    stream_member_events=True,
    # delegate_task_to_all_members=True
)

gen = reasoning_research_team.arun("""Research and compare recent developments in renewable energy:
    1. Get latest news about renewable energy innovations
    2. Analyze recent developments in the renewable sector
    3. Compare different renewable energy technologies
    4. Recommend future trends to watch""",
    stream=True,
    stream_intermediate_steps=True,
)

async for event in gen:
    print(event.event, event.run_id, event)

@Dirk do you mind checking this out please? thank!

Hi @ahmedsamirio, Dirk is OOO today I have asked our engineer @manu to help you out here

Hey @ahmedsamirio

Your observation is correct - the members only run concurrently using delegate_task_to_all_members=True. I see how it would be useful to be able to run the members concurrently without that parameter.

We will work to make this possible soon. Thanks for raising this, it is truly useful!

1 Like

Hi @ahmedsamirio

Just to clarify, we have recently made some changes to allow concurrent member delegation to run simultaneously.
So that means if the team leader model decides to delegate to multiple members at the same time and you are using arun, these members will be executed concurrently (i.e. at the same time).

This was updated on 2.2.0 I believe, so if you are on the latest Agno you should get that behaviour.

1 Like

Hi @Dirk , sorry for the late reply.
Yeah i’m closely following your releases and currently using this feature.