Source-linked AI summary

AgentScope: A Flexible yet Robust Multi-Agent Platform

Dawei Gao, Zitao Li, Xuchen Pan, Weirui Kuang, Zhijian Ma, Bingchen Qian, Fei Wei, Wenhao Zhang, Yuexiang Xie, Daoyuan Chen, Liuyi Yao, Hongyi Peng, Zeyu Zhang, Lin Zhu, Chen Cheng, Hongzhu Shi, Yaliang Li, Bolin Ding, Jingren Zhou

arXiv:2402.14034v2cs.MAcs.AI

TL;DR

Multi-agent applications face coordination demands alongside challenges from LLM errors and the integration of multimodal data, tools, external knowledge, and distributed execution. AgentScope combines message exchange with developer utilities, fault-tolerance mechanisms, system-level integration, and actor-based distribution support; the paper presents it as a platform for developing such applications.

  • Problem

    Multi-agent applications face coordination complexity and erratic LLM performance, complicating the development of robust and efficient systems.

    Source: §1 · p. 1
  • Method

    AgentScope is a message-exchange-centered platform combining development utilities, built-in and customizable fault tolerance, multimodal, tool and knowledge support, and actor-based distribution.

    Source: §1 · pp. 2–3
  • Results

    AgentScope brings together developer-facing programming and monitoring tools with fault-tolerant operations, multimodal interactions, and local-to-distributed deployment support.

    Source: §1 · pp. 2–3, §11 · p. 30
  • Takeaways & Limitations

    The platform is presented as lowering barriers to multi-agent application development through developer utilities and integrated system support.

    Source: §1 · p. 2, §11 · p. 30

    Some errors, such as expired or unauthorized LLM API keys, cannot be resolved by the system without human intervention.

    Source: §4 · p. 13

Abstract

from arXiv · show

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. The abundant syntactic tools, built-in agents and service functions, user-friendly interfaces for application demonstration and utility monitor, zero-code programming workstation, and automatic prompt tuning mechanism significantly lower the barriers to both development and deployment. Towards robust and flexible multi-agent application, AgentScope provides both built-in and customizable fault tolerance mechanisms. At the same time, it is also armed with system-level support for managing and utilizing multi-modal data, tools, and external knowledge. 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. We have released AgentScope at https://github.com/modelscope/agentscope, and hope AgentScope invites wider participation and innovation in this fast-moving field.

1 Introduction

Multi-agent development must coordinate agents with different roles, workflows, and communication patterns while addressing LLM errors and the complexity of integrating tools, multimodal data, knowledge, and distributed execution. AgentScope is a developer-oriented platform that combines message exchange with usability, fault-tolerance, integration, and distribution support.

1 Introduction

  • Multi-agent applications require coordination among agents with different roles, standardized or dynamic workflows, and one-to-one or broadcast communication, making platform versatility and ease of use challenging to balance.The section also identifies LLM hallucinations, instruction-following problems, and tool uncertainties as sources of errors that can propagate through a system.Source: §1 · pp. 1–2
  • Integrating multimodal data, tools, and external knowledge requires coordinated support for data handling, tool invocation, and knowledge sharing, while distributed development adds programming and debugging burdens.The section notes that general platform-level programming interfaces for these integrated capabilities remain absent in existing specialized systems.Source: §1 · p. 2
  • Built-in retries, rule-based response correction, customizable fault-tolerance settings, and logging address errors, though some failures remain unhandled.Developers can configure parse_func, fault_handler, and max_retries.Source: §1 · p. 3
  • Multimodal data, service functions for tools, and configurable knowledge-processing modules provide platform support for agents using diverse information and capabilities.Multimodal support spans conversation, message transmission, and storage; knowledge modules cover RAG preprocessing through customizable retrieval.Source: §1 · p. 3
  • An actor-based distribution mechanism supports centralized programming of distributed workflows, automatic parallel optimization, and the same workflow for local and distributed deployments.The paper describes migration overhead between centralized and distributed environments as negligible.Source: §1 · p. 3
  • AgentScope combines message exchange with programming utilities, a zero-code workstation, and automatic prompt tuning to support multi-agent application development.Its syntactic features include pipelines and information sharing, alongside built-in agents, services, and user-interaction modules.Source: §1 · pp. 2–3

