Skip to main content

AgentScope: A Flexible yet Robust Multi-Agent Platform.

Project description

AgentScope Logo

中文主页 | Tutorial | Roadmap (Jan 2026 -) | FAQ

arxiv pypi pypi discord docs license

modelscope%2Fagentscope | Trendshift

What is AgentScope?

AgentScope is a production-ready, easy-to-use agent framework with essential abstractions that work with rising model capability and built-in support for finetuning.

We design for increasingly agentic LLMs. Our approach leverages the models' reasoning and tool use abilities rather than constraining them with strict prompts and opinionated orchestrations.

Why use AgentScope?

  • Simple: start building your agents in 5 minutes with built-in ReAct agent, tools, skills, human-in-the-loop steering, memory, planning, realtime voice, evaluation and model finetuning
  • Extensible: large number of ecosystem integrations for tools, memory and observability; built-in support for MCP and A2A; message hub for flexible multi-agent orchestration and workflows
  • Production-ready: deploy and serve your agents locally, as serverless in the cloud, or on your K8s cluster with built-in OTel support


The AgentScope Ecosystem

News

  • [2026-02] FEAT: Realtime Voice Agent support. Example | Multi-Agent Realtime Example | Tutorial
  • [2026-01] COMM: Biweekly Meetings launched to share ecosystem updates and development plans - join us! Details & Schedule
  • [2026-01] FEAT: Database support & memory compression in memory module. Example | Tutorial
  • [2025-12] INTG: A2A (Agent-to-Agent) protocol support. Example | Tutorial
  • [2025-12] FEAT: TTS (Text-to-Speech) support. Example | Tutorial
  • [2025-11] INTG: Anthropic Agent Skill support. Example | Tutorial
  • [2025-11] RELS: Alias-Agent for diverse real-world tasks and Data-Juicer Agent for data processing open-sourced. Alias-Agent | Data-Juicer Agent
  • [2025-11] INTG: Agentic RL via Trinity-RFT library. Example | Trinity-RFT
  • [2025-11] INTG: ReMe for enhanced long-term memory. Example
  • [2025-11] RELS: agentscope-samples repository launched and agentscope-runtime upgraded with Docker/K8s deployment and VNC-powered GUI sandboxes. Samples | Runtime

More news →

Community

Welcome to join our community on

Discord DingTalk

📑 Table of Contents

Quickstart

Installation

AgentScope requires Python 3.10 or higher.

From PyPI

pip install agentscope

Or with uv:

uv pip install agentscope

From source

# Pull the source code from GitHub
git clone -b main https://github.com/agentscope-ai/agentscope.git

# Install the package in editable mode
cd agentscope

pip install -e .
# or with uv:
# uv pip install -e .

Example

Hello AgentScope!

Start with a conversation between user and a ReAct agent 🤖 named "Friday"!

from agentscope.agent import ReActAgent, UserAgent
from agentscope.model import DashScopeChatModel
from agentscope.formatter import DashScopeChatFormatter
from agentscope.memory import InMemoryMemory
from agentscope.tool import Toolkit, execute_python_code, execute_shell_command
import os, asyncio


async def main():
    toolkit = Toolkit()
    toolkit.register_tool_function(execute_python_code)
    toolkit.register_tool_function(execute_shell_command)

    agent = ReActAgent(
        name="Friday",
        sys_prompt="You're a helpful assistant named Friday.",
        model=DashScopeChatModel(
            model_name="qwen-max",
            api_key=os.environ["DASHSCOPE_API_KEY"],
            stream=True,
        ),
        memory=InMemoryMemory(),
        formatter=DashScopeChatFormatter(),
        toolkit=toolkit,
    )

    user = UserAgent(name="user")

    msg = None
    while True:
        msg = await agent(msg)
        msg = await user(msg)
        if msg.get_text_content() == "exit":
            break

asyncio.run(main())

Voice Agent

Create a voice-enabled ReAct agent that can understand and respond with speech, even playing a multi-agent werewolf game with voice interactions.

https://github.com/user-attachments/assets/c5f05254-aff6-4375-90df-85e8da95d5da

Realtime Voice Agent

Build a realtime voice agent with web interface that can interact with users via voice input and output.

Realtime chatbot | Realtime Multi-Agent Example

https://github.com/user-attachments/assets/1b7b114b-e995-4586-9b3f-d3bb9fcd2558

Human-in-the-loop

Support realtime interruption in ReActAgent: conversation can be interrupted via cancellation in realtime and resumed seamlessly via robust memory preservation.

Realtime Steering

Flexible MCP Usage

Use individual MCP tools as local callable functions to compose toolkits or wrap into a more complex tool.

from agentscope.mcp import HttpStatelessClient
from agentscope.tool import Toolkit
import os

async def fine_grained_mcp_control():
    # Initialize the MCP client
    client = HttpStatelessClient(
        name="gaode_mcp",
        transport="streamable_http",
        url=f"https://mcp.amap.com/mcp?key={os.environ['GAODE_API_KEY']}",
    )

    # Obtain the MCP tool as a **local callable function**, and use it anywhere
    func = await client.get_callable_function(func_name="maps_geo")

    # Option 1: Call directly
    await func(address="Tiananmen Square", city="Beijing")

    # Option 2: Pass to agent as a tool
    toolkit = Toolkit()
    toolkit.register_tool_function(func)
    # ...

    # Option 3: Wrap into a more complex tool
    # ...

Agentic RL

Train your agentic application seamlessly with Reinforcement Learning integration. We also prepare multiple sample projects covering various scenarios:

Example Description Model Training Result
Math Agent Tune a math-solving agent with multi-step reasoning. Qwen3-0.6B Accuracy: 75% → 85%
Frozen Lake Train an agent to navigate the Frozen Lake environment. Qwen2.5-3B-Instruct Success rate: 15% → 86%
Learn to Ask Tune agents using LLM-as-a-judge for automated feedback. Qwen2.5-7B-Instruct Accuracy: 47% → 92%
Email Search Improve tool-use capabilities without labeled ground truth. Qwen3-4B-Instruct-2507 Accuracy: 60%
Werewolf Game Train agents for strategic multi-agent game interactions. Qwen2.5-7B-Instruct Werewolf win rate: 50% → 80%
Data Augment Generate synthetic training data to enhance tuning results. Qwen3-0.6B AIME-24 accuracy: 20% → 60%

Multi-Agent Workflows

AgentScope provides MsgHub and pipelines to streamline multi-agent conversations, offering efficient message routing and seamless information sharing

from agentscope.pipeline import MsgHub, sequential_pipeline
from agentscope.message import Msg
import asyncio

async def multi_agent_conversation():
    # Create agents
    agent1 = ...
    agent2 = ...
    agent3 = ...
    agent4 = ...

    # Create a message hub to manage multi-agent conversation
    async with MsgHub(
        participants=[agent1, agent2, agent3],
        announcement=Msg("Host", "Introduce yourselves.", "assistant")
    ) as hub:
        # Speak in a sequential manner
        await sequential_pipeline([agent1, agent2, agent3])
        # Dynamic manage the participants
        hub.add(agent4)
        hub.delete(agent3)
        await hub.broadcast(Msg("Host", "Goodbye!", "assistant"))

asyncio.run(multi_agent_conversation())

Documentation

More Examples & Samples

Functionality

Agent

Game

Workflow

Evaluation

Tuner

Contributing

We welcome contributions from the community! Please refer to our CONTRIBUTING.md for guidelines on how to contribute.

License

AgentScope is released under Apache License 2.0.

Publications

If you find our work helpful for your research or application, please cite our papers.

@article{agentscope_v1,
    author  = {Dawei Gao, Zitao Li, Yuexiang Xie, Weirui Kuang, Liuyi Yao, Bingchen Qian, Zhijian Ma, Yue Cui, Haohao Luo, Shen Li, Lu Yi, Yi Yu, Shiqi He, Zhiling Luo, Wenmeng Zhou, Zhicheng Zhang, Xuguang He, Ziqian Chen, Weikai Liao, Farruh Isakulovich Kushnazarov, Yaliang Li, Bolin Ding, Jingren Zhou}
    title   = {AgentScope 1.0: A Developer-Centric Framework for Building Agentic Applications},
    journal = {CoRR},
    volume  = {abs/2508.16279},
    year    = {2025},
}

@article{agentscope,
    author  = {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}
    title   = {AgentScope: A Flexible yet Robust Multi-Agent Platform},
    journal = {CoRR},
    volume  = {abs/2402.14034},
    year    = {2024},
}

Contributors

All thanks to our contributors:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentscope-1.0.16.tar.gz (277.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentscope-1.0.16-py3-none-any.whl (392.3 kB view details)

Uploaded Python 3

File details

Details for the file agentscope-1.0.16.tar.gz.

File metadata

  • Download URL: agentscope-1.0.16.tar.gz
  • Upload date:
  • Size: 277.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentscope-1.0.16.tar.gz
Algorithm Hash digest
SHA256 3ee4fa4059ff122e18a37daf3280db4ca84d11cbbfc8c7ee295e82af5e26a3b7
MD5 7e85337b7010071db811dfa5efd99cb4
BLAKE2b-256 8c36648a0a54a20fa64be0eb9fa8bf8e1951a6ba03afaedd1f5f4abc0578f25d

See more details on using hashes here.

File details

Details for the file agentscope-1.0.16-py3-none-any.whl.

File metadata

  • Download URL: agentscope-1.0.16-py3-none-any.whl
  • Upload date:
  • Size: 392.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentscope-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 9c5c9c4cde806d5a986e7682b5609631d755e550db96abe2ace5703d25eb247d
MD5 ab5df8ba7dc20bcdef6a00e98fbb80ee
BLAKE2b-256 6dc0ebd4cce260d49ef0d7face5b369860f2c2e0321bb2837730074ad7ee1bed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page