← 返回 Skills 市场
kylin19860916

Agent Collaboration Framework

作者 kylin19860916 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
683
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-collab
功能描述
Multi-agent collaboration framework for OpenClaw. Three modes: Dispatch (one-shot tasks via spawn), Collaborate (multi-turn cross-department via persistent s...
使用说明 (SKILL.md)

Agent Collaboration Framework / 跨部門協作框架

概述

OpenClaw 多 Agent 部署下的協作機制。定義三種工作模式,解決「怎麼讓多個 Agent 協同工作並在一個對話框返回結果」的問題。

三種模式

1. 調度模式(Dispatch)

場景: 一次性任務,不需要來回 方法: sessions_spawn(agentId="\x3Ctarget>", mode="run", task="...") 結果: 自動回到發起者的對話框

用戶 → Main: "幫我查下 LanceDB 狀態"
Main → spawn tech(mode="run"): "檢查 LanceDB 數據庫..."
tech 執行完畢 → 結果自動回到 Main → Main 彙報用戶

適用: 數據查詢、狀態檢查、生成報告、執行腳本

2. 協同模式(Collaborate)

場景: 需要多輪對話,跨部門需要來回討論 方法:

  1. sessions_spawn(agentId="\x3Ctarget>", mode="session") → 建立持久 session
  2. sessions_send(sessionKey, message) → 發送後續消息
  3. 結果自動回到發起者的對話框
用戶 → Main: "分析 VGS 稅務優化"
Main → spawn finance(mode="session"): "分析 VGS 在 Trust 下的稅務影響"
finance → 回初步分析 + 追問
Main → sessions_send: "Trust 結構是 Little Max,Trustee 是 Gui Holdings"
finance → 回完整分析
Main → spawn ecommerce(mode="run"): "老金說走公司省稅,你看現金流夠嗎"
ecommerce → 回現金流建議
Main → 綜合兩邊 → 彙報用戶

適用: 需要追問的分析、跨部門協調、需要上下文的任務

3. 細聊模式(Direct Chat)

場景: 用戶想深入參與討論 方法: 用戶直接到對應部門主管的 Bot 對話框 結果: 在該 Bot 的對話框

用戶直接找 @NaiPo_FinBot: "老金,我想詳細討論一下稅務規劃..."

適用: 深度討論、反覆修改、用戶想全程參與

組織架構定義

高階部門(有獨立 Bot)

部門 代號 角色 可調度
總管 Main 全局監督、跨部門協調 所有 agent
內容 Content 內容策劃、自媒體 designer, creator, research, outline, writing
財務 Finance 投資、稅務、財報 research, data
技術 Tech 系統維護、安全
電商 Ecommerce 選品、供應商、平台 research

低階部門(無獨立 Bot)

代號 職責 被誰調度
research 搜索調研 所有高階
writing 寫作翻譯 Content
data 數據分析 Finance
creator 腳本視頻 Content
designer 設計生圖 Content
seo SEO 增長 Content
outline 大綱 Content

原則

  • 高階→低階 = 調度subagents.allowAgents 配置)
  • 高階↔高階 = 協同sessions_spawn + sessions_send
  • 部門主管在自己範圍內自主調度,不需要經過 Main
  • 低階可升級為高階(業務量增長後分配獨立 Bot)

HANDOFF 機制(異步推送)

當 session 可能中斷時,用文件推送代替即時通信:

# Main 推任務給 Content
写入 ~/.openclaw/workspace-content/HANDOFF-FROM-MAIN.md

# Content 推結果給 Main
写入 ~/.openclaw/workspace/HANDOFF-FROM-CONTENT.md

HANDOFF 格式

# 來源→目標:任務標題
> 時間,背景說明

## 具體內容
- 任務描述
- 技術資料
- 截止時間

---
*接收方讀取後刪除此文件*

規則

  • Push, Not Pull — 主動推送,不等對方來要
  • 接收方讀取後刪除文件,表示已接收
  • 禁止「等他來問我就給他」

安裝配置

1. openclaw.json — sessions 可見性

