# agentscope **Repository Path**: mayjean/agentscope ## Basic Information - **Project Name**: agentscope - **Description**: Build and run agents you can see, understand and trust. - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-22 - **Last Updated**: 2026-05-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
## 新闻
- **[2026-05] `发布`:** AgentScope 2.0 已发布
[更多新闻 →](./docs/NEWS_zh.md)
## 社区
欢迎加入我们的社区
| [Discord](https://discord.gg/eYMpfnkG8h) | 钉钉 |
|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
|
|
|
## 📑 Table of Contents
- [快速开始](#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
- [安装](#%E5%AE%89%E8%A3%85)
- [从 PyPI 安装](#%E4%BB%8E-pypi-%E5%AE%89%E8%A3%85)
- [从源码安装](#%E4%BB%8E%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85)
- [Hello AgentScope!](#hello-agentscope)
- [智能体服务](#%E6%99%BA%E8%83%BD%E4%BD%93%E6%9C%8D%E5%8A%A1)
- [贡献](#%E8%B4%A1%E7%8C%AE)
- [许可](#%E8%AE%B8%E5%8F%AF)
- [论文](#%E8%AE%BA%E6%96%87)
- [贡献者](#%E8%B4%A1%E7%8C%AE%E8%80%85)
## 快速开始
### 安装
> AgentScope 需要 **Python 3.11** 或更高版本。
#### 从 PyPI 安装
```bash
uv pip install agentscope
# 或者
# pip install agentscope
```
#### 从源码安装
```bash
# 从 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,启动你的第一个智能体:
```python
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
```bash
git clone https://github.com/agentscope-ai/agentscope
cd agentscope/examples/agent_service
# 启动智能体服务后端
python main.py
```
然后打开另一个终端启动 Web UI:
```bash
cd agentscope/examples/web_ui
# 启动 webui
pnpm install
pnpm dev
```
体验聊天式界面,与你的智能体进行交互。
## 贡献
我们欢迎社区的贡献!请参阅我们的 [贡献指南](./CONTRIBUTING_zh.md) 了解如何贡献。
## 许可
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},
}
```
## 贡献者
感谢所有贡献者: