agentscope-ai /agentscope

Build and run agents you can see, understand and trust.

★ 35,728⑂ 3,833👁 159⑃ 2,150● 1,530▤ 51◈ 150
PythonApache-2.0Created 2024-01-12docs.agentscope.io/
35,728
stars
+69
3,833
forks
159
watchers
2,150
prs
1,530
issues
51
releases
150
discussions

README

English Homepage | 文档 | 路线图




    
        
    
    
        
    
    
        
    
    
      
  
    
        
    
    
        
    
    
        
    






 What's AgentScope 2.0?

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

AgentScope 的目标是充分发挥大模型的推理与工具调用能力,
而非用严格的提示词和固化的编排方式来束缚它们。



 新闻

- [2026-10] 功能 实验性: 智能体服务支持基于 WebRTC 的实时语音对话,文本与语音模式共享同一会话历史。
- [2026-09] 功能 实验性: 支持 SOP(标准作业流程)—— 将多步骤任务按标准流程执行,框架与智能体服务均已支持。文档 | 服务
- [2026-09] 功能: 支持 TeamPipeline —— 由 leader 智能体向成员智能体分派任务。文档
- [2026-09] 集成: 通过 MiniMaxChatModel 支持 MiniMax 聊天模型(默认 MiniMax-M3)。
- [2026-09] 功能: 支持模型路由 —— 使用 ModelRouterMiddleware 为每次回复选择合适的聊天模型。
- [2026-09] 集成: 通过 TypeSafe SDK 集成 Jev 分类模型 JevClassifierModel。
- [2026-09] 功能: agentscope-skill 已适配 AgentScope v2。
- [2026-09] 集成: RealtimeAgent 支持 DashScope、OpenAI、Gemini 与 xAI 的实时语音 API。样例 | 文档
- [2026-09] 功能 实验性: 支持实时语音智能体。样例 | 文档
- [2026-09] 功能: 支持 A2A 协议 —— 通过 A2AAgent 与任意远端 A2A 智能体对话。样例 | 文档


更多新闻 →

 社区

欢迎加入我们的社区

| Discord                                                                                         | 钉钉                                                                        |
|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
|  |  |


 快速开始

 安装

 AgentScope 需要 Python 3.11 或更高版本。

 从 PyPI 安装

bash
uv pip install agentscope


 从源码安装

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

 以可编辑模式安装
cd agentscope

uv pip install -e .


 智能体(Agent)

SDK 层 —— 用一整套丰富的构建模块组合出你的智能体:

| 构建模块 | 包含内容 |
|---|---|
| ReAct | 推理-行动循环,支持结构化输出、实时中断与恢复、以及批量(顺序 / 并发)工具执行 |
| 工具集 | 智能体自主工具管理(囊括 Python 工具、MCP 与 Skill);内置编码工具(Shell、文件编辑、搜索)与任务/规划工具开箱即用 |
| 模型 | LLM、Embedding、TTS,覆盖主流厂商(OpenAI、Anthropic、Gemini、DashScope、DeepSeek、Moonshot、Volcengine、xAI、Ollama) |
| 上下文 | 自动压缩、工具结果卸载、以及上下文注入(系统提示、RAG、记忆),均由内置中间件实现 |
| 事件系统 | 统一事件总线,将推理、工具调用与多模态内容(文本、图像、音频)流式推送到前端 |
| 权限与 HITL | 对工具和资源的细粒度控制、确认、bypass 模式 |
| 中间件 | 贯穿整个循环的可组合钩子 —— 回复、推理、行动、模型调用、权限检查、上下文压缩、系统提示 |
| 记忆 | Agentic Memory,可切换后端(ReMe、Mem0) |
| 工作空间 / 沙箱 | 隔离工具与代码执行 —— local、Docker、Apple Container、Bubblewrap、E2B、OpenSandbox、Daytona、K8s |

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

python
from agentscope.agent import Agent
from agentscope.console import launch_console
from agentscope.tool import Toolkit, Bash, Grep, Glob, Read, Write, Edit
from agentscope.credential import DashScopeCredential
from agentscope.model import DashScopeChatModel

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

Top issues

Discussions

Latest release

v2.0.11 v2.0.11 2026-10-27
What's Changed
 fix(model): declare real WAV sizes in the final streamed audio block by @BlueX888 in https://github.com/agentscope-ai/agentscope/pull/3242
 fix(embedding): isolate Ollama embedding caches by host by @maahumada in https://github.com/agentscope-ai/agentscope/pull/3265
 fix(model): await provider stream cleanup on public aclose by @HsbcJone in https://github.com/agentscope-ai/agentscope/pull/3216
 fix(workspace): offload nested media from context archives by @wuyak in https://github.com/agentscope-ai/agentscope/pull/3201
 feat(tui): add right arrow key to switch questions in 

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON