🎯 做完你会得到
飞书走工作 Agent,Telegram 走生活 Agent,记忆互不干扰
👤 适合谁
- 高级用户
- AI开发者
- 研究员
⚡ 效果预览
搭建多Agent协作系统,复杂任务自动分工,效率超过单Agent 10倍
🔧 Step 0:先配置消息接收渠道
⚠️ 本案例需要发送通知到你的手机,先配置消息渠道 👉 去配置 Telegram/飞书/微信接入 →
这个场景解决什么问题
单个 Agent 处理所有任务会导致上下文混乱:工作记忆和私人记忆互相污染。通过多 Agent 配置,不同渠道走不同 Agent,记忆完全独立。
直接复制这段:工作/生活双 Agent 配置
在 ~/.openclaw/openclaw.json 中:
{
"agents": {
"list": [
{
"id": "work",
"name": "工作助手",
"workspace": "~/.openclaw/workspaces/work"
},
{
"id": "life",
"name": "生活助手",
"workspace": "~/.openclaw/workspaces/life"
}
]
},
"bindings": [
{
"match": { "channel": "feishu" },
"agentId": "work"
},
{
"match": { "channel": "telegram" },
"agentId": "life"
}
]
}
保存后重启:
openclaw gateway restart
验证配置生效
# 查看所有 Agent 状态
openclaw status --all
# 查看当前配置
openclaw config get agents
变体 A:按用户路由(不同人用不同 Agent)
{
"agents": {
"list": [
{ "id": "vip", "workspace": "~/.openclaw/workspaces/vip" },
{ "id": "default", "workspace": "~/.openclaw/workspace" }
]
},
"bindings": [
{
"match": {
"channel": "telegram",
"peer": { "kind": "dm", "id": "123456789" }
},
"agentId": "vip"
},
{
"match": { "channel": "telegram" },
"agentId": "default"
}
]
}
bindings 按顺序匹配,第一条符合的规则生效,所以把更精确的规则放前面。
变体 B:按 Telegram 群组路由
{
"bindings": [
{
"match": {
"channel": "telegram",
"peer": { "kind": "group", "id": "-1001234567890" }
},
"agentId": "work"
},
{
"match": { "channel": "telegram" },
"agentId": "life"
}
]
}
变体 C:最简单的单 Agent 多渠道
如果只是想在多个渠道用同一个 Agent(不需要隔离),无需配置 bindings:
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "你的Bot Token"
},
"feishu": {
"appId": "cli_xxx",
"appSecret": "xxx"
}
}
}
给每个 Agent 不同的 SOUL.md
在各自的工作区目录放不同的 SOUL.md:
~/.openclaw/workspaces/work/SOUL.md ← 工作风格:严谨、简洁
~/.openclaw/workspaces/life/SOUL.md ← 生活风格:轻松、有趣
管理命令
# 重启所有 Agent
openclaw gateway restart
# 查看 Agent 列表
openclaw status --all
# 查看特定 Agent 的会话
openclaw sessions list --agent work
注意事项
bindings按顺序匹配,先写精确规则,再写兜底规则- 每个 Agent 有独立 workspace,
SOUL.md、HEARTBEAT.md互不影响 - 多 Agent 会占用更多内存,2核2G VPS 建议最多 2 个 Agent
- Telegram 的
peer.id是用户的数字 ID,可以在 Bot 收到消息后用openclaw logs查看
#多Agent#架构#bindings#路由#工作区隔离
⚔️ 同类副本推荐 ⚔️
✅ 进阶
用 AI 替代虚拟助理(VA)
邮件回复、日程安排、信息整理、客户跟进——这些虚拟助理做的事,OpenClaw 能接管大部分,每月省下 VA 费用。
🔧 进阶
100+ 企业平台一键接入
安装 API Gateway 技能,一口气打通 Google Workspace、Microsoft 365、GitHub、Notion、Slack、HubSpot 等 100+ 平台,统一管理。
🔧 进阶
数据报表自动生成与定时分发
把你的数据源(Excel/飞书/数据库)接入 OpenClaw,每天/每周自动生成数据报表,并准时发送到对应的人或群,彻底告别"每天早上手动跑数据、发给领导"的重复劳动。"