Skip to content

Conversation

@priyansh4320
Copy link
Collaborator

@priyansh4320 priyansh4320 commented Oct 13, 2025

Why are these changes needed?

This PR introduces a new ParallelAgentRunner Class which let's you run your agents in parallel.
The ParallelAgentRunner adds native parallel execution capabilities to AG2, allowing multiple agents to run concurrently.

Basic Task Structure:

from autogen import ParallelAgentRunner

# Create a parallel runner
parallel_runner = ParallelAgentRunner(
    max_workers=8,  # or use default calculation
    timeout=300,    # 5 minutes per task
    handle_errors='collect'  # 'collect', 'fail_fast', or 'ignore'
)

# Define parallel tasks
tasks = [
    {
        'name': 'symptom_analysis',
        'agent_config': {...},
        'prompt': 'Analyze patient symptoms...'
    },
    {
        'name': 'drug_interaction',
        'agent_config': {...},
        'prompt': 'Check drug interactions...'
    }
]

# Execute in parallel
results = parallel_runner.run(tasks)

Related issue number

Checks

@joggrbot

This comment has been minimized.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 35.29412% with 66 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
autogen/agentchat/run_parallel_agents.py 35.29% 66 Missing ⚠️
Files with missing lines Coverage Δ
autogen/agentchat/run_parallel_agents.py 35.29% <35.29%> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants