AgentScope: A Flexible yet Robust Multi-Agent Platform

Dawei Gao, Zitao Li, Weirui Kuang, Xuchen Pan, Daoyuan Chen, Zhijian Ma, Bingchen Qian, Liuyi Yao, Lin Zhu, Chen Cheng, Hongzhu Shi, Yaliang Li, Bolin Ding, Jingren Zhou · OpenReview

Abstract

With the rapid advancement of Large Language Models (LLMs), significant progress has been made in multi-agent applications. However, the complexities in coordinating agents' cooperation and LLMs' erratic performance pose notable challenges in developing robust and efficient multi-agent applications. To tackle these challenges, we propose AgentScope, a developer-centric multi-agent platform with message exchange as its core communication mechanism. Together with abundant syntactic tools, built-in resources, and user-friendly interactions, our communication mechanism significantly reduces the barriers to both development and understanding. Towards robust and flexible multi-agent application, AgentScope provides both built-in and customizable fault tolerance mechanisms while it is also armed with system-level supports for multi-modal data generation, storage and transmission. Additionally, we design an actor-based distribution framework, enabling easy conversion between local and distributed deployments and automatic parallel optimization without extra effort. With these features, AgentScope empowers developers to build applications that fully realize the potential of intelligent agents.

Introduction

The rise of Large Language Models (LLMs) has opened new frontiers for sophisticated multi-agent systems. However, translating this potential into functional applications remains a significant engineering challenge. Developers typically face three primary hurdles: coordination complexity in managing communication patterns, system fragility due to erratic LLM behavior (such as hallucinations or malformed JSON), and high deployment overhead when scaling from local prototypes to distributed environments.

AgentScope is designed as a developer-centric platform to address these hurdles. It provides high-level abstractions for complex workflows, built-in fault tolerance, and an actor-based framework that allows for seamless scaling from a single machine to a distributed environment.

System Architecture

AgentScope is built on a three-tiered hierarchical architecture designed to separate low-level utilities from high-level agent logic and user interaction.

The hierarchical architecture of AgentScope, illustrating the separation between the Utility, Manager/Wrapper, and Agent layers.
  1. Utility Layer: This layer contains the fundamental building blocks, including API invocation, code execution, database queries, and web search capabilities.
  2. Manager and Wrapper Layer: This serves as the system's "safety net." It manages resources and provides critical fault-tolerance mechanisms, such as automatic retries and rule-based response correction to handle erratic LLM outputs.
  3. Agent Layer: This is the primary interface for developers, where agent logic and workflows are defined.

Technical Innovations

To streamline development, AgentScope introduces "syntactic sugars" like pipelines for sequential logic and msghub for group broadcasts. It also utilizes an actor-based distribution model where agents are treated as independent entities. This model employs a "placeholder" message system, allowing the main process to continue execution asynchronously while waiting for responses from distributed agents. For multi-modal data, AgentScope implements a "lazy loading" strategy, carrying URLs in messages and only downloading heavy assets (images, audio) when required by an agent or the UI.

Key Features and Insights

A core philosophy of AgentScope is that fault tolerance is mandatory. Rather than assuming LLMs will always follow instructions, the platform includes rule-based tools to automatically fix common errors, such as missing braces in JSON, without requiring additional LLM calls.

Furthermore, AgentScope enables developers to write distributed logic using standard procedural Python. The underlying framework manages the complexities of parallelization and network communication. For non-programmers, the platform offers a drag-and-drop workstation that compiles visual workflows into executable scripts. It also features automatic prompt tuning, which can generate and optimize system prompts based on simple natural language descriptions of an agent's role.

Applications and Pre-built Agents

The platform's utility is demonstrated through several signature applications. For instance, a complex "Werewolf" social simulation involving six distinct roles was implemented in approximately 100 lines of code using the msghub abstraction. Other applications include the AgentScope Copilot, a RAG-based assistant utilizing a "Knowledge Bank" for document-based queries.

To facilitate rapid development, AgentScope provides a variety of pre-built agent templates that cover common use cases.

A summary of the pre-built agent templates available in AgentScope, ranging from user proxies to specialized programming agents.

Conclusion and Future Work

While AgentScope significantly improves the robustness of multi-agent systems, the authors note that "model-resolvable" errors—such as logical inconsistencies—still require advanced agent-to-agent critiquing. Future development will focus on deeper RAG integration, meta-prompting for automatic prompt optimization via evaluator agents, and more interactive multi-modal interfaces that adapt to changing task requirements.

Summary updated

BibTeX
@misc{gao2024agentscope,
  author = {Dawei Gao and Zitao Li and Weirui Kuang and Xuchen Pan and Daoyuan Chen and Zhijian Ma and Bingchen Qian and Liuyi Yao and Lin Zhu and Chen Cheng and Hongzhu Shi and Yaliang Li and Bolin Ding and Jingren Zhou},
  title = {{AgentScope: A Flexible yet Robust Multi-Agent Platform}},
  year = {2024},
  eprint = {2402.14034},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.14034},
}
Figure