OpenClaw 多 Agent 协作实践:构建三人 AI 写作团队
很多人用 AI 的方式是 一个模型干所有事。
但现实世界里,复杂任务往往是 多角色协作。
比如写一篇文章:
- 有人负责 头脑风暴
- 有人负责 写作
- 有人负责 统筹调度
OpenClaw 的 Multi-Agent 架构 正好可以实现这一点。
这篇文章带你从 0 到 1 搭建一个 三 Agent 协作系统:
用户 │ ▼ Coordinator(协调官) ├── Brainstorm(脑暴搭子) └── Writer(写作助手)
并通过 飞书群 实现真实的协作体验。
一、架构设计
我们创建三个 Agent:
| Agent | 角色 | 职责 |
|---|---|---|
| brainstorm | 脑暴搭子 | 创意发散 |
| writer | 写作助手 | 文章创作 |
| coordinator | 协调官 | 任务调度 |
任务流程:
用户 ↓ Coordinator ↓ Brainstorm(创意发散) ↓ Writer(内容写作) ↓ Coordinator(整合结果) ↓ 返回用户
二、创建多个 Agent
通过 CLI 创建三个独立 Agent。
创建 Brainstorm Agent
openclaw agents add brainstorm --model zai/glm-4.5-air --workspace ~/.openclaw/workspace-brainstorm
设置身份:
openclaw agents set-identity --agent brainstorm --name "脑暴搭子" --emoji "💡"
创建 Writer Agent
openclaw agents add writer --model zai/glm-4.5-air --workspace ~/.openclaw/workspace-writer
设置身份:
openclaw agents set-identity --agent writer --name "写作助手" --emoji "✍️"
创建 Coordinator Agent
openclaw agents add coordinator --model zai/glm-4.5-air --workspace ~/.openclaw/workspace-coordinator
设置身份:
openclaw agents set-identity --agent coordinator --name --emoji

