> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For AgentScope Python, use https://docs.agentscope.io/stable/en/index for new projects. For existing projects, check the installed agentscope version and use matching versioned documentation.
> The /latest/ alias points to the newest documentation and may move ahead of /stable/ when a development version exists. Do not mix AgentScope 1.x and 2.x APIs.
> State the AgentScope version when providing installation commands or code examples. ReMe uses its own continuously updated /reme/latest/ documentation.

# AgentScope 2.0 是什么？

> 更安全、更高效、更灵活、更完备

AgentScope 2.0 是对框架的一次重大升级，核心目标是提升开发体验，让智能体在生产环境中更易构建和运行。

> [!NOTE]
>
> AgentScope 2.0 与 1.0 存在破坏性变更，在核心抽象、API 和架构上均有大幅改进。建议现有用户迁移到 2.0，以享受新特性带来的提升。

2.0 带来了以下主要变化和改进：

* **事件系统**：智能体的每一步操作——文本输出、思考过程、工具调用、工具结果——都以类型化的流式事件暴露出来，无需额外适配器即可渲染丰富的响应式界面，并轻松接入 AG-UI 或 A2A。
* **执行安全**：危险的工具调用可被拦截或暂缓审查，不受信任的代码可在沙箱中运行——智能体不会悄悄操作宿主机或泄露凭据。
* **人工介入**：用户可以在运行中途确认或修改工具参数，敏感操作也可转交自定义后端处理，智能体会在暂停处精确恢复执行。
* **更高效率**：多工具步骤通过并发执行加速完成，长对话自动保持在上下文窗口内，超大工具输出不再撑爆提示词，模型提供商的短暂故障也能优雅回退。
* **工作区系统**：只需修改一行代码，就能将智能体从本地迁移到 Docker 或 E2B 沙箱，工作目录、MCP 客户端和技能集均按用户、智能体或会话独立隔离。
* **智能体服务**：通过 REST + SSE 托管任意智能体，支持多租户、多 Session 并发，内置可续传流、持久化会话、定时任务和凭据管理，无需自己搭建服务脚手架。

对于正在评估是否进行迁移的开发者，可以查阅 [Changelog](https://docs.agentscope.io/zh/versions/2.0.2/change-log.md) 了解每项变更的完整说明，帮助更好地规划迁移到 AgentScope 2.0 的计划。

> [card] [事件系统](https://docs.agentscope.io/zh/versions/2.0.2/building-blocks/message-and-event.md)
>
> 观测智能体的每一步操作，直接流式推送到界面。

> [card] [执行安全](https://docs.agentscope.io/zh/versions/2.0.2/building-blocks/permission-system.md)
>
> 在危险工具调用触达宿主机之前进行拦截或沙箱隔离。

> [card] [人工介入](https://docs.agentscope.io/zh/versions/2.0.2/building-blocks/message-and-event.md)
>
> 支持在执行前审核或修改工具参数，也可将敏感操作完全转交自定义后端处理。

> [card] [高效智能体](https://docs.agentscope.io/zh/versions/2.0.2/building-blocks/agent.md)
>
> 工具调用根据各工具的属性自动分批，并发或顺序执行——在保证正确性的前提下获得更高的吞吐效率。

> [card] [工作区系统](https://docs.agentscope.io/zh/versions/2.0.2/building-blocks/workspace.md)
>
> 无需重写智能体即可在本地、Docker 或 E2B 之间自由切换。

> [card] [智能体服务](https://docs.agentscope.io/zh/versions/2.0.2/deploy/agent-service.md)
>
> 通过 REST + SSE 部署智能体，支持多租户、多 Session 并发，内置会话管理、定时任务和凭据管理。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.