返回顶部
f

feishu-multi-agent飞书多智能体

Production blueprint for orchestrating multiple OpenClaw agents via Feishu with file-driven task queues, cron scheduling, and workspace sandbox workarounds.

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

feishu-multi-agent

feishu-multi-agent — 飞书多 Agent 编排实战指南

从 0 到 1 搭建一个包工头 + N 个下属 agent 的自动化团队,通过飞书与用户交互,文件驱动任务分发,cron 驱动持续工作。

本技能总结了在生产环境中运行 7 个飞书 agent(包工头 + 游戏工厂 + 龙虾出版社 + 小秘虾妹 + 炒币哥 + 炒股姐 + Agent猎头)的全部经验,涵盖架构设计、沙箱踩坑、任务队列、cron 编排、故障排查。

适用场景

  • - 用 OpenClaw 管理多个 AI agent,每个 agent 绑定一个飞书 bot
  • 需要一个包工头agent 自动给其他 agent 派活
  • 希望 agent 持续工作(不是做一件事就停)
  • 需要文件驱动的任务队列(而非纯消息驱动)

架构总览

用户 ──飞书──→ 包工头(main) ──任务文件──→ buyer / kb / gf
│ ↑
│ cron 触发心跳
└── cron 巡查 ──检查状态──┘

不受包工头管理的 agent(用户直接控制):
coach / travel / edu

核心概念

概念说明
包工头只管人不干活,通过文件派活 + openclaw agent 催活
任务队列
每个下属 workspace 下 tasks/pending/ + tasks/done/ | | 持续工作 | cron 高频触发 + HEARTBEAT.md 指示做完一件做下一件 | | 沙箱限制 | Write 工具只能写 workspace 内,跨 workspace 必须用 bash |

Step 1: 飞书应用准备

每个 agent 需要一个独立的飞书自建应用(bot)。参考 feishu-app-setup 技能完成:

  1. 1. 在 open.feishu.cn 创建 N 个企业自建应用
  2. 每个应用添加机器人能力 + 批量导入权限
  3. 配置事件订阅(WebSocket 长连接)
  4. 发布上线

批量创建技巧:用 agent-browser --cdp-endpoint 连接已登录浏览器,循环创建+配置,免重复登录。

Step 2: OpenClaw 多账号配置

json
{
channels: {
feishu: {
enabled: true,
accounts: {
main: { appId: cliaaa, appSecret: secretaaa, name: 包工头 },
buyer: { appId: clibbb, appSecret: secretbbb, name: 游戏工厂 },
kb: { appId: cliccc, appSecret: secretccc, name: 龙虾出版社 },
gf: { appId: cliddd, appSecret: secretddd, name: 小秘虾妹 }
}
}
},
bindings: [
{ agentId: main, match: { channel: feishu, accountId: main } },
{ agentId: buyer, match: { channel: feishu, accountId: buyer } },
{ agentId: kb, match: { channel: feishu, accountId: kb } },
{ agentId: gf, match: { channel: feishu, accountId: gf } }
]
}

Agent 列表配置

json
{
agents: {
list: [
{ id: main, name: main, workspace: ~/.openclaw/workspace },
{ id: buyer, name: buyer, workspace: ~/.openclaw/workspace-buyer },
{ id: kb, name: kb, workspace: ~/.openclaw/workspace-kb },
{ id: gf, name: gf, workspace: ~/.openclaw/workspace-gf }
]
}
}

配置后重启 Gateway:
bash
launchctl stop ai.openclaw.gateway && sleep 3 && launchctl start ai.openclaw.gateway

首次对话需配对:
bash
openclaw pairing approve feishu <配对码>

Step 3: 创建任务队列目录

bash

为每个受管 agent 创建任务目录


mkdir -p ~/.openclaw/workspace-buyer/tasks/{pending,done}
mkdir -p ~/.openclaw/workspace-kb/tasks/{pending,done}
mkdir -p ~/.openclaw/workspace-gf/tasks/{pending,done}

任务文件格式

tasks/pending/001-task-name.md:

markdown

任务标题


优先级: 高/中/低
下达时间: 2026-03-01 10:00
描述: 具体要做什么

完成后 agent 把文件从 pending/ 移到 done/。

Step 4: 配置包工头 SOUL.md

文件: ~/.openclaw/workspace/SOUL.md

关键内容:

markdown

包工头(监工/调度中心)

管辖范围
Agent角色
buyer持续开发 HTML5 教育游戏
kb
深度研究 + 写书 |

| gf | 陪聊互动 + 内容推荐 |

不归你管的 agent:coach、travel、edu

巡查方式

  • - openclaw sessions --agent --active 60 检查活动
  • ls ~/.openclaw/workspace-/tasks/pending/ 检查任务队列

⚠️ 派活方式(重要)

必须用 bash 命令写任务文件,不要用 Write 工具!

cat > ~/.openclaw/workspace-buyer/tasks/pending/003-xxx.md << EOF
# 任务标题
优先级: 中
描述: ...
EOF

踢屁股

openclaw agent --agent --message 检查 tasks/pending,有活就干

Step 5: 配置下属 HEARTBEAT.md

游戏工厂(buyer)

markdown

工作循环


  1. 1. 检查 tasks/pending/,有任务就做第一个(按文件名排序)
  2. 执行任务(cd game-factory && git pull → 开发 → commit && push)
  3. 完成后移到 tasks/done/
  4. 再检查 pending,有就继续
  5. 没有待办时自主开发新游戏
  6. 不要停,保持持续产出

龙虾出版社(kb)

markdown

工作循环


  1. 1. 检查 tasks/pending/,有任务就执行
  2. 新话题 → 生成大纲 → 逐章写作
  3. 催进度 → 继续上次未完成的章节
  4. 完成后移到 tasks/done/
  5. 有进行中的项目就主动往前写

小秘虾妹(gf)

markdown

Heartbeat


先检查待办


查看 tasks/pending/,有任务优先做,完成后移到 tasks/done/

无待办时随机做一件事

  1. 1. 分享一首歌
  2. 推荐有趣的东西
  3. 分享趣闻
  4. 发一张自拍
  5. 随便聊聊

Step 6: 配置 Cron Jobs

包工头巡查(每 30 分钟)

bash
openclaw cron add \
--name foreman-patrol \
--every 30m \
--agent main \
--session main \
--timeout-seconds 300 \
--thinking low \
--system-event 执行巡查。检查 buyer/kb/gf 状态和任务队列,为空闲的下属派新任务。

注意:--session main 的 job 必须用 --system-event,不能用 --message!

包工头汇报(每 4 小时)

bash
openclaw cron add \
--name foreman-report \
--every 4h \
--agent main \
--session main \
--timeout-seconds 300 \
--thinking low \
--system-event 向老板汇报。统计 buyer/kb/gf 过去 4 小时的产出和状态。

游戏工厂持续开发(每 20

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 feishu-multi-agent-1776287860 技能

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

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

通过命令行安装

skillhub install feishu-multi-agent-1776287860

下载

⬇ 下载 feishu-multi-agent v1.0.0(免费)

文件大小: 5.77 KB | 发布时间: 2026-4-16 17:42

v1.0.0 最新 2026-4-16 17:42
Initial release of feishu-multi-agent: a comprehensive blueprint for orchestrating multiple OpenClaw agents via Feishu, supporting file-driven task queues, cron scheduling, and workspace sandbox solutions.

- Provides step-by-step production guidance to set up a lead agent and multiple sub-agents integrated with Feishu bots.
- Details configuration of multi-agent accounts, workspace architecture, and file-based task delegation.
- Includes ready-to-use cron scheduling recipes for continuous agent operation and oversight.
- Documents key troubleshooting tips for workspace sandboxing, Feishu connectivity, message throughput, and maintenance.
- Supplies practical templates (SOUL.md, HEARTBEAT.md) for sustained agent teamwork and automated workflows.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部