agentscope-ai /agentscope
Build and run agents you can see, understand and trust.
★ 36,046⑂ 3,861👁 161⑃ 2,266● 1,602▤ 51
+48
日增长
+387
周增长
36,046
stars
3,861
forks
161
watchers
2,266
prs
1,602
issues
51
releases
README
English Homepage | 文档 | 路线图
What's AgentScope 2.0?
AgentScope 2.0 是一款面向生产、易于使用的智能体框架,提供与不断进化的模型能力相匹配的核心抽象。
AgentScope 的目标是充分发挥大模型的推理与工具调用能力,
而非用严格的提示词和固化的编排方式来束缚它们。
新闻
- [2026-10] 功能: 支持音色配置管理与语音复刻,可在聊天中选择已保存的音色;Python SDK 新增 DashScope 和 OpenAI 音色复刻客户端。
- [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] 功能 实验性: 支持实时语音智能体。样例 | 文档
更多新闻 →
社区
欢迎加入我们的社区
| 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(),
Top issues
#2707[Bug]: streamed Base64 accumulation repeatedly transcodes the full payload20 comments · 2026-09-20#1120[human in loop]how to interrupt the agent flow and give a confirm/new information to the agent to continue the flow when coding by fastapi?18 comments · 2026-01-15#926[Feature]: human in loop wanted17 comments · 2025-11-12#3194[Bug]: Provider length-limit stop reasons are lost, so incomplete tool calls may run16 comments · 2026-10-09#2566feat(realtime): support context management for the realtime agent15 comments · 2026-09-09#2151[Bug]: context-compression LLM call's token usage is never recorded anywhere12 comments · 2026-07-22#1695如何为ReActAgent提供一套友好的web ui12 comments · 2026-05-26#2481feat(rag): support RAGFlow in a new `RAGFlowKnowledgeBase` class rather than VDB11 comments · 2026-09-01
Discussions
#4054Add a coding-agent evaluation example?0 comments · 2026-11-15#4045Chopper: a small open model that cuts only the needed sentences out of retrieved text0 comments · 2026-11-15#4019Task-scoped delegation and recoverable joins for App session teams0 comments · 2026-11-14#4012A public collaboration layer for agents: JIC Map / World + live chat1 comments · 2026-11-13#3984Support verified GoalPipeline subworkflows as TeamPipeline members1 comments · 2026-11-13#3979feat(workspace): add boxd as a sandboxed workspace backend0 comments · 2026-11-12#3917Expose FastAPI 0.162 telemetry settings in create_app1 comments · 2026-11-10#3832Proposal: add a DebatePipeline (independent answers -> cross-examination -> judge synthesis)0 comments · 2026-11-08
Latest release
v2.0.11 v2.0.11 2026-10-27What'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