Files
evotraders/functionality/multiagent_concurrent
raykkk 7d0451131f init
2025-10-17 21:40:45 +08:00
..
2025-10-17 21:40:45 +08:00
2025-10-17 21:40:45 +08:00
2025-10-17 21:40:45 +08:00

Multiagent Concurrent

This example demonstrates how to run multiple agents concurrently in AgentScope, where each agent operates independently and can perform tasks simultaneously.

Specifically, we showcase two ways to achieve concurrency:

  • Using Python's asyncio.gather to run multiple agents asynchronously.
  • Using fanout_pipeline to execute multiple agents in parallel and gather their results.

The fanout pipeline will distribute the input to multiple agents and collect their outputs, which is appropriate for scenarios like voting or parallel question answering.

QuickStart

Install the agentscope package if you haven't already:

pip install agentscope

Then run the example script:

python main.py

Further Reading