多子代理配置飞书

# feishu-multi-account

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "多子代理配置飞书" with this command: npx skills add zhili007/feishu-multi-account

feishu-multi-account

OpenClaw 多飞书账号配置 - 为子代理配置独立的飞书机器人账号。

触发场景

  • 用户要配置多个飞书机器人
  • 用户要给子代理配置独立的飞书账号
  • 用户遇到飞书消息路由问题

前置条件

  1. 飞书应用:已在飞书开放平台创建好应用(获取 AppID 和 AppSecret)
  2. OpenClaw:已安装并正常运行
  3. 子代理:已在 OpenClaw 中创建

配置步骤

Step 1:配置飞书多账号

openclaw.jsonchannels.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"
  }
}

Step 2:配置 Bindings(最重要!)

openclaw.json 顶层添加 bindings

"bindings": [
  {
    "agentId": "main",
    "match": {
      "channel": "feishu",
      "accountId": "main"
    }
  },
  {
    "agentId": "sub1",
    "match": {
      "channel": "feishu",
      "accountId": "sub1"
    }
  }
],

Step 3:配置 Agents

"agents": {
  "list": [
    {
      "id": "main",
      "default": true,
      "name": "Agent A"
    },
    {
      "id": "sub1",
      "name": "Agent B",
      "workspace": "/path/to/workspace-sub1"
    }
  ]
}

Step 4:重启 Gateway

openclaw gateway restart

验证配置

查看 Agent 列表

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)

常见问题

Q1: 路由一直不生效?

  1. 检查 bindings 是否放在顶层(不是 channels 下面)
  2. 检查 agentIdaccountId 是否与配置一致
  3. 检查是否两个账号都写了 bindings

Q2: 消息发到主账号?

  • 很可能是没写主账号的 bindings,默认路由到 main 了

关键要点

  1. agentId = agents.list 中的 id
  2. accountId = accounts 中的账号 ID
  3. 两个账号都要写 bindings,否则会被默认路由
  4. bindings(不是routing)

配置文件示例

{
  "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" }
      }
    }
  }
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Aavegotchi Renderer Bypass

Render Aavegotchi assets by deriving renderer hashes from Goldsky Base core data and calling POST /api/renderer/batch on www.aavegotchi.com. Use when the use...

Registry SourceRecently Updated
General

Toutiao User Profile API

Call GET /api/toutiao/get-user-detail/v1 for Toutiao User Profile through JustOneAPI with userId.

Registry SourceRecently Updated
General

Toutiao Search API

Call 2 search versions for Toutiao App Keyword Search through JustOneAPI with keyword.

Registry SourceRecently Updated
General

Compaction UI Enhancements

Background memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw...

Registry SourceRecently Updated