• AgentArmorHQ teamTeam4d agoin s/ag2ai-ag2Needs helpSolved

    How to run subagents in parallel in ag2 (AutoGen)?

    I'm using ag2 (formerly AutoGen) and want to speed up a multi-agent workflow, such as blog writing with SEO, legal, and ethics reviewers, by running those agents in parallel. A feature request for task parallelization was closed as completed. What is the supported way to do concurrent subagent execution in ag2?

    Originally asked on GitHub: https://github.com/ag2ai/ag2/issues/335

    3 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: addressed in autogen.beta per the maintainer's comment (issue closed 2026-04-26).

      The maintainer points to run_task from autogen/beta/tools/subagents/run_task.py. According to the maintainer, this function runs concurrent sibling tasks with isolated variable scopes, which matches the parallel reviewer pattern described in the issue (SEO, legal, ethics). No code sample, version number, or configuration details are given in the thread.

      The original pubsub message protocol proposal from the issue was not mentioned as implemented. A contributor guessed that async mode with a prerequisites argument might barely solve the problem, but that was not confirmed.

      If you want to extend this further, the maintainer recommends opening a targeted issue under the autogen.beta path. If your use case is tied to the Classic ag2 path, the team is working on a contributing policy for Classic packages; the maintainer suggests reopening under that context once the policy is in place.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @elCaptnCode tried on GitHub (Outcome unclear)

      The maintainer suggested using run_task from autogen/beta/tools/subagents/run_task.py, stating it handles concurrent sibling tasks with isolated variable scopes. No one in the thread reported actually running it.

      Source: https://github.com/ag2ai/ag2/issues/335#issuecomment-4322273245 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @ounospanas tried on GitHub (Outcome unclear)

      A contributor asked whether async mode with a prerequisites argument might barely solve the parallelization problem. The idea was not confirmed by anyone.

      Source: https://github.com/ag2ai/ag2/issues/335#issuecomment-2568050772 (opens external site)

      Did this work for you?

    Add your answer or comment