Abstract
Recent advances in large language models (LLMs) have opened new avenues for applying multi-agent systems in very large-scale simulations. However, there remain several challenges when conducting multi-agent simulations with existing platforms, such as limited scalability and low efficiency, unsatisfied agent diversity, and effort-intensive management processes. To address these challenges, we develop several new features and components for AgentScope, a user-friendly multi-agent platform, enhancing its convenience and flexibility for supporting very large-scale multi-agent simulations. Specifically, we propose an actor-based distributed mechanism as the underlying technological infrastructure towards great scalability and high efficiency, and provide flexible environment support for simulating various real-world scenarios, which enables parallel execution of multiple agents, centralized workflow orchestration, and both inter-agent and agent-environment interactions among agents. Moreover, we integrate an easy-to-use configurable tool and an automatic background generation pipeline in AgentScope, simplifying the process of creating agents with diverse yet detailed background settings. Last but not least, we provide a web-based interface for conveniently monitoring and managing a large number of agents that might deploy across multiple devices. We conduct a comprehensive simulation to demonstrate the effectiveness of the proposed enhancements in AgentScope, and provide detailed observations and discussions to highlight the great potential of applying multi-agent systems in large-scale simulations.
Introduction
While Large Language Models (LLMs) have made "intelligent agents" a reality, scaling them to simulate entire populations remains a massive hurdle. Existing multi-agent platforms suffer from three main bottlenecks: limited scalability and efficiency, where running thousands of LLM calls sequentially is prohibitively slow; a lack of diversity, often resulting in homogeneous agents that fail to capture human societal complexity; and management difficulties in monitoring agents spread across distributed clusters.
This work evolves AgentScope into a high-performance infrastructure for Very Large-Scale (VLS) simulations, capable of supporting up to one million LLM-powered agents. By implementing an actor-based distributed mechanism and automated background generation pipelines, we enable massive social simulations that converge on complex game-theoretic equilibria in minutes rather than days.
Methodology
Actor-Based Distributed Mechanism
To overcome the efficiency bottleneck, we introduce an actor-based distributed mechanism. Inspired by the Actor model, agents are treated as independent units that communicate via messages, allowing for massive parallelization across multiple GPUs and CPUs. A key feature is the to_dist function, which enables automatic workflow conversion. Users can write a simple, centralized simulation script and deploy it as a distributed system without rewriting core logic.
Multi-Layer Environments and Diversity
We moved beyond simple "chat rooms" to support nested environments. Agents can interact with both local "sub-environments" and a "global environment" simultaneously, mirroring real-world hierarchical social structures. To ensure agent diversity, we integrated an automatic background generation pipeline. By providing a population distribution (e.g., "20% Ph.D. holders"), the system uses an LLM to generate unique, detailed personas for every agent.
Agent Management
To handle the complexity of VLS simulations, we provide a web-based dashboard (Agent-Manager) to monitor CPU/GPU usage and agent status across a cluster in real-time, facilitating easier debugging and resource management.
Experimental Setup
We evaluated the system using a suite of state-of-the-art open-source LLMs, including Llama3 (8B/70B), Qwen2 (7B/72B), and MistralAI (8x7B/8x22B). The primary benchmark was the "Guess 2/3 of the Average" game, a classic test of recursive thinking and Nash Equilibrium. In this game, players pick a number from 0-100, and the winner is whoever is closest to 2/3 of the group's average.
Results and Discussion
Performance and Scalability
The infrastructure demonstrated remarkable efficiency gains. A 1-million agent simulation with dummy models took only 40 seconds, whereas standard Python serial execution would have required approximately 12 days. Using Llama3-8B, a full 1M-agent simulation finished in 12 minutes across 4 devices (each with 8 A100 GPUs). The system showed near-linear speedup as more devices were added, proving its horizontal scalability.
Qualitative Insights
- Prompting for Rationality: Implementing Chain-of-Thought (CoT) prompting significantly accelerated the group's convergence toward the Nash Equilibrium (0).
- Persona Impact: Agents with "expert" backgrounds (e.g., Professors) played more rationally than those with "child" personas. However, LLMs occasionally struggled with role consistency; for instance, a "7-year-old" agent might still perform complex decimal math.
- Prior Knowledge Bias: Performance dipped when the rules of the game were modified (e.g., "Guess 1/2 of the average + 5"), suggesting that agents rely partially on memorized logic from their training data rather than pure reasoning.
Conclusion
While AgentScope successfully scales multi-agent simulations to the million-agent level, challenges remain. LLMs still exhibit calculation errors and occasional role-playing inconsistencies. Future work will focus on improving agent grounding to prevent math errors and exploring more complex social scenarios such as urban planning or economic policy testing. The source code is available on GitHub to inspire further research in large-scale multi-agent simulations.
Summary updated