OpenClaw 飞书多 Agent 对接
这篇记录的是我在 OpenClaw 里把飞书机器人和多 Agent 接起来的过程。核心思路不复杂:一个飞书机器人对应一个 Agent,彼此的工作空间、知识库、模型配置都分开。这样做的好处很直接,隔离干净,后面调模型、换技能、排问题都不会互相踩。
参考资源
- 多 agent 对接单个飞书账号
- openclaw 多 agent 群聊
- 飞书机器人群聊
- 多 agent 数据隔离
- 多 agent 单独安装 skills
隔离性说明
- 每个 Agent 的模型状态完全独立
- 每个 agent 对应一个飞书机器人
- 每个 agent 的技能单独安装维护
- 模型切换只影响当前会话,最终会持久化到 Agent 配置
- 每个 Agent 都有独立的 workspace 和 data
这套隔离方式省事,也更安全。代价是管理项会变多,但对需要分角色、分权限的场景来说,通常比把所有能力塞进一个机器人更稳。
添加新的 agent
# 添加 agent
openclaw agents add finance_agent
openclaw agents add code_agent
# 设置身份
openclaw agents set-identity --agent code_agent --name "全栈开发专家"
openclaw agents set-identity --agent main --name "OpenClaw" --emoji "🦞" --avatar avatars/openclaw.png
# 查看 agents 列表
openclaw agents list
安装过程
cobrew@DESKTOP-9449JCG:~$ openclaw agents add finance_agent
?? OpenClaw 2026.3.13 (61d171a) ? Your AI assistant, now without the $3,499 headset.
┌ Add OpenClaw agent │ ◇ Workspace directory │ /home/cobrew/.openclaw/workspace-finance_agent
│ ◇ Copy auth profiles from "main"? │ Yes
│ ◇ Auth profiles ─────────────────────?
│ Copied auth profiles from "main".
├─────────────────────────────────────?
│ ◇ Configure model/auth for this agent now? │ Yes
│ ◇ Model/auth provider │ Xiaomi
│ ◇ How do you want to provide this API key? │ Paste API key now
│ ◇ Enter Xiaomi API key │ sk-xxxxxx
│ ◇ Model configured ──────────────────────────────────────────────?
│ Default model set to xiaomi/mimo-v2-flash for agent "finance_agent".
│ ◇ Model check ───────────────────────────────────────────────────?
│ Model not found: xiaomi/mimo-v2-flash. Update agents.defaults.model or run /models list.
├────────────────────────────────────────────────────────────────────────?
│ ◇ Channel status ────────────────────?
│ Telegram: needs token
│ WhatsApp (default): not linked
│ Discord: needs token
│ Slack: needs tokens
│ Signal: needs setup
│ signal-cli: missing (signal-cli)
│ iMessage: needs setup
│ imsg: missing (imsg)
│ IRC: not configured
│ Google Chat: not configured
│ LINE: not configured
│ Feishu: install plugin to enable
│ Google Chat: install plugin to enable
│ Nostr: install plugin to enable
│ Microsoft Teams: install plugin to enable
│ Mattermost: install plugin to enable
│ Nextcloud Talk: install plugin to enable
│ Matrix: install plugin to enable
│ BlueBubbles: install plugin to enable
│ LINE: install plugin to enable
│ Zalo: install plugin to enable
│ Zalo Personal: install plugin to enable
│ Synology Chat: install plugin to enable
│ Tlon: install plugin to enable
├─────────────────────────────────────?
│ ◇ Configure chat channels now? │ No
Config overwrite: /home/cobrew/.openclaw/openclaw.json (sha256 4b6fcbb9743eb0a8611264043008a59e472a4763a3a9a0a6fc7d5814cbe385ff -> 96c54ca4424a35bc743203fa8e6ef23580613b630be1f06dad8cdf09c6137b, backup=/home/cobrew/.openclaw/openclaw.json.bak)
Updated ~/.openclaw/openclaw.json
Workspace OK: ~/.openclaw/workspace-finance_agent
Sessions OK: ~/.openclaw/agents/finance_agent/sessions
└ Agent "finance_agent" ready.
cobrew@DESKTOP-9449JCG:~$
这个流程里最容易卡的不是创建 agent,而是模型和渠道的状态。日志里已经提示了,xiaomi/mimo-v2-flash 没找到的话,要么补默认模型,要么先用 /models list 看看当前可用项。飞书插件也不是默认就能用,得先装对应扩展。
配置过程
cobrew@DESKTOP-9449JCG:~$ openclaw agents add code_agent
🦞 OpenClaw 2026.3.13 (61d171a) — WhatsApp automation without the "please accept our new privacy policy".
11:32:30 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: feishu (/home/cobrew/.npm-global/lib/node_modules/openclaw/extensions/feishu/index.ts). Set plugins.allow to explicit trusted ids.
11:32:57 [plugins] feishu_doc: Registered feishu_doc, feishu_app_scopes
11:32:57 [plugins] feishu_chat: Registered feishu_chat tool
11:32:57 [plugins] feishu_wiki: Registered feishu_wiki tool
11:32:57 [plugins] feishu_drive: Registered feishu_drive tool
11:32:57 [plugin]
这里有个细节挺实用:plugins.allow 为空时,非内置插件可能会自动加载。开发环境里这不一定是问题,但如果你在意插件边界,最好把允许列表显式配好。飞书相关的工具注册成功后,再去做机器人对接会省很多排障时间。