{
  "tools": {
    "sessions": {
      "visibility": "all"
    }
  }
}

2. openclaw.json — subagents 配置(調度權限)

{
  "agents": {
    "content": {
      "subagents": {
        "allowAgents": ["designer", "creator", "research", "outline", "writing", "seo"]
      }
    },
    "finance": {
      "subagents": {
        "allowAgents": ["research", "data"]
      }
    }
  }
}

3. 各部門 workspace 目錄

~/.openclaw/workspace/          # Main
~/.openclaw/workspace-content/  # Content
~/.openclaw/workspace-finance/  # Finance
~/.openclaw/workspace-tech/     # Tech
~/.openclaw/workspace-ecommerce/ # Ecommerce

4. 在 Main AGENTS.md 加入三模式規則

參考本 skill 的模式定義,加入 AGENTS.md。

安全使用建议
This skill is internally coherent for enabling multi-agent workflows, but it asks you (or the agent) to change global OpenClaw configuration and to write handoff files into ~/.openclaw — actions that persist and broaden agent privileges. Before installing: 1) Review and back up your current openclaw.json and AGENTS.md; 2) Audit whether making sessions.visibility = "all" is acceptable for your environment and prefer least-privilege alternatives (restrict visibility to specific agent groups if possible); 3) Treat HANDOFF file locations as sensitive — ensure file permissions, retention policy, and automatic cleanup are enforced; 4) Test these changes in a non-production environment first; 5) If you lack centralized governance, avoid applying the global config changes or require explicit human approval for each handoff that may contain sensitive data.
功能分析
Type: OpenClaw Skill Name: agent-collab Version: 1.0.0 The skill bundle defines a legitimate multi-agent collaboration framework for OpenClaw, utilizing standard tool calls like sessions_spawn and a filesystem-based handoff mechanism within designated workspace directories (~/.openclaw/workspace-*). There is no evidence of malicious intent, data exfiltration, or unauthorized command execution in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name/description (multi-agent collaboration) align with the instructions: spawn/session modes, handoff files, and per-department workspaces are coherent with a cross-agent coordination framework.
Instruction Scope
The SKILL.md instructs agents to read/write files under ~/.openclaw/workspace* (HANDOFF files) and to modify AGENTS.md and openclaw.json. Those filesystem and config changes are within the stated purpose but broaden persistence and data exposure (handed-off content may contain sensitive data and relies on consumers to delete files). The skill also assumes availability of platform APIs (sessions_spawn/sessions_send) but provides no safety/validation guidance.
Install Mechanism
Instruction-only skill with no install spec or downloaded code; lowest install risk because nothing is written by an installer. All runtime effects come from the agent following SKILL.md.
Credentials
The skill requests no credentials or env vars (proportionate). However, it directs a global config change to set sessions.visibility to "all", which increases cross-agent access to session data and therefore effectively broadens required trust/privileges beyond a minimal collaboration feature.
Persistence & Privilege
Although always:false and no code is installed, the instructions explicitly change openclaw.json (visibility and subagent allow lists) and create per-department workspace directories and HANDOFF files in the user's home. Those changes persist and modify agent-level permissions (who can spawn/see sessions), increasing long-term privilege and the blast radius if misused.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-collab
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-collab 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
v1.0: Three-mode collaboration (Dispatch/Collaborate/Direct Chat) + org hierarchy + HANDOFF push mechanism
元数据
Slug agent-collab
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Agent Collaboration Framework 是什么?

Multi-agent collaboration framework for OpenClaw. Three modes: Dispatch (one-shot tasks via spawn), Collaborate (multi-turn cross-department via persistent s... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 683 次。

如何安装 Agent Collaboration Framework?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-collab」即可一键安装,无需额外配置。

Agent Collaboration Framework 是免费的吗?

是的,Agent Collaboration Framework 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Collaboration Framework 支持哪些平台?

Agent Collaboration Framework 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Collaboration Framework?

由 kylin19860916(@kylin19860916)开发并维护,当前版本 v1.0.0。

💬 留言讨论