2 Overview

AgentScope organizes multi-agent applications around messages, agents, services, and workflows, with a layered architecture and interfaces for programming and monitoring. The abstractions cover agent communication and execution as well as resource management and developer interaction.

2.1 Basic Concepts in AgentScope

  • Messages carry an agent name and content, with an optional URL for multimodal data; agents use reply and observe functions to respond to or process incoming messages.Messages receive an autogenerated UUID and timestamp for traceability.Source: §2.1 · p. 4
  • Workflows represent ordered agent executions and message exchanges, while service functions return formatted responses and tools prepare those functions for LLM invocation.Workflows can include non-DAG structures; tools add functionality descriptions and necessary input parameters.Source: §2.1 · pp. 4–5

2.2 Architecture of AgentScope

  • Three architecture layers cover agent utilities, resource and API management, and agent-level to workflow-level programming interfaces.The platform also provides mechanisms and interfaces for resilience against faults across layers.Source: §2.2 · pp. 5–6
  • User interfaces include an annotated terminal, Web UI monitoring, a one-step Gradio interface, and a drag-and-drop zero-code workstation for viewing communication, execution timing, and costs.These interfaces complement the layered architecture.Source: §2.2 · pp. 5–6

3 High Usability

AgentScope targets developers with varying expertise by packaging multi-agent development into workflow abstractions, ready-made resources, interfaces, graphical composition, and prompt assistance.

3.1 Syntactic Sugar for Multi-Agent Workflows

  • Pipelines package sequential, conditional, and iterative message exchanges into reusable components, while message hubs automatically broadcast new participant messages.Source: §3.1 · pp. 6–7

3.2 Resource-Rich Environment for Agent Development

  • Built-in agents, services, and examples reduce setup for prototyping; service functions expose web search, database querying, and code execution to agents.Source: §3.2 · pp. 7–8

3.3 Multi-Agent Oriented Demonstration Interfaces

  • Multi-agent interfaces distinguish agent viewpoints and present multimodal interaction, while monitoring tracks API/model use and costs with customizable metrics, budgets, and alerts.Source: §3.3 · pp. 8–9

3.4 Towards Graphical Application Development

  • Drag-and-drop DAGs can run from JSON in topological order or compile into Python, enabling no-code composition and customizable code drafts.Source: §3.4 · pp. 10–11

3.5 Automatic Prompt Tuning

  • AgentScope generates system prompts from brief agent descriptions, supports manual or context-based updates, and offers configurable in-context demonstrations matched randomly or by question/answer similarity.Source: §3.5 · pp. 11–12

4 Fault-Tolerant Mechanisms

AgentScope layers retries, rule-based repair, customizable handlers, and agent-level critique across error types, while unsolvable failures may still require human intervention.

4 Fault-Tolerant Mechanisms

  • AgentScope distinguishes temporary accessibility failures, rule-resolvable format errors, model-resolvable content errors, and unresolvable failures such as expired API keys.Unresolvable errors cannot be handled without human intervention.Source: §4 · pp. 12–13
  • Retries address temporary service disruptions, while rule-based tools repair common formatting errors without another LLM API call.The built-in rules can complete unmatched braces and extract JSON data from strings.Source: §4 · p. 13
  • Developers can configure parsing, fault handling, and retry limits, with handlers addressing rule-resolvable and some single-agent model-resolvable errors.The configurable parameters are parse_func, fault_handler, and max_retries.Source: §4 · p. 13
  • For semantic errors that evade basic validation, developers can use memory and the message hub for self-, pairwise, or human-augmented critique.Examples include factual inaccuracy, logical inconsistency, and contextual incoherence.Source: §4 · p. 13
  • For unsolved errors, AgentScope provides conversation-level CHAT logs, execution details, and a WebUI to help developers monitor and identify problems.The logging system is intended to support developer diagnosis when errors are too difficult for the system to handle.Source: §4 · p. 13

