Install
openclaw skills install feishu-multi-account支持为多个子代理配置独立飞书机器人账号,确保飞书消息按账号绑定正确路由。
openclaw skills install feishu-multi-accountOpenClaw 多飞书账号配置 - 为子代理配置独立的飞书机器人账号。
在 openclaw.json 的 channels.feishu.accounts 中添加:
"accounts": {
"main": {
"appId": "cli_xxx",
"appSecret": "xxx"
},
"sub1": {
"appId": "cli_yyy",
"appSecret": "yyy",
"botname": "Agent B"
},
"default": {
"groupPolicy": "allowlist",
"groupAllowFrom": ["ou_xxx"],
"dmPolicy": "pairing"
}
}
在 openclaw.json 顶层添加 bindings:
"bindings": [
{
"agentId": "main",
"match": {
"channel": "feishu",
"accountId": "main"
}
},
{
"agentId": "sub1",
"match": {
"channel": "feishu",
"accountId": "sub1"
}
}
],
"agents": {
"list": [
{
"id": "main",
"default": true,
"name": "Agent A"
},
{
"id": "sub1",
"name": "Agent B",
"workspace": "/path/to/workspace-sub1"
}
]
}
openclaw gateway restart
openclaw agents list
用子代理的飞书账号发一条消息,看日志:
tail -f /tmp/openclaw/openclaw-日期.log | grep "dispatching"
成功日志:
feishu[sub1]: dispatching to agent (session=agent:sub1:sub1)
失败日志:
feishu[sub1]: dispatching to agent (session=agent:main:main)
bindings 是否放在顶层(不是 channels 下面)agentId 和 accountId 是否与配置一致{
"bindings": [
{ "agentId": "main", "match": { "channel": "feishu", "accountId": "main" } },
{ "agentId": "sub1", "match": { "channel": "feishu", "accountId": "sub1" } }
],
"agents": {
"list": [
{ "id": "main", "default": true, "name": "Agent A" },
{ "id": "sub1", "name": "Agent B", "workspace": "/path/to/workspace-sub1" }
]
},
"channels": {
"feishu": {
"enabled": true,
"domain": "feishu",
"accounts": {
"main": { "appId": "cli_xxx", "appSecret": "xxx" },
"sub1": { "appId": "cli_yyy", "appSecret": "yyy" }
}
}
}
}