agentscope-ai/agentscope
GitHub: agentscope-ai/agentscope
AgentScope 是一个生产级多智能体开发框架,提供工具调用、记忆管理、多智能体编排和强化学习微调能力,帮助开发者快速构建可观测、可部署的 AI Agent 应用。
Stars: 17145 | Forks: 1533
The AgentScope Ecosystem
### 灵活的 MCP 使用
将单个 MCP 工具作为**本地可调用函数**使用,以组合工具包或封装成更复杂的工具。
```
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
# ...
```
### Agentic RL
通过强化学习集成无缝训练您的智能体应用。我们还准备了涵盖各种场景的多个示例项目:
| 示例 | 描述 | 模型 | 训练结果 |
|--------------------------------------------------------------------------------------------------|-------------------------------------------------------------|------------------------|-----------------------------|
| [数学 Agent](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/math_agent) | 通过多步推理微调数学解题 Agent。 | Qwen3-0.6B | 准确率:75% → 85% |
| [冰湖环境](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/frozen_lake) | 训练 Agent 在冰湖环境中导航。 | Qwen2.5-3B-Instruct | 成功率:15% → 86% |
| [学会提问](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/learn_to_ask) | 使用 LLM-as-a-judge 自动反馈微调 Agent。 | Qwen2.5-7B-Instruct | 准确率:47% → 92% |
| [邮件搜索](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/email_search) | 在没有标注真值的情况下改进工具使用能力。 | Qwen3-4B-Instruct-2507 | 准确率:60% |
| [狼人杀游戏](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/werewolves) | 训练 Agent 进行战略性多智能体游戏交互。 | Qwen2.5-7B-Instruct | 狼人胜率:50% → 80% |
| [数据增强](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner/data_augment) | 生成合成训练数据以增强微调效果。 | Qwen3-0.6B | AIME-24 准确率:20% → 60% |
### 多智能体工作流
AgentScope 提供 ``MsgHub`` 和流水线来简化多智能体对话,提供高效的消息路由和无缝的信息共享
```
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())
```
## 文档
- [教程](https://doc.agentscope.io/tutorial/)
- [常见问题](https://doc.agentscope.io/tutorial/faq.html)
- [API 文档](https://doc.agentscope.io/api/agentscope.html)
## 更多示例与样本
### 功能
- [MCP](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/mcp)
- [Anthropic Agent Skill](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/agent_skill)
- [规划](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/plan)
- [结构化输出](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/structured_output)
- [RAG](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/rag)
- [长期记忆](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/long_term_memory)
- [SQLite 会话](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/session_with_sqlite)
- [流式打印消息](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/stream_printing_messages)
- [TTS](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/tts)
- [代码优先部署](https://github.com/agentscope-ai/agentscope/tree/main/examples/deployment/planning_agent)
- [记忆压缩](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression)
### 智能体
- [ReAct Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/react_agent)
- [语音 Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/voice_agent)
- [深度研究 Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/deep_research_agent)
- [浏览器使用 Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/browser_agent)
- [元规划 Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/meta_planner_agent)
- [A2A Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/a2a_agent)
- [实时语音 Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent)
### 游戏
- [九人狼人杀](https://github.com/agentscope-ai/agentscope/tree/main/examples/game/werewolves)
### 工作流
- [多智能体辩论](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_debate)
- [多智能体对话](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_conversation)
- [多智能体并发](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_concurrent)
- [多智能体实时对话](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime)
### 评估
- [ACEBench](https://github.com/agentscope-ai/agentscope/tree/main/examples/evaluation/ace_bench)
### 调优器
- [微调 ReAct Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/tuner/react_agent)
## 许可证
AgentScope 基于 Apache License 2.0 发布。
## 出版物
如果我们的工作对您的研究或应用有帮助,请引用我们的论文。
- [AgentScope 1.0: A Developer-Centric Framework for Building Agentic Applications](https://arxiv.org/abs/2508.16279)
- [AgentScope: A Flexible yet Robust Multi-Agent Platform](https://arxiv.org/abs/2402.14034)
```
@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},
}
```
## 贡献者
感谢我们所有的贡献者:
标签:AgentScope, AI编程, Apex, AutoGen, AutoGPT, DLL 劫持, LLM应用开发, Mutation, PyRIT, Python, RAG, 人工智能, 企业级AI, 可视化, 多智能体框架, 多智能体系统, 大语言模型, 威胁情报, 子域名突变, 开发者工具, 无后门, 智能体可信, 机器学习, 模型可解释性, 用户代理, 用户模式Hook绕过, 网络调试, 自动化, 请求拦截, 逆向工具, 阿里开源