返回顶部
f

feishu-agent-bind飞书绑定代理

Bind a Feishu group chat to a specific OpenClaw agent. Use when user wants to route a Feishu group to a dedicated agent (e.g., devops, hr, pm). Covers agent creation, workspace setup, binding configuration, session cleanup, and gateway restart.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
139
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

feishu-agent-bind

飞书群组 → 智能体绑定

将飞书群组路由到具有独立工作空间的特定智能体。

前置条件

  • - 智能体必须存在于 agents.list 中(通过 openclaw agents add 创建)
  • 智能体必须拥有自己的工作空间(不与主空间共享)
  • 网关正在运行

步骤

1. 确保智能体拥有独立工作空间

bash

检查当前配置


openclaw config get agents.list | jq .[] | select(.id==) | .workspace

如果工作空间与主空间共享(~/.openclaw/workspace),请创建一个专用工作空间:

bash
mkdir -p ~/.openclaw/workspace-/memory

至少将 SOUL.md 和 AGENTS.md 写入新工作空间。然后更新配置:

python
import json
with open(os.path.expanduser(~/.openclaw/openclaw.json)) as f:
c = json.load(f)
for a in c[agents][list]:
if a[id] == :
a[workspace] = os.path.expanduser(f~/.openclaw/workspace-)
break
with open(os.path.expanduser(~/.openclaw/openclaw.json), w) as f:
json.dump(c, f, indent=2, ensure_ascii=False)

2. 将群组添加到 channels.feishu.groups(可选但推荐)

python

添加群组配置


fs_groups = c[channels][feishu].setdefault(groups, {})
fsgroups[id>] = {requireMention: False}

3. 使用 accountId 添加绑定(关键)

必须包含与飞书账号匹配的 accountId(通常为 main),否则绑定在路由匹配时会被静默忽略。

python
bindings = c.get(bindings, [])
bindings.append({
agentId: ,
match: {
channel: feishu,
peer: {kind: group, id: },
accountId: account
id> # 例如 main
}
})
c[bindings] = bindings

或通过命令行:

bash

先获取现有绑定


openclaw config get bindings

设置所有绑定(现有 + 新增)

openclaw config set --json bindings [...existing..., {agentId:,match:{channel:feishu,peer:{kind:group,id:},accountId:main}}]

4. 清理过期会话

如果该群组之前由其他智能体处理,请删除其旧会话以避免缓存问题:

bash

查找旧会话


openclaw sessions --all-agents --json | grep

从旧智能体的会话存储中删除

python3 -c import json, glob for f in glob.glob(os.path.expanduser(~/.openclaw/agents/*/sessions/sessions.json)): with open(f) as fh: d = json.load(fh) keys = [k for k in d if in k] if keys: for k in keys: del d[k] with open(f,w) as fh: json.dump(d, fh) print(f已清理 {f}: {keys})

5. 重启网关

bash
openclaw gateway restart

6. 验证

bash

检查绑定


openclaw config get bindings

检查会话是否命中正确的智能体

openclaw status | grep

应显示 agent::feishu:group:

常见陷阱(经验教训)

  1. 1. 绑定中缺少 accountId:没有 accountId 的绑定默认匹配账号 default,而非 main。飞书插件传递的是实际账号 ID(例如 main),因此绑定永远不会被匹配。始终显式设置 accountId。
  1. 2. 共享工作空间:如果多个智能体共享同一工作空间,它们会读取相同的 SOUL.md/BOOTSTRAP.md 并混淆身份。始终使用独立工作空间。
  1. 3. 过期会话:旧会话缓存在不同智能体下,绑定更改后仍然存在。需手动删除。
  1. 4. 需要重启网关:绑定更改需要完全重启网关才能生效。
  1. 5. openclaw agents bind 命令行陷阱:CLI 命令 openclaw agents bind --agent X --bind feishu:id> 会将 accountId 设置为 id> 而非 peer.id=。这对于群组路由是错误的。请直接使用 config set --json bindings。
  1. 6. 绑定顺序很重要:当多个绑定匹配时,第一个优先。将特定的对等绑定放在账号级绑定之前。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 feishu-agent-bind-1776127082 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 feishu-agent-bind-1776127082 技能

通过命令行安装

skillhub install feishu-agent-bind-1776127082

下载

⬇ 下载 feishu-agent-bind v1.0.1(免费)

文件大小: 2.48 KB | 发布时间: 2026-4-17 14:48

v1.0.1 最新 2026-4-17 14:48
修复:优化发布流程

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部