Install
openclaw skills install openclaw-feishu-multi-agentBuild and troubleshoot OpenClaw multi-agent workflows on Feishu. This skill teaches coordinator and specialist agents to combine visible `<at>` mentions with `sessions_send` so delegation, handoffs, and multi-hop discussions work reliably in group chats. Use it to scaffold new setups, audit existing configs, repair broken session metadata, and generate reusable role-based artifacts.
openclaw skills install openclaw-feishu-multi-agent让 OpenClaw 的多个独立 agent 在同一个飞书群里协作:
<at>优先检查并修复:
~/.openclaw/openclaw.json~/.openclaw/PROTOCOL.mdIDENTITY.md / SOUL.md先帮助用户定义角色表,再补齐:
飞书里的 <at> 只是“给人看见谁被点名了”。
OpenClaw 里的 sessions_send 才是“真正唤醒另一个 agent”。
每一次委派都必须同时做两步:
<at>sessions_send 向目标 agent 投递任务少一步都不算成功。
sessions_send 默认使用 sessionKey:
agent:{targetAgentId}:feishu:group:oc_xxx
不要给 sessions_send 传 agentId。
~/.openclaw/PROTOCOL.mdopenclaw.json 的 agents.list、bindings、tools.agentToAgent.allowchannel=feishu、chatType=group不要把方案写死成 Steve / Jonathan / Brendan / Seth。
始终把角色抽象成:
coordinator: 默认调度者specialists: 一个或多个专业 agent角色名、人设、职责、触发词都应该允许自定义。
根据用户场景,通常会创建或更新:
~/.openclaw/PROTOCOL.md~/.openclaw/openclaw.json{agentDir}/IDENTITY.md如果协调者只叫了部分 agent:
超时不等于没收到。继续检查:
如果目标 agent “像是收到了,但没回群”,重点检查 session store:
channel 是否被错误写成 webchatdeliveryContext.to 是否缺失accountId 是否缺失chatType 是否还是 group优先使用统一入口,避免记多个脚本名:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/manage_feishu_multi_agent.py" --help
如果想一把跑完“生成 -> 落地 -> 审计”:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/manage_feishu_multi_agent.py" bootstrap \
--roles ".cursor/skills/openclaw-feishu-multi-agent/roles.example.json" \
--output-dir "/tmp/openclaw-feishu-artifacts" \
--apply-identities
加上 --write --backup 才会真正写入 ~/.openclaw/。
当用户还没配好多 agent,或希望把角色表转换成可落地文档时,运行:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/render_feishu_multi_agent.py" \
--roles ".cursor/skills/openclaw-feishu-multi-agent/roles.example.json" \
--output-dir "/tmp/openclaw-feishu-artifacts"
产出:
PROTOCOL.generated.mdopenclaw.generated.jsonroles.generated.jsonidentities/*.IDENTITY.generated.mdopenclaw.generated.json 现在会同时带出:
agents.listbindingschannels.feishu.accountstools.sessions.visibilitytools.agentToAgent.allow当用户已经有多 agent,想快速检查 openclaw.json 是否与角色表一致时,运行:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/audit_feishu_multi_agent.py" \
--roles "/path/to/roles.json" \
--config "~/.openclaw/openclaw.json"
重点检查:
agents.listbindingschannels.feishu.accountstools.sessions.visibilitytools.agentToAgent.allow~/.openclaw/当用户希望把角色表直接应用到自己的 OpenClaw 环境时,先 dry-run:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/apply_feishu_multi_agent.py" \
--roles "/path/to/roles.json" \
--apply-identities
确认无误后再写入:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/apply_feishu_multi_agent.py" \
--roles "/path/to/roles.json" \
--apply-identities \
--write --backup
这个脚本会:
openclaw.json 里的 agents.listchannels.feishu.accountsbindingstools.sessions.visibility=alltools.agentToAgent.enabled=truetools.agentToAgent.allow~/.openclaw/PROTOCOL.mdIDENTITY.md当某个 agent “像是收到了,但没回群”,优先检查并按需修复 session metadata:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/repair_feishu_group_sessions.py" \
--roles "/path/to/roles.json" \
--group-id "oc_xxx"
如需直接写回:
python ".cursor/skills/openclaw-feishu-multi-agent/scripts/repair_feishu_group_sessions.py" \
--roles "/path/to/roles.json" \
--group-id "oc_xxx" \
--fix --backup