Skip to main content

AgentScope: A Flexible yet Robust Multi-Agent Platform.

Project description

中文主页 | Tutorial | Roadmap | FAQ

AgentScope Logo

AgentScope: Agent-Oriented Programming for Building LLM Applications

arxiv pypi pypi docs workstation license

modelscope%2Fagentscope | Trendshift

📢 News

  • [2025-11] AgentScope open-sources Alias-Agent for diverse real-world tasks and Data-Juicer Agent for data processing.
  • [2025-11] AgentScope supports Agentic RL via integrating Trinity-RFT library.
  • [2025-11] AgentScope integrates ReMe for enhanced long-term memory.
  • [2025-11] AgentScope launches agentscope-samples repository and upgrades agentscope-runtime with Docker/K8s deployment and VNC-powered GUI sandboxes.
  • [2025-11] Contributing Guide is online now! Welcome to contribute to AgentScope.
  • [2025-09] RAG module in AgentScope 1.0 is online now! Check our tutorial and example for more details.
  • [2025-09] Voice agent is online! ReActAgent supports Qwen-Omni and GPT-Audio natively now, check our new example and roadmap.
  • [2025-09] A new powerful 📋Plan module is online now! Check out the tutorial for more details.
  • [2025-09] AgentScope Runtime is open-sourced now! Enabling effective agent deployment with sandboxed tool execution for production-ready AI applications. Check out the GitHub repo.
  • [2025-09] AgentScope Studio is open-sourced now! Check out the GitHub repo.
  • [2025-08] The new tutorial of v1 is online now! Check out the tutorial for more details.
  • [2025-08] 🎉🎉 AgentScope v1 is released now! This version fully embraces the asynchronous execution, providing many new features and improvements. Check out changelog for detailed changes.

✨ Why AgentScope?

Easy for beginners, powerful for experts.

AgentScope Framework

  • Transparent to Developers: Transparent is our FIRST principle. Prompt engineering, API invocation, agent building, workflow orchestration, all are visible and controllable for developers. No deep encapsulation or implicit magic.
  • Realtime Steering: Native support for realtime interruption and customized handling.
  • More Agentic: Support agentic tools management, agentic long-term memory control and agentic RAG, etc.
  • Model Agnostic: Programming once, run with all models.
  • LEGO-style Agent Building: All components are modular and independent.
  • Multi-Agent Oriented: Designed for multi-agent, explicit message passing and workflow orchestration, NO deep encapsulation.
  • Highly Customizable: Tools, prompt, agent, workflow, third-party libs & visualization, customization is encouraged everywhere.

Quick overview of important features in AgentScope 1.0:

Module Feature Tutorial
model Support async invocation Model
Support reasoning model
Support streaming/non-streaming returns
tool Support async/sync tool functions Tool
Support streaming/non-streaming returns
Support user interruption
Support post-processing
Support group-wise tools management
Support agentic tools management by meta tool
MCP Support streamable HTTP/SSE/StdIO transport MCP
Support both stateful and stateless mode MCP Client
Support client- & function-level fine-grained control
agent Support async execution
Support parallel tool calls
Support realtime steering interruption and customized handling
Support automatic state management
Support agent-controlled long-term memory
Support agent hooks
tracing Support OpenTelemetry-based tracing in LLM, tools, agent and formatter Tracing
Support connecting to third-party tracing platforms (e.g. Arize-Phoenix, Langfuse)
memory Support long-term memory Memory
session Provide session/application-level automatic state management Session
evaluation Provide distributed and parallel evaluation Evaluation
formatter Support multi-agent prompt formatting with tools API Prompt Formatter
Support truncation-based formatter strategy
plan Support ReAct-based long-term planning Plan
Support manual plan specification
RAG Support agentic RAG RAG
Support multimodal RAG
...

💬 Contact

Welcome to join our community on

Discord DingTalk

📑 Table of Contents

🚀 Quickstart

💻 Installation

AgentScope requires Python 3.10 or higher.

🛠️ 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 .

🔄 Using uv (recommended for faster installs)

uv is a fast Python package installer and resolver, written in Rust.

# Clone the repository
git clone -b main https://github.com/agentscope-ai/agentscope.git
cd agentscope

# Install with uv
uv pip install -e .

📦 From PyPi

pip install agentscope

Or with uv:

uv pip install agentscope

📝 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())

🎯 Realtime Steering

Natively support realtime interruption in ReActAgent with robust memory preservation, and convert interruption into an observable event for agent to seamlessly resume conversations.

Realtime Steering Realtime Steering

🛠️ Fine-Grained MCP Control

Developers can obtain the MCP tool as a local callable function, and use it anywhere (e.g. call directly, pass to agent, wrap into a more complex tool, etc.)

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
    # ...

🧑‍🤝‍🧑 Multi-Agent Conversation

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())

💻 AgentScope Studio

Use the following command to install and start AgentScope Studio, to trace and visualize your agent application.

npm install -g @agentscope/studio

as_studio

home projects runtime friday

📖 Documentation

🤝 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.8.tar.gz (181.8 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.8-py3-none-any.whl (258.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentscope-1.0.8.tar.gz
  • Upload date:
  • Size: 181.8 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.8.tar.gz
Algorithm Hash digest
SHA256 9a5300f84d3328cf902338007b0ca20f514640940214413e76947d5c3dc15554
MD5 98e3efeeb757f501f7d25dde8f41e5ca
BLAKE2b-256 1d9a323fe9355c897a9fc339c9514efd1163bf70266660ee51040c19c62dfdea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentscope-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 258.0 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b08075b9b874d3f8d326879de2c75c82edae3e69385b6a8f8e655690f47b83a2
MD5 bcf6240b4e3e2f1d10ad34fe239d535c
BLAKE2b-256 54ae9b83a3685ecaf1ccbc682eb666dd3a4827354fefb0391f6e703a7ae63b6f

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