5 Multi-Modal Applications

AgentScope manages multimodal data through a URL-based architecture that decouples transmission from storage, and supports model-based generation, agent sharing, and user interaction.

5 Multi-Modal Applications

  • Figure 5 depicts a multimodal-data lifecycle spanning generation, storage, and transmission, including data from users or models, retrieval, and sharing.The architecture uses URLs and a local file manager.Source: Figure 5 · p. 14, §5 · p. 14
  • Developers can use local files or integrate multimodal models such as DALL-E and GPT-4V, with modular wrappers for custom services.The paper describes both text-to-image generation and image-to-text analysis models.Source: §5 · p. 14
  • Agents share multimodal data by placing local or remote URLs in messages, allowing receivers to load data when ready to process it.This can reduce message size, enable on-demand loading, and let downstream agents process accompanying text in parallel.Source: §5 · p. 14
  • Terminal and web interfaces let users access locally stored multimodal content, while AgentScope supports developers in tailoring services and wrappers for diverse modalities.The web UI supports viewing and analyzing multimodal content.Source: §5 · pp. 14–15

6 Tool Usage

AgentScope’s ReAct-based service toolkit prepares functions and instructions, iterates between LLM reasoning and tool execution, and lets experienced developers customize instructions and response parsers.

6 Tool Usage

  • The ReAct-based toolkit iterates between LLM reasoning and action, executing selected functions or returning parsing and execution errors for correction.Other runtime errors are left to developers.Source: §6 · pp. 15–16, Figure 6 · p. 16
  • Developers register service functions with preset arguments; the toolkit produces ready-to-use functions and JSON-schema descriptions, while templates specify tool instructions and calling formats.The calling format uses a JSON dictionary in a Markdown fenced code block with thought, speak, and function fields.Source: §6 · p. 15
  • The task-independent toolkit can be adapted across scenarios by constructing prompts with tool instructions and calling-format instructions.The service toolkit manages preprocessing, prompt engineering, response parsing, and function execution.Source: §6 · p. 15

6.1 Customization for Experienced Developers

  • Experienced developers can customize tool instructions from JSON-schema descriptions and choose Markdown, JSON, or tagged-content parsers for response formats.Tagged contents allow multiple fields to be extracted into a Python dictionary.Source: §6.1 · p. 16, Figure 7 · p. 17

7 Agents with Retrieval-Augmented Generation

AgentScope’s RAG support organizes reusable knowledge objects for multi-agent applications and provides configurable workflows for loading, updating, and combining retrieved knowledge.

7 Agents with Retrieval-Augmented Generation

  • AgentScope abstracts RAG processes to support frameworks such as LlamaIndex and LangChain in multi-agent applications.A RAG agent can be configured with a knowledge bank and then used like other AgentScope agents.Source: §7 · pp. 17–18
  • A single JSON configuration groups RAG-service settings, simplifying setup for a workflow with multiple knowledge bases.The configuration can be exported from the AgentScope Workstation and loaded in Python programs.Source: §7 · p. 17
  • Knowledge banks avoid repeating index computation across agents by collecting reusable knowledge containers, or RAG objects.Each object is associated with document indexes, a retriever, and other attributes.Source: §7 · p. 18
  • Agents can load selected RAG objects, update knowledge by inserting, deleting, or replacing pieces, and monitor directories to keep objects current.Agents may load original objects or copies; modifying an original may affect all agents using it.Source: §7 · p. 18
  • Developers can customize how results from multiple RAG objects are fused, assign source weights, and configure repeated query reformulation.The paper notes that knowledge sources may differ in importance or trustworthiness.Source: §7 · p. 18

8 Actor-based Distributed Framework

AgentScope's actor-based distributed mode pairs dynamic LLM workflows with automatic parallel optimization and procedural programming, while supporting local and distributed agents.

Actor-based distributed mode

  • AgentScope supports parallel optimization without static graphs and simplifies workflow programming to one procedural style within a Python function.This design is presented as a fit for dynamic LLM workflows whose computational paths can change with context and dialogue state.Source: §8 · pp. 19–20
  • Hybrid local and distributed agents require no implementation distinction, while agent servers and AgentScope Studio support remote deployment and management.The server initializes remote agents; Studio gathers messages and lets developers manage agent servers.Source: §8 · pp. 20–21
  • Each agent computes only after its required messages arrive, enabling automatic parallel optimization.The actor model treats each agent as a stand-alone entity that computes upon receiving the necessary messages.Source: §8 · p. 20
  • Placeholder messages let the main process continue without blocking while retaining information for later retrieval; control-flow decisions temporarily block until actual values are available.This distinction supports workflows with variable LLM outputs while preserving control-flow continuity.Source: §8 · p. 20

9 Signature Applications of AgentScope

AgentScope illustrates its capabilities through basic and group conversations, a werewolf game, distributed deployments, and a RAG-based copilot.

9.1 Dialog Agents: Basic Conversation

  • Basic conversation uses UserAgent and DialogAgent for user input and LLM responses, with sequential or loop pipelines available to structure interactions.The example also introduces model configuration and the message-exchange flow used in AgentScope applications.Source: §9.1 · p. 21

9.2 Dialog Agents: Group Conversation with Mentions

  • Group conversations add @mentions for selecting an agent, while the message hub supports sharing public information and broadcasting to the group.The conversation can end when a timeout is reached or the user types “exit”.Source: §9.2 · p. 21

9.3 Dialog Agents: The Werewolf Game

  • The werewolf example implements a six-player, two-team role-play game using group conversations, with phase-specific discussions and an agreement attribute for werewolf decisions.The game ends when all werewolves are eliminated or their number equals or exceeds the villagers; discussion is bounded by a maximum round count.Source: §9.3 · p. 22

9.4 Distributed Deployed Agents

  • AgentScope supports single-machine multi-process and multi-machine multi-process deployments, converting agents with minimal configuration changes and no workflow modification.The single-machine multi-process mode is optimized for parallel execution; the multi-machine mode connects to remote agents through specified URLs and ports.Source: §9.4 · pp. 23–24

9.5 RAG Agents: AgentScope Copilot

  • The AgentScope copilot uses LlamaIndex-based RAG agents loaded with external knowledge, routing user queries to mentioned agents or a guide agent that selects a responder.Agent configuration can specify storage directories, file types, chunking, indexing, and embedding settings.Source: §9.5 · p. 24

9.6 Web Search and Retrieve Agents

The examples extend AgentScope to web search and retrieval, tool-using NL2SQL agents, and a graphical workstation for building applications.

9.6 Web Search and Retrieve Agents

  • Web-search applications use a SearcherAgent to retrieve webpages and AnswererAgents to compose answers; multiple AnswererAgent instances can run in parallel across machines.The SearcherAgent turns questions into keywords, and the AnswererAgent retrieves information from returned pages.Source: §9.6 · p. 25

9.7 ReAct Agents: Convert Natural Language to SQL Query

  • For NL2SQL, a ReAct agent combines the DAIL-SQL text-to-SQL prompt generator with a SQL execution service to answer natural-language questions using a database.The example configures the database and defines tools for generating and executing SQL queries.Source: §9.7 · p. 26

9.8 AgentScope Workstation

  • Workstation lets users build applications by connecting agent modules without writing code, and supports static configuration checks, JSON export, or compilation to editable Python.The paper presents it as accessible to entry-level developers and people without programming experience.Source: §9.8 · p. 27

10 Related Works

Related work spans frameworks for individual language agents and for collaboration among multiple agents. AgentScope is positioned as a user-friendly, fault-tolerant, versatile framework for complex multi-agent interactions.

Language Agent Frameworks

  • Transformers-Agents offers customizable tools for instruction interpretation and code generation, while LangChain integrates components and LangServe and LangSmith support deployment and debugging.AutoGPT is described as a generalist agent for varied computer-based tasks, and ModelScope-Agent connects open-source LLMs with external APIs.Source: §10 · pp. 28–29

Multi-Agent Frameworks

  • AutoGen programs interaction patterns in natural language and code, while MetaGPT encodes Standardized Operating Procedures in prompts to streamline workflows and reduce errors.AGENTS supports planning, memory, and multi-agent communication; OpenAgents offers practical agent functions through a web interface.Source: §10 · p. 29
  • ChatDev organizes software-development agents around a waterfall model, while CAMEL uses role-playing for autonomous cooperation and conversational-data generation.AgentSims provides a sandbox for evaluating LLMs in task-based scenarios.Source: §10 · p. 29
  • AgentScope addresses complex multi-agent interactions with a user-friendly, fault-tolerant, and versatile framework.The paper situates it among frameworks for individual language agents and multi-agent collaboration.Source: §10 · pp. 28–29

11 Conclusion

The conclusion presents AgentScope as a user-centric platform for multi-agent development. It highlights communication and distribution mechanisms, fault tolerance, multimodal interactions, and development utilities as ways to lower barriers to entry.

11 Conclusion

  • AgentScope combines user-centric design with communication and distribution mechanisms for multi-agent system development.The conclusion links these mechanisms to collaboration, fault-tolerant operations, and multimodal interactions.Source: §11 · p. 30
  • AgentScope abstracts development complexities and offers utilities intended to lower barriers to entry and foster a broader developer community.The conclusion invites research and development on retrieval-augmented generation, adaptive communication protocols, and interactive modals.Source: §11 · p. 30

A Running Example of Standalone Conversation

The running example shows a standalone conversation about large language models, moving from a request for information to questions about models and their risks.

A Running Example of Standalone Conversation

  • The example begins with a user asking to learn about large language models and the assistant describing them as text-trained models that understand and generate human-like text.The exchange is labeled a running example of standalone conversation.Source: A Running Example of Standalone… · p. 34
  • In response to questions about other models, the assistant lists BERT, T5, RoBERTa, XLNet, Turing-NLG, and Megatron with brief descriptions.The descriptions include BERT's use of surrounding context and T5's treatment of NLP problems as text generation.Source: A Running Example of Standalone… · p. 34
  • When asked what to know about LLMs, the assistant calls them powerful text-generating tools and flags potential harmful or biased content.The user then thanks the assistant, closing the exchange.Source: A Running Example of Standalone… · p. 34

B Running Example of Werewolf

This section uses Werewolf as a running example to present role-specific prompts, structured responses, discussion, and voting across game phases, including the use of private role information. In the final vote, players target Player2 based on earlier suspicion and perceived alignment with Player1; Player2 is voted out, and the village wins.

B Running Example of Werewolf

  • Werewolf teammates discuss potential targets, record whether they agree, and then submit a kill vote in the requested JSON format.The sample pair considers Player3 and Player4 before agreeing on Player3.Source: B Running Example of Werewolf · pp. 34–35
  • The moderator prompts the witch about resurrecting an eliminated player and the seer to check another player, then reports roles and the night’s outcome.In the sample, the witch is asked about Player3, the seer checks a player, and the moderator later reveals Player1’s werewolf role and a peaceful night.Source: B Running Example of Werewolf · p. 35
  • During the day, alive players debate suspicions, may reveal their roles, and cast JSON-formatted votes; the moderator announces Player1 is voted out.The dialogue includes competing suspicions about Player4 and Player1, plus a request for each player’s thought and speech.Source: B Running Example of Werewolf · pp. 35, 37
  • The sample continues after Player1’s vote-out: Player2 is revealed as a werewolf, Player4 is eliminated overnight, and the remaining players resume discussion.Player3 reasons from the prior events that Player2 may be a werewolf.Source: B Running Example of Werewolf · pp. 36–37
Loading 2402.14034v2…