MCPcopy
hub / github.com/agentscope-ai/agentscope

github.com/agentscope-ai/agentscope @v2.0.3 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.3 ↗
4,842 symbols 23,429 edges 565 files 3,725 documented · 77%
README

AgentScope Logo

English Homepage | 文档 | 路线图

<a href="https://arxiv.org/abs/2402.14034">
    <img
        src="https://img.shields.io/badge/cs.MA-2402.14034-B31C1C?logo=arxiv&logoColor=B31C1C"
        alt="arxiv"
    />
</a>
<a href="https://pypi.org/project/agentscope/">
    <img
        src="https://img.shields.io/badge/python-3.11+-blue?logo=python"
        alt="pypi"
    />
</a>
<a href="https://pypi.org/project/agentscope/">
    <img
        src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpypi.org%2Fpypi%2Fagentscope%2Fjson&query=%24.info.version&prefix=v&logo=pypi&label=version"
        alt="pypi"
    />
</a>
<a href="https://discord.gg/eYMpfnkG8h">
  <img
      src="https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white"
      alt="discord"
  />

docs license

agentscope-ai%2Fagentscope | Trendshift

什么是 AgentScope 2.0?

AgentScope 2.0 是一款面向生产、易于使用的智能体框架,提供与不断进化的模型能力相匹配的核心抽象。

我们为日益自主的大语言模型而设计。 我们的方法是充分发挥模型的推理与工具调用能力, 而不是用严格的提示词和固化的编排方式来束缚它们。

为什么选择 AgentScope?

  • 简单:通过内置的 ReAct 智能体、工具、技能、人机协作干预、记忆、计划、实时语音、评估和模型微调,5 分钟即可开始构建你的智能体
  • 可扩展:丰富的生态系统集成,覆盖工具、记忆和可观测性;内置 MCP 和 A2A 支持;通过消息中心(MsgHub)实现灵活的多智能体编排和工作流
  • 生产就绪:支持本地部署、云端 Serverless 部署或 K8s 集群部署,并内置 OTel 支持

agentscope

新闻

  • [2026-06] 功能: 支持分布式 & 多租户 & 多会话 RAG 服务。 文档
  • [2026-06] 功能: 支持多模态 RAG。 样例 | 文档
  • [2026-06] 集成: 集成 Mem0 长期记忆。 Example | Docs
  • [2026-06] 功能: 支持 Agent Team。样例 | 文档
  • [2026-05] 发布: AgentScope 2.0 已发布!文档

更多新闻 →

社区

欢迎加入我们的社区

Discord 钉钉

📑 Table of Contents

快速开始

安装

AgentScope 需要 Python 3.11 或更高版本。

从 PyPI 安装

uv pip install agentscope
# 或者
# pip install agentscope

从源码安装

# 从 GitHub 拉取源码
git clone -b main https://github.com/agentscope-ai/agentscope.git

# 以可编辑模式安装
cd agentscope

uv pip install -e .
# 或者
# pip install -e .

Hello AgentScope!

使用 AgentScope 2.0,启动你的第一个智能体:

from agentscope.agent import Agent
from agentscope.tool import Toolkit, Bash, Grep, Glob, Read, Write, Edit
from agentscope.credential import DashScopeCredential
from agentscope.model import DashScopeChatModel
from agentscope.message import UserMsg
from agentscope.event import EventType

import os, asyncio


async def main() -> None:
    agent = Agent(
        name="Friday",
        system_prompt="You're a helpful assistant named Friday.",
        model=DashScopeChatModel(
            credential=DashScopeCredential(
              api_key=os.environ["DASHSCOPE_API_KEY"]
            ),
            model="qwen3.6-plus",
        ),
        toolkit=Toolkit(
            tools=[
                Bash(),
                Grep(),
                Glob(),
                Read(),
                Write(),
                Edit(),
            ]
        ),
    )

    async for evt in agent.reply_stream(UserMsg("Tony", "Hi, Friday!")):
        # 处理事件流,例如打印消息、更新 UI 等
        match evt.type:
            case EventType.REPLY_START:
                ...
            case EventType.MODEL_CALL_START:
                ...
            case EventType.TEXT_BLOCK_START:
                ...
            case EventType.TEXT_BLOCK_DELTA:
                ...
            case EventType.TEXT_BLOCK_END:
                ...

            # 处理其他事件类型

asyncio.run(main())

智能体服务

一个基于 FastAPI 的可扩展多租户多会话智能体服务,并在 examples/web_ui 中提供预构建的 Web UI

智能体团队 智能体团队 —— leader 智能体派生 worker,并通过内置的团队工具进行协调。
任务规划 任务规划 —— 智能体将复杂工作拆解为可追踪的计划,并在执行过程中持续更新。
bypass 模式下的权限控制 bypass 模式下的权限控制 —— 智能体端到端运行,无需为工具调用确认而暂停。
后台任务卸载 工具后台执行 —— 长时间运行的工具被转入后台;其结果稍后唤醒智能体并恢复对话。

运行以下命令启动智能体服务后端和 Web UI:

git clone -b main https://github.com/agentscope-ai/agentscope.git
cd agentscope/examples/agent_service

# 启动智能体服务后端
python main.py

然后打开另一个终端启动 Web UI:

cd agentscope/examples/web_ui

# 启动 webui
pnpm install
pnpm dev

贡献

我们欢迎社区的贡献!请参阅我们的 贡献指南 了解如何贡献。

许可

AgentScope 基于 Apache License 2.0 发布。

论文

如果我们的工作对您的研究或应用有帮助,请引用我们的论文。

@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},
}

贡献者

感谢所有贡献者:

Extension points exported contracts — how you extend this code

ProcessedFile (Interface)
* Represents a file that has been selected and processed (or is being processed).
examples/web_ui/frontend/src/components/chat/TextInput.tsx
UploadContextValue (Interface)
* Public contract the surrounding app sees. Exposed via the React * context value.
examples/web_ui/frontend/src/context/UploadContext.tsx
UploadProviderRefs (Interface)
* Mutable side-state for XHR controllers and scheduling flags. * * Lazy-initialised inside `useRef` (the factory form)
examples/web_ui/frontend/src/context/UploadContext.tsx
PollingInput (Interface)
* Document ids the polling loop should track each tick. Combines: * * - documents the local `UploadProvider` is still
examples/web_ui/frontend/src/hooks/useDocumentStatusPolling.ts
DiffOptions (Interface)
(no doc)
examples/web_ui/frontend/src/types/unidiff.d.ts

Core symbols most depended-on inside this repo

Field
called by 449
examples/web_ui/frontend/src/components/ui/field.tsx
get
called by 388
src/agentscope/app/_manager/_chat_run_registry.py
cn
called by 186
examples/web_ui/frontend/src/lib/utils.ts
UserMsg
called by 169
src/agentscope/message/_base.py
AssistantMsg
called by 123
src/agentscope/message/_base.py
check_permission
called by 88
src/agentscope/permission/_engine.py
run
called by 83
src/agentscope/app/_service/_chat.py
stream_and_collect
called by 71
scripts/model_examples/_utils.py

Shape

Method 2,921
Function 885
Class 751
Interface 154
Route 131

Languages

Python87%
TypeScript13%

Modules by API surface

tests/permission_bash_parser_test.py103 symbols
tests/tts_dashscope_test.py84 symbols
tests/storage_redis_test.py80 symbols
examples/web_ui/frontend/src/api/types.ts73 symbols
tests/agui_protocol_test.py71 symbols
tests/service_message_bus_test.py69 symbols
tests/mem0_middleware_test.py65 symbols
tests/in_memory_message_bus_test.py63 symbols
tests/middleware_test.py59 symbols
src/agentscope/app/storage/_redis_storage.py57 symbols
tests/permission_mode_test.py55 symbols
tests/permission_engine_test.py55 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@eslint/js10.0.1 · 1×
@fontsource-variable/geist5.2.8 · 1×
@tailwindcss/typography0.5.19 · 1×
@tailwindcss/vite4.3.0 · 1×
@types/cors2.8.17 · 1×
@types/express4.17.21 · 1×
@types/mime-types3.0.1 · 1×
@types/node24.12.3 · 1×
@types/react19.2.14 · 1×
@types/react-dom19.2.3 · 1×
@vitejs/plugin-react6.0.1 · 1×

For agents

$ claude mcp add agentscope \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact