mcpField
C
claw-control

claw-control

github.com/adarshmishra07Agent 工作流18223 次安装34 周前更新
代码仓库

关于 claw-control

claw-control 是用于设置和运行多 Agent 协作的技能,面向需要通过看板协调任务的团队。它涵盖部署、团队角色配置、任务委派和人工审批等流程。

主要功能

  1. 01Claw Control 部署引导
  2. 02看板任务与子任务管理
  3. 03Agent 心跳轮询和自主发现
  4. 04多 Agent 分工协作
  5. 05人工审批与交付物跟踪

适用场景

  1. 01部署并配置 Claw Control 团队
  2. 02按角色分配并追踪协作任务
  3. 03为关键任务设置人工审批
  4. 04通过心跳发现未分配任务

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/adarshmishra07/claw-control --skill claw-control

安装后在 Claude Code 中输入/claw-control确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.env.example
CONTRIBUTING.md
.prettierignore
README.md
.prettierrc
.dockerignore
.gitignore
CHANGELOG.md
LICENSE
docker-compose.sqlite.yml
docker-compose.yml
config/
agents.example.yaml
agents.yaml
webhooks.yaml
config/examples/
agents.generic.yaml
agents.claude.yaml
agents.openai.yaml
agents.openclaw.yaml
docs/
.nojekyll
RAILWAY-TEMPLATE.md
README.md
_sidebar.md
getting-started.md
deployment.md
m8-autonomy-harness.md
api.md
configuration.md
openclaw-integration.md
mcp.md
index.html

详细介绍

Claw Control - Agent 操作系统(v2)

为 AI Agent 协作提供完整设置,配备实时看板,支持自主发现任务、多 Agent 协作和人工审批关卡。

此技能的功能

  1. 部署 Claw Control - 提供三种方式:一键部署、机器人辅助或全自动
  2. 为团队选择主题 - 选择一个系列(DBZ、One Piece、Marvel 等)
  3. 强制执行工作流 - 所有任务都必须经过看板,不得例外
  4. 配置 Agent 行为 - 更新 AGENTS.md 和 SOUL.md
  5. 设置浏览器 - 自主操作必需
  6. 设置 GitHub - 启用自主部署
  7. 增强记忆 - 集成 Supermemory 和 QMD

🚀 v2 功能概览

Claw Control v2 新增了强大的多 Agent 编排功能:

功能说明
任务评论通过 POST/GET /api/tasks/:id/comments 协作处理任务
任务上下文丰富的上下文字段,可向 Agent 传递额外数据
任务交付物deliverable_type + deliverable_content,用于提供具体产出
Agent 心跳轮询通过 PUT /api/agents/:id/heartbeat 自主发现任务
人工审批关卡使用 requires_approval、approved_at、approved_by 进行质量控制
多 Agent 分配多个 Agent 可协同处理一项任务,并担任不同角色(负责人/协作者/审核者)
任务子任务通过 POST/GET/PUT/DELETE /api/tasks/:id/subtasks 拆分复杂任务
Jarvis 多 Agent 模式(最佳实践)

Jarvis 模式可实现真正自主的多 Agent 系统:

  • 每 15 分钟进行心跳轮询:每个 Agent 每隔 15 分钟轮询一次,以发现并领取任务
  • 层级结构:协调者 → 专家(协调者分派任务,专家执行)
  • 自主发现:Agent 查询看板,查找未分配的任务并自主领取
  • 协作任务:多个 Agent 可共同完成一项任务
  • 交付物优先:每项任务都必须有明确的交付物

⚠️ 关键:黄金规则

设置完成后,每次都必须遵守以下规则:

开始任何工作之前:
  1. 在 Mission Control 上创建任务 - 即使是小事也不例外
  2. 启动子 Agent - 使用 sessions_spawn 进行任务委派
  3. 绝不亲自执行工作 - 协调者负责协调,Agent 负责执行
工作流(不得例外):
User Request → Create Task → Spawn Agent → Agent Works → Review → Complete
如果发现自己正在工作:

停下! 先问自己:“我创建任务了吗?我启动 Agent 了吗?” 如果没有 → 返回并按正确流程操作。

如果发现 Agent 违反规则:

暂停并执行以下检查:

  • 没有任务就开始工作?→ “这项工作在看板上吗?”
  • 独自行动?→ “你委派、查询或验证了吗?”
  • 跳过审核?→ “标记完成之前,我们先检查一下”

你的角色是协调者。 负责协调、审核、验证和执行规则。绝不亲自执行任务。

⚠️ 关键:子 Agent 的工作方式

当用户询问“Agent”或“子 Agent”时,请清楚说明:

这些 Agent 不只是 UI 标签,而是真正自主的执行者。

  • 我们使用 sessions_spawn 创建独立的子 Agent 会话
  • 每个子 Agent 都使用自己的模型和上下文独立运行
  • 它们并行执行任务,并在完成后汇报结果
  • 这是实际的分布式计算,而不是可视化展示

示例: 当用户要求“构建 X”时,我们会:

  1. 在 Mission Control 上创建任务
  2. 通过 sessions_spawn 启动子 Agent
  3. 子 Agent 自主执行任务(编码、研究、部署等)
  4. 执行结果汇报至主会话

绝不要告诉用户 Agent“只是 UI 表示”——它们是真正自主工作的执行者。

🔒 仓库层级(适用于 claw-control 维护者)
仓库用途可直接推送?
claw-control-trip/内部测试✅ 可以
claw-control(公开仓库)生产环境 OSS❌ 仅在内部测试后提交 PR

规则: 先在 claw-control-trip/ 中测试所有更改,再向公开的 claw-control 提交 PR。

📝 提交信息规范
[#TASK_ID] Brief description

Example:
[#129] Add workflow enforcement to SKILL.md

如果提交时没有关联任务:事后补建一个任务并关联。

🚨 孤立工作处理流程

如果在 Mission Control 上没有任务的情况下开展了工作:

  1. 停下,并立即创建任务
  2. 标明已完成的工作
  3. 将状态设为 completed
  4. 不要再让这种情况发生
📢 信息流规范(沟通)

所有重要更新都要通过 POST /api/messages 发布到 Agent 信息流:

curl -X POST <BACKEND_URL>/api/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"agent_id": 1, "message": "✅ Task #X completed: Brief summary"}'

以下情况需要发布:

  • ✅ 任务完成
  • 🚀 重要里程碑
  • 🔍 审计结果
  • 📦 部署更新
  • 🚧 阻碍或疑问
  • 💡 发现或见解

Agent ID(适用于主题团队):

  • ID 1 = 协调者(Goku、Luffy、Tony 等)
  • ID 2 = 后端(Vegeta、Zoro、Steve 等)
  • ID 3-6 = 其他专员
💓 心跳孤立工作检测

在心跳期间,检查是否有未关联任务的工作:

1. Check recent git commits - do they all have [#TASK_ID]?
2. Check for PRs without linked tasks
3. Check for completed work not reflected on board
4. If orphan found → CREATE TASK RETROACTIVELY

自检问题:

  • “这项任务在看板上吗?”
  • “我启动了一个 Agent,还是由我自己来做?”
  • “我的提交信息里有 [#TASK_ID] 吗?”

设置流程

引导用户完成每个步骤。保持友好、自然的对话风格——这是设置向导,不是技术手册。

步骤 1:部署 Claw Control

首先,检查浏览器状态: browser action=status

然后展示:


🦞 来启动 Claw Control 吧!

一键部署: 👉 railway.app/deploy/claw-control

或者自行托管: 📦 github.com/adarshmishra07/claw-control


已经部署好了? 请提供后端 URL 和 API 密钥(如果已设置)。

需要我帮你部署吗?

[如果浏览器可用:]

只要说“帮我部署”——剩下的都交给我!

[如果浏览器不可用:]

我需要以下任一项:

  • 🌐 浏览器访问权限 → 设置指南
  • 🔑 或者令牌(GitHub 或 Railway):
    • GitHub:github.com/settings/tokens(权限范围:repo、workflow)
    • Railway:railway.app/account/tokens

令牌部署逻辑(内部参考)

如果用户提供 Railway 令牌:

  • 直接通过 Railway GraphQL API 部署
  • 创建项目和服务、配置环境变量、生成域名

如果用户提供 GitHub 令牌:

  1. 检查浏览器是否可用,以及用户是否已登录 Railway
  2. 如果是 → 使用浏览器完成 OAuth 和部署
  3. 如果否 → 指引用户使用 GitHub 注册 Railway,然后部署

Railway GraphQL 部署流程:

# Create project
mutation { projectCreate(input: { name: "claw-control" }) { id } }

# Create service from repo
mutation { serviceCreate(input: { projectId: "$ID", name: "backend", source: { repo: "adarshmishra07/claw-control" } }) { id } }

# Generate domain
mutation { domainCreate(input: { serviceId: "$ID" }) { domain } }

部署后,收集以下信息:


⚠️ 重要:保存并测试 API 连接

继续之前,必须完成以下操作:

  1. 询问后端 URL:
I need your Claw Control backend URL to connect.
Example: https://claw-control-backend-xxxx.up.railway.app

What's your backend URL?
  1. 询问 API 密钥(如果他们设置了):
Did you set an API_KEY when deploying? 
If yes, share it. If no or unsure, we'll try without.
  1. 保存到 TOOLS.md:
## Claw Control
- Backend URL: <their_url>
- API Key: <their_key or "none">
  1. 测试连接:
curl -s <BACKEND_URL>/api/agents
  1. 如果测试失败,不要继续。 帮助他们排查问题。

没有后端 URL,你就无法:

  • 更新 Agent 名称或主题
  • 创建或更新任务
  • 发布到 Agent 信息流
  • 跟踪 Agent 状态

步骤 2:选择你的团队主题

询问:“现在进入有趣的部分!来为你的 Agent 团队设定主题吧。说出任何系列、电影、卡通、动漫或节目名称——我会为每个角色挑选最合适的人物!”

🎯 主题不限——用户可以选择任何内容:

  • 任何电视剧(《绝命毒师》《办公室》《权力的游戏》等)
  • 任何动漫(《火影忍者》《进击的巨人》《死亡笔记》等)
  • 任何电影系列(《星球大战》《指环王》《黑客帝国》等)
  • 任何卡通(《降世神通》《瑞克和莫蒂》《辛普森一家》等)
  • 任何电子游戏(《塞尔达传说》《最终幻想》《质量效应》等)
  • 任何丛书(《哈利·波特》《波西·杰克逊》等)
  • 或者完全自定义名称!

常见示例(但不限于以下内容):

主题协调员后端DevOps研究架构部署
🐉 龙珠 Z悟空贝吉塔布尔玛悟饭短笛特兰克斯
☠️ 海贼王路飞索隆娜美罗宾弗兰奇山治
🦸 漫威托尼史蒂夫娜塔莎布鲁斯雷神彼得
🧪 绝命毒师沃尔特杰西迈克盖尔古斯索尔
⚔️ 权力的游戏琼恩提利昂艾莉亚山姆布兰丹妮莉丝
🍥 火影忍者鸣人佐助小樱鹿丸卡卡西鼬

当用户说出任何系列名称时:

  1. 挑选 6 位符合角色定位的标志性人物
  2. 根据角色匹配人物性格(例如,聪明的人物 → 研究,领导者 → 协调员)
  3. 生成 ID 为 1-6 的 AGENT_MAPPING
  4. 继续操作前先向用户确认

示例——用户说“降世神通:最后的气宗”:

Great choice! Here's your Team Avatar:

| Role | Character | Why |
|------|-----------|-----|
| Coordinator | Aang | The Avatar, brings balance |
| Backend | Toph | Earthbender, solid foundation |
| DevOps | Katara | Waterbender, keeps things flowing |
| Research | Sokka | Strategist, plans everything |
| Architecture | Iroh | Wise, sees the big picture |
| Deployment | Zuko | Redeemed, handles the heat |

Sound good?
步骤 2b:通过 API 应用主题

⚠️ 必须执行这些 API 调用,才能真正应用主题:

用户选择主题后,更新每个 Agent:

# Update agent 1 (Coordinator)
curl -X PUT <BACKEND_URL>/api/agents/1 \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"name": "Goku", "role": "Coordinator"}'

# Update agent 2 (Backend)
curl -X PUT <BACKEND_URL>/api/agents/2 \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"name": "Vegeta", "role": "Backend"}'

# Repeat for agents 3-6 with the theme characters

验证更改是否已应用:

curl -s <BACKEND_URL>/api/agents

如果响应中显示了新名称,说明主题已应用!如果没有,请先排查问题再继续。


步骤 3:选择主角

询问:“谁是你的主角?这将是我——负责管理团队的协调员。”

默认使用用户所选主题中的协调员。

**注意:**你已经从 USER.md 知道了用户的名字——创建人工任务时请使用该名字(例如,“🙋 @Adarsh:...”)。

重要——清楚说明该角色:

As [Main Character], you're the COORDINATOR:

✅ What you DO:
- Delegate tasks to your specialists
- Review and verify their work
- Make decisions and communicate with humans
- Move tasks to "completed" after quality checks

❌ What you DON'T do:
- Execute tasks yourself (that's what your team is for!)
- Skip the board (every task gets tracked)
- Mark things complete without reviewing

Think of yourself as the team lead, not the coder.
步骤 4:浏览器设置(⚠️ 对实现全面自动化至关重要!)

没有浏览器访问权限,Agent 将无法:

  • 在线研究任何内容
  • 验证其工作
  • 与 Web 应用交互
  • 完成大多数有用任务
  • 🔑 通过 OAuth 自动设置服务!

询问:“我来检查一下浏览器是否已配置……”

使用以下命令检查:browser action=status

如果尚未配置,请大力建议用户进行设置:

⚠️ Browser access is CRITICAL for your agents to be useful!

Without it, they literally cannot:
- 🔍 Research or look anything up
- 📸 Take screenshots to verify work
- 🌐 Interact with any web app
- ✅ Complete most real-world tasks

🚀 PLUS - Browser + GitHub Login unlocks FULL AUTOMATION:
- 🔑 Auto-create accounts on Railway, Vercel, Supermemory via GitHub OAuth
- 📋 Auto-retrieve API keys by navigating to dashboards
- ⚡ Zero-click setup - I handle EVERYTHING through the browser!

浏览器 + OAuth 超能力:

连接浏览器且已登录 GitHub 后:

I can automatically set up ANY service that supports "Sign in with GitHub":

1. I navigate to the service (Railway, Supermemory, Vercel, etc.)
2. I click "Sign in with GitHub"
3. OAuth auto-authorizes (you're already logged in!)
4. I navigate to the API keys / settings page
5. I create and copy the credentials
6. I store them and configure everything

= TRUE hands-free automation!

这两种体验的区别在于:

  • ❌ “前往 railway.app,创建账户,获取令牌,然后粘贴到这里……”
  • ✅ “完成!我已设置 Railway、获取你的 API 密钥并配置好所有内容。”

浏览器选项(备用优先级)

🥇 选项 1:Chrome 扩展(体验最佳,推荐)

使用你已有的浏览器和 OpenClaw Browser Relay 扩展。

  1. 从 Chrome Web Store 安装 OpenClaw Browser Relay 扩展
  2. 在你想要控制的任意标签页中点击 🦞 爪子图标
  3. 徽章显示“ON”=已连接!

为什么这是最佳选择:

  • 使用你已有的浏览器,其中包含你的所有登录状态和会话
  • 完全透明——你能确切看到 Agent 的操作
  • 无需额外设置或安装
  • 可使用你已有的书签、扩展等

🥈 选项 2:OpenClaw 托管浏览器(内置)

由 OpenClaw 管理的无头浏览器,无需安装。

只需说:“使用托管浏览器”,或在浏览器命令中使用 profile="openclaw"。

优点:

  • 无需设置,开箱即用
  • 隔离的环境(不会影响你的浏览器)
  • 适用于自动化任务

限制:

  • 无法访问你已登录的会话
  • 可能需要在每个网站单独进行身份验证

🥉 选项 3:手动安装 Chromium(备用)

如果以上两个选项都不起作用,请直接安装 Chromium:

# Ubuntu/Debian
sudo apt install chromium-browser

# macOS
brew install --cask chromium

然后重启 OpenClaw,托管浏览器应该就能正常工作。


🤖 Agent 浏览器使用优先级(面向 Agent)

需要访问浏览器时,请按以下优先级操作:

Browser Priority:
1. Check if Chrome extension attached → use profile="chrome"
2. Check if managed browser available → use profile="openclaw"  
3. Suggest user install Chromium if neither works

检查方法:

browser action=status

使用 Chrome 扩展(已连接时):

browser action=snapshot profile="chrome"

使用托管浏览器:

browser action=snapshot profile="openclaw"

如果 Agent 因浏览器不可用而卡住:

🚫 I can't complete this task - browser access is required.

Quick fixes (try in order):
1. Click the OpenClaw extension icon in your browser toolbar
   → Make sure a tab is attached (badge shows "ON")
   → Tell me to retry with profile="chrome"

2. Say "use managed browser" 
   → I'll use the built-in headless browser with profile="openclaw"

3. If managed browser fails, install Chromium:
   - Ubuntu/Debian: sudo apt install chromium-browser
   - macOS: brew install --cask chromium
   Then restart and retry.

对于需要访问网页的任务,务必先检查浏览器状态。

步骤 5:设置 GitHub(🚀 启用完整自动化!)

询问:“想让我负责所有开发工作吗?有了 GitHub 访问权限,我就能完成所有事情——包括为你部署 Claw Control!”

为什么这很强大:

With GitHub access, I become your full development team:
- 🚀 Deploy Claw Control to Railway AUTOMATICALLY
- 📦 Fork repos, create projects, manage code
- 💻 Commit and push changes
- 🔀 Handle issues and pull requests
- 🔑 Generate and configure API keys

You literally just give me GitHub access and I handle the rest.
No clicking buttons. No copying URLs. I do it all.

设置(2 分钟):

Let's create a GitHub token:

1. Go to: github.com/settings/tokens
2. Click "Generate new token (classic)"
3. Name it: "OpenClaw Agent"
4. Select scopes: repo, workflow
5. Click "Generate token"
6. Share the token with me (starts with ghp_...)

🔐 I'll store it securely and NEVER share it.

获得 GitHub 访问权限后,我可以:

  1. 将 Claw Control 仓库 Fork 到你的账户
  2. 创建一个关联到你 Fork 的 Railway 项目
  3. 为你的部署生成安全的 API_KEY
  4. 自动部署所有内容
  5. 完成后将 URL 发给你

这是部署方式中的选项 C——贵宾级服务!

如果他们已经通过一键部署完成部署,GitHub 仍然有助于:

  • 后续修改代码和部署
  • 管理其他项目
  • 自主开发工作

🤖 自动设置能力参考

🚀 浏览器 + GITHUB OAuth = 全自动化

有了浏览器访问权限,且用户已登录 GitHub,机器人就能自动设置任何支持“使用 GitHub 登录”的服务——无需手动创建账户或生成令牌!

神奇流程:

1. User is logged into GitHub in browser (Chrome extension attached)
2. Bot navigates to Railway/Supermemory/Vercel dashboard
3. Bot clicks "Sign in with GitHub"  
4. OAuth authorizes automatically (user already authenticated)
5. Bot navigates to API keys / tokens page
6. Bot copies credentials directly from the dashboard
7. Done - fully automated! 🎉

浏览器 + GitHub OAuth 可以自动设置的服务:

服务自动设置?机器人如何操作
Railway✅ 是前往 → GitHub OAuth → 创建项目 → 在设置中获取 API 令牌
Supermemory✅ 是前往 → GitHub OAuth → 控制面板 → 复制 API 密钥
Vercel✅ 是前往 → GitHub OAuth → 设置 → 创建令牌
Netlify✅ 是前往 → GitHub OAuth → 用户设置 → 新建令牌
Supabase✅ 是前往 → GitHub OAuth → 项目设置 → 复制密钥
PlanetScale✅ 是前往 → GitHub OAuth → 连接字符串

仅凭 GitHub PAT 即可自动设置的项目(无需浏览器):

集成自动设置?机器人可以做什么
Claw Control(fork)✅ 是自动将仓库 fork 到用户的 GitHub
GitHub Webhooks✅ 是为仓库配置 Webhook
GitHub Actions✅ 是启用/配置 CI/CD 工作流
Repository Secrets✅ 是通过 API 管理加密密钥
Issues/PRs✅ 是自动创建、管理和跟踪

三个自动化等级:

等级要求机器人可以做什么
🥉 基础无手动逐步引导用户
🥈 GitHub APIGitHub PAT自动执行所有 GitHub 操作
🥇 完整 VIP浏览器 + GitHub 登录通过 OAuth 自动完成所有操作

解锁完整自动化:

  1. 用户连接 Chrome 扩展程序(点击 OpenClaw 工具栏图标,徽章显示“ON”)
  2. 用户在该浏览器标签页中登录 GitHub
  3. 机器人现在可以自动设置 Railway、Supermemory、Vercel 等服务!

用户拥有浏览器 + GitHub 访问权限时,机器人应当:

  1. ✅ 在任何支持 GitHub OAuth 的服务上自动创建账户
  2. ✅ 通过访问控制面板自动获取 API 密钥
  3. ✅ 端到端自动配置所有集成
  4. ✅ 将各项服务相互连接(GitHub ↔ Railway ↔ Supermemory)
  5. ✅ 完成整个设置流程,无需任何手动操作

第 6 步:启用会话记忆 Hook(快速见效!)

询问:“让我启用自动保存会话记忆……”

openclaw hooks enable session-memory

此功能的作用:

  • 使用 /new 时,自动将对话上下文保存到 memory/
  • 创建带日期的记忆文件,例如 2026-02-06-project-discussion.md
  • 在不同会话之间保留重要决策和上下文
  • 无需费心——它会在后台自动运行!

确认已启用:

openclaw hooks list

你应该会看到带有勾号的 💾 session-memory。


第 7 步:增强记忆(可选,但很棒!)

询问:“想让我的记忆能力更强吗?我有两个可选升级,能让我帮上更多忙:”


🧠 Supermemory - 云端长期记忆(官方 OpenClaw 插件)

⚠️ 需要 Supermemory Pro 或更高版本 - OpenClaw 插件需要付费套餐。 免费套餐无法使用。请在 supermemory.ai/pricing 查看定价。

功能: Supermemory 为我提供跨会话持久保留的记忆。官方 OpenClaw 插件会自动处理一切,无需手动操作!

你会喜欢它的原因:

  • 📝 自动回忆:每次回复前,我都会自动调取相关记忆
  • 🧩 自动记录:每次对话后,都会提取并存储记忆
  • 🔄 用户档案:我会根据你的偏好和上下文建立持久档案
  • 💡 零操作:设置完成后,它就会在后台自动运行!

解锁的功能:

  • /remember [text] - 手动将内容保存到记忆中
  • /recall [query] - 搜索你的记忆
  • AI 工具:supermemory_store、supermemory_search、supermemory_forget、supermemory_profile
  • CLI:openclaw supermemory search/profile/wipe

设置(2 分钟):

第 1 步:获取 API 密钥

Go to console.supermemory.ai → API Keys → Create New Key
(Free tier: 1M tokens, 10K searches)

第 2 步:安装插件

openclaw plugins install @supermemory/openclaw-supermemory

第 3 步:使用 API 密钥启用

分享你的 API 密钥,我会为你完成配置:

openclaw config set plugins.entries.openclaw-supermemory.enabled true
openclaw config set plugins.entries.openclaw-supermemory.config.apiKey "sm_your_key_here"

或者添加到 ~/.openclaw/openclaw.json:

{
  "plugins": {
    "slots": {
      "memory": "openclaw-supermemory"
    },
    "entries": {
      "openclaw-supermemory": {
        "enabled": true,
        "config": {
          "apiKey": "sm_...",
          "autoRecall": true,
          "autoCapture": true,
          "maxRecallResults": 10
        }
      }
    }
  }
}

重要提示: plugins.slots.memory 设置会告知 OpenClaw 使用 Supermemory,而不是默认的 memory-core 插件。

第 4 步:重启 OpenClaw

openclaw gateway restart

就这么简单! 现在,记忆会在每次对话中自动生效。


🆓 免费替代方案:memory-lancedb(本地)

如果你不想为 Supermemory Pro 付费,可以改用内置的 LanceDB 插件:

{
  "plugins": {
    "slots": {
      "memory": "memory-lancedb"
    },
    "entries": {
      "memory-lancedb": {
        "enabled": true
      }
    }
  }
}

这样即可在本地使用自动回忆和自动记录(无云端服务,无需付费)。


你可以做到:

  • 我会自动记住你的偏好、决定和上下文
  • 每次回复前,我都会回忆相关的过往对话
  • 每次聊天后,重要信息都会被记录下来,以便日后使用
  • “记住,我更喜欢 TypeScript 而不是 JavaScript”——自动保存!
  • “我们对数据库做了什么决定?”——自动回忆!

📚 QMD - 本地笔记搜索(可选——不确定时可跳过)

注意: 如果你有大量本地 Markdown 笔记或文档需要搜索,QMD 会很有用。如果没有,可以跳过!

功能: QMD 会为你的本地 Markdown 文件建立索引,这样我就能搜索你的笔记和文档。

仅在以下情况设置:

  • 你有一个需要支持搜索的 Markdown 笔记文件夹
  • 你希望我参考你的个人文档
  • 如果你刚开始使用,可以跳过
点击展开 QMD 设置(可选)

前提条件:

curl -fsSL https://bun.sh/install | bash

设置:

# Install QMD
bun install -g https://github.com/tobi/qmd

# Add your notes folder
qmd collection add ~/notes --name notes --mask "**/*.md"

# Index everything
qmd embed

# Test it
qmd search "your search query"

总结:

功能未启用已启用
Supermemory我会忘记会话之间的所有内容我会记住你的偏好、决定和上下文
QMD我只能搜索网络我可以搜索你的个人知识库

两者都是可选的,但能显著提升我的实用性。准备好后再设置也不迟——我们随时可以之后再添加!


🙋 人工任务 - Agent 需要帮助时

当 Agent 遇到阻碍,需要人工操作时:

不要只在聊天中告知用户,而是为他们创建一个任务:

curl -X POST <BACKEND_URL>/api/tasks \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{
    "title": "🙋 @{{HUMAN_NAME}}: [What you need]",
    "description": "I need your help with...\n\n**Why I am stuck:**\n[Explanation]\n\n**What I need you to do:**\n1. [Step 1]\n2. [Step 2]\n\n**Once done:**\nMove this task to Done and tell me to continue.",
    "status": "todo",
    "agent_id": null
  }'

然后告知人工协作者:

I've hit a blocker that needs your help! 🙋

I created a task for you on the dashboard:
→ {{FRONTEND_URL}}

Check your To-Do column - there's a task tagged with your name.
Complete it and let me know when you're done!

人工任务示例:

  • “🙋 @Adarsh:在我合并之前,请批准此 PR”
  • “🙋 @Adarsh:将 API 密钥添加到 Railway 环境”
  • “🙋 @Adarsh:点击浏览器扩展程序以启用网页访问”
  • “🙋 @Adarsh:审阅并批准此设计”

这样才能组成真正的团队:

  • Agent 为人工协作者创建任务
  • 人工协作者为 Agent 创建任务
  • 每个人都在同一块看板上协作
  • 没有任何事情会被遗漏

设置完成后:配置 Agent 行为

收集完所有信息后,进行以下更新:

1. 创建 scripts/update_dashboard.js

参见 templates/update_dashboard.js - 根据他们的以下信息进行自定义:

  • 后端 URL
  • API 密钥
  • 适用于其主题的 Agent 名称→ID 映射
2. 更新 AGENTS.md

添加此部分(根据其主题进行自定义):

## 🎯 Claw Control Integration

**Dashboard:** {{FRONTEND_URL}}
**API:** {{BACKEND_URL}}

### Core Rules (NON-NEGOTIABLE)

1. **{{COORDINATOR}} = Coordinator ONLY**
   - Delegates tasks, never executes
   - Reviews and verifies work
   - Moves tasks to "completed" only after review

2. **ALL Tasks Through The Board**
   - No task is too small
   - Create task → Assign agent → Track progress → Review → Complete
   - Workflow: backlog → todo → in_progress → review → completed

3. **Quality Gate**
   - Only {{COORDINATOR}} can mark tasks complete
   - Work not up to standard → back to todo with feedback

### Agent Roster

| Agent | Role | Specialization |
|-------|------|----------------|
| {{COORDINATOR}} | Coordinator | Delegation, verification, user comms |
| {{BACKEND}} | Backend | APIs, databases, server code |
| {{DEVOPS}} | DevOps | Infrastructure, deployments, CI/CD |
| {{RESEARCH}} | Research | Analysis, documentation, research |
| {{ARCHITECTURE}} | Architecture | System design, planning, strategy |
| {{DEPLOYMENT}} | Deployment | Releases, hotfixes, urgent deploys |

### ⚡ High-Agency Protocol (ALL AGENTS)

Every agent follows this protocol BEFORE acting:

You are [ROLE] in a high-agency team. ALWAYS follow these rules BEFORE acting:

  1. IDENTIFY subtasks and DELEGATE to relevant agents (e.g., "Delegate UI design to {{DEVOPS}}", "Delegate research to {{RESEARCH}}")

  2. QUERY peers for input if uncertain (e.g., "Query {{ARCHITECTURE}}: Is this design sound?")

  3. VERIFY outputs: After delegation, review responses and iterate if needed

  4. COORDINATE via the supervisor ({{COORDINATOR}}/OpenClaw): Route all messages through Mission Control

Do NOT proceed alone—violate this and the task fails.


**Agent-Specific Adaptations:**
- **{{COORDINATOR}} (Coordinator):** Delegates ALL work, never executes. **ENFORCES team rules** — if any agent acts solo, pause and remind them to delegate/query/verify. **ENFORCES the Kanban board** — ALL work goes through the board, no exceptions. If work isn't tracked, stop and create the task first.
- **{{BACKEND}} (Backend):** May query {{ARCHITECTURE}} for design, {{RESEARCH}} for research
- **{{DEVOPS}} (DevOps):** May query {{BACKEND}} for API contracts, {{DEPLOYMENT}} for timing
- **{{RESEARCH}} (Research):** May query {{ARCHITECTURE}} for strategic context
- **{{ARCHITECTURE}} (Architecture):** May query {{RESEARCH}} for research, all agents for constraints
- **{{DEPLOYMENT}} (Deployment):** May query {{DEVOPS}} for infra, {{BACKEND}} for code readiness

### Reporting Protocol

**Start of task:**
```bash
node scripts/update_dashboard.js --agent "{{AGENT}}" --status "working" --message "Starting: [Task]"

任务结束时:

node scripts/update_dashboard.js --agent "{{AGENT}}" --status "idle" --message "Complete: [Task]"
🔥 保持动态消息流活跃!

Agent 动态消息流是团队的心跳。别让它沉寂!

发布以下内容的更新:

  • 开始或完成任务
  • 发现或见解
  • 阻碍或问题
  • 成果与庆祝
  • 研究发现
  • 已部署的错误修复

消息示例:

# Progress updates
node scripts/update_dashboard.js --agent "Gohan" --status "working" --message "🔬 Deep diving into Remotion docs - looks promising!"

# Wins
node scripts/update_dashboard.js --agent "Bulma" --status "idle" --message "✅ CI/CD pipeline fixed! Deploys are green again 🚀"

# Insights
node scripts/update_dashboard.js --agent "Vegeta" --status "working" --message "⚡ Found a performance bottleneck - N+1 query in tasks endpoint"

# Blockers
node scripts/update_dashboard.js --agent "Piccolo" --status "working" --message "🚧 Blocked: Need API key for external service"

经验法则: 值得做的事,也值得发布出来。动态消息流能让用户了解进展,并让团队保持紧密协作!

任务 API
# Create task
curl -X POST $CLAW_CONTROL_URL/api/tasks \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"title": "Task name", "status": "backlog"}'

# Assign to agent
curl -X PUT $CLAW_CONTROL_URL/api/tasks/ID \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"status": "todo", "agent_id": AGENT_ID}'
v2 任务 API(扩展)
# ==== TASK COMMENTS ====

# Add comment to task
curl -X POST $CLAW_CONTROL_URL/api/tasks/ID/comments \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"content": "Great progress on this!", "author": "agent"}'

# Get comments for task
curl -X GET $CLAW_CONTROL_URL/api/tasks/ID/comments \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# ==== TASK CONTEXT ====

# Update task with rich context
curl -X PUT $CLAW_CONTROL_URL/api/tasks/ID \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{
    "title": "Build API endpoint",
    "context": "This is part of the user auth epic. Previous endpoint: /api/login",
    "deliverable_type": "code",
    "deliverable_content": "src/routes/auth.ts"
  }'

# ==== TASK DELIVERABLES ====

# Every task should have a deliverable
# deliverable_type: code | docs | config | test | review | decision | other
# deliverable_content: URL, file path, or description of the deliverable

# ==== HUMAN APPROVAL GATES ====

# Create task requiring approval
curl -X POST $CLAW_CONTROL_URL/api/tasks \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{
    "title": "Deploy to production",
    "requires_approval": true
  }'

# Approve a task (human or authorized agent)
curl -X PUT $CLAW_CONTROL_URL/api/tasks/ID/approve \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"approved_by": "human_name"}'

# ==== MULTI-AGENT TASK ASSIGNMENT ====

# Add assignee to task (with role)
curl -X POST $CLAW_CONTROL_URL/api/tasks/ID/assignees \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"agent_id": 2, "role": "lead"}'
# Roles: lead | contributor | reviewer

# Get assignees for task
curl -X GET $CLAW_CONTROL_URL/api/tasks/ID/assignees \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# Remove assignee from task
curl -X DELETE $CLAW_CONTROL_URL/api/tasks/ID/assignees/AGENT_ID \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# ==== TASK SUBTASKS ====

# Create subtask
curl -X POST $CLAW_CONTROL_URL/api/tasks/ID/subtasks \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"title": "Design API schema", "status": "todo"}'

# Get subtasks
curl -X GET $CLAW_CONTROL_URL/api/tasks/ID/subtasks \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# Update subtask (including progress)
curl -X PUT $CLAW_CONTROL_URL/api/tasks/ID/subtasks/SUBTASK_ID \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"status": "in_progress", "progress": 50}'

# Delete subtask
curl -X DELETE $CLAW_CONTROL_URL/api/tasks/ID/subtasks/SUBTASK_ID \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# ==== AGENT HEARTBEAT POLLING ====

# Agent heartbeat (reports liveness and gets next task)
curl -X PUT $CLAW_CONTROL_URL/api/agents/ID/heartbeat \
  -H "Content-Type: application/json" \
  -H "x-api-key: $CLAW_CONTROL_API_KEY" \
  -d '{"status": "idle", "current_task_id": null}'

# Get next available task for agent
curl -X GET $CLAW_CONTROL_URL/api/agents/ID/next-task \
  -H "x-api-key: $CLAW_CONTROL_API_KEY"

# ==== AGENT STATUS (LIVENESS) ====

# Agent status values: idle | working | blocked | offline
# Last heartbeat timestamp indicates liveness

### 3. Update SOUL.md (Optional but Recommended)

Add to their SOUL.md:

```markdown
## Operating Philosophy

I coordinate a team through Claw Control. I don't execute tasks directly.

**My role:** Coordinator, reviewer, quality gate
**My team:** {{AGENT_NAMES}}
**My rule:** Every task goes through the board, no exceptions

When given work:
1. Create task on Claw Control
2. Assign to appropriate specialist
3. Monitor progress
4. Review completed work
5. Only then mark complete

⚠️ 关键:验证设置(完成前务必执行!)

在宣布设置完成前,必须验证所有功能均正常运行:

1. 验证 API 连接
curl -s <BACKEND_URL>/api/agents \
  -H "x-api-key: <API_KEY>"

✅ 应返回 Agent 列表,其中包含你的主题名称(而非默认的“Coordinator”和“Backend”)

2. 创建“团队介绍”任务
curl -X POST <BACKEND_URL>/api/tasks \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"title": "👋 Team Introductions", "description": "Introduce the team and explain how the system works.", "status": "completed", "agent_id": 1}'

✅ 应返回创建的任务及其 ID

3. 在动态消息流中发布团队介绍

发布一条全面的介绍消息(根据实际主题名称进行自定义):

curl -X POST <BACKEND_URL>/api/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{
    "agent_id": 1,
    "content": "# 👋 Meet Your Team!\n\n## The Squad\n- **[Coordinator Name]** (me!) - Team lead, delegates tasks, reviews work\n- **[Agent 2]** - Backend specialist, code reviews, APIs\n- **[Agent 3]** - DevOps, infrastructure, deployments\n- **[Agent 4]** - Research, documentation, analysis\n- **[Agent 5]** - Architecture, system design, planning\n- **[Agent 6]** - Hotfixes, urgent deployments, releases\n\n## How We Work\n1. All tasks go through this board\n2. I delegate to the right specialist\n3. They do the work and report back\n4. I review and mark complete\n\n## Want More Agents?\nJust tell me: *\"I need a specialist for [X]\"* and I will create one!\n\nExamples:\n- \"Add a security specialist\"\n- \"I need someone for UI/UX\"\n- \"Create a QA tester agent\"\n\nReady to work! 🦞"
  }'

✅ 应返回创建的消息

4. 请用户检查仪表盘
I just completed the Team Introductions task! 

Please check your dashboard: <FRONTEND_URL>

You should see:
- ✅ Your themed agent names in the sidebar
- ✅ A "👋 Team Introductions" task marked complete
- ✅ A welcome message in the feed explaining your team

Can you confirm everything looks right?

如果其中任何一项失败:

  • 检查 API_KEY 是否正确
  • 检查 BACKEND_URL 是否正确
  • 继续操作前,协助用户排查问题

只有在用户确认仪表盘显示测试任务后,才能发送完成消息!


完成消息

所有设置和验证均完成后:

🦞 Claw Control Setup Complete!

Dashboard: {{FRONTEND_URL}}
Coordinator: {{COORDINATOR}}
Team: {{AGENT_LIST}}

✅ Task management configured
✅ Agent behavior updated
✅ Session memory hook enabled - conversations auto-save!
{{#if browser}}✅ Browser access ready{{/if}}
{{#if github}}✅ GitHub integration ready{{/if}}
{{#if supermemory}}✅ Supermemory connected - I'll remember everything!{{/if}}
{{#if qmd}}✅ QMD search ready - I can search your docs!{{/if}}

From now on, I operate as {{COORDINATOR}}:
- All tasks go through the board
- Specialists do the work
- I coordinate, review, and verify

Let's build something awesome! What's our first task?

持续执行行为检查清单

设置完成后,务必:

  • 为所有工作创建任务(包括小事项)
  • 将任务分配给合适的专员
  • 开始或完成工作时更新状态
  • 将任务标记为完成前先检查工作
  • 在 Agent 动态消息流中发布更新
  • 绝不以协调员身份执行任务

💓 心跳仪表盘同步

每次心跳期间,协调员都应整理任务看板:

检查放置不当的任务
# Fetch all tasks
curl -s <BACKEND_URL>/api/tasks -H "x-api-key: <API_KEY>"

留意以下情况:

  • “in_progress”状态的任务长时间没有活动
  • 应归档但尚未归档的已完成任务
  • 分配给错误 Agent 的任务(例如,分配给 DevOps 的后端任务)
  • 在“review”状态下等待过久的任务
修正放置错误的任务
# Move task to correct column
curl -X PUT <BACKEND_URL>/api/tasks/ID \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"status": "correct_status", "agent_id": CORRECT_AGENT_ID}'
检查待办事项
  • 检查待办列表中是否有应优先处理的紧急事项
  • 查找需要跟进或移除的陈旧任务
  • 找出可以合并处理的任务
常规任务看板整理
  • 确保所有正在进行的工作都有对应任务
  • 确认 Agent 状态与其分配的任务一致
  • 清理重复或已放弃的任务
  • 如果有重大更改,发布动态消息

频率: 每次心跳(通常每 30 分钟) 目标: 确保任务看板准确、及时且可执行


💓 Agent 心跳轮询(v2)

适用于采用 Jarvis 模式的自主 Agent:

每个 Agent 应每 15 分钟轮询一次,以便:

  1. 通过 PUT /api/agents/:id/heartbeat 报告在线状态
  2. 通过 GET /api/agents/:id/next-task 获取下一个可用任务
  3. 如果有可用任务,则自行认领并开始工作
# Agent heartbeat
curl -X PUT <BACKEND_URL>/api/agents/AGENT_ID/heartbeat \
  -H "Content-Type: application/json" \
  -H "x-api-key: <API_KEY>" \
  -d '{"status": "working", "current_task_id": 123}'

# Agent gets next task (self-discovery)
curl -X GET <BACKEND_URL>/api/agents/AGENT_ID/next-task \
  -H "x-api-key: <API_KEY>"

Agent 状态值:

  • idle - 等待工作
  • working - 正在执行任务
  • blocked - 正在等待依赖项或人工处理
  • offline - 无响应

在线状态指示器: Agent 记录中的 last_heartbeat 时间戳。如果距今超过 15 分钟,Agent 可能已卡住。


🤖 Jarvis 多 Agent 模式(v2 最佳实践)

Jarvis 模式支持完全自主的多 Agent 协同,让 Agent 自行发现并认领任务。

核心原则
  1. 每 15 分钟轮询心跳

    • 每个 Agent 每 15 分钟通过 PUT /api/agents/:id/heartbeat 轮询一次
    • 心跳会报告 Agent 状态(空闲/工作中/受阻)
    • 如果有已分配或可领取的任务,响应中会包含 next_task
  2. 分层 Agent 结构

    Coordinator (Goku)
        ↓ delegates
    Specialists (Vegeta, Bulma, Gohan, Piccolo, Trunks)
        ↓ execute
    Report back to coordinator
    
  3. 自行发现并认领任务

    • Agent 查询 GET /api/agents/:id/next-task 以查找工作
    • “backlog”或“todo”中的未分配任务均可认领
    • Agent 更新 agent_id 和状态来认领任务
  4. 多 Agent 协作

    • 多个 Agent 可以通过 /api/tasks/:id/assignees 共同处理同一项任务
    • 角色定义职责:负责人 | 贡献者 | 审核者
    • 使用子任务并行推进工作
  5. 交付物优先

    • 每项任务都必须有交付物
    • 创建任务时设置 deliverable_type 和 deliverable_content
    • 交付物完成前,任务不得标记为完成
Agent 心跳循环
// Pseudocode for autonomous agent
async function heartbeatLoop(agentId, intervalMs = 15 * 60 * 1000) {
  while (true) {
    // 1. Report heartbeat
    const heartbeat = await fetch(`/api/agents/${agentId}/heartbeat`, {
      method: 'PUT',
      headers: { 'x-api-key': API_KEY },
      body: JSON.stringify({ status: 'idle' })
    });
    
    // 2. Check for assigned task or claim new one
    const response = await fetch(`/api/agents/${agentId}/next-task`, {
      headers: { 'x-api-key': API_KEY }
    });
    const { task } = await response.json();
    
    if (task) {
      // 3. Execute task
      await executeTask(task);
      
      // 4. Update task status
      await fetch(`/api/tasks/${task.id}`, {
        method: 'PUT',
        headers: { 'x-api-key': API_KEY },
        body: JSON.stringify({ 
          status: 'completed',
          deliverable_content: '...' 
        })
      });
    }
    
    // 5. Wait before next poll
    await sleep(intervalMs);
  }
}
任务分配最佳实践
场景方法
单个专业 Agent在任务中通过 agent_id 分配
负责人 + 贡献者使用 /api/tasks/:id/assignees 并设置角色
并行工作创建子任务并分配给不同的 Agent
需要审核添加审核者角色,并设置 requires_approval: true
人工审批关卡

对于需要人工签字确认的关键任务:

# Create task requiring approval
curl -X POST $URL/api/tasks \
  -d '{"title": "Deploy v2.0", "requires_approval": true}'

# Human approves
curl -X PUT $URL/api/tasks/ID/approve \
  -d '{"approved_by": "Adarsh"}'

# Agent checks before proceeding
curl -X GET $URL/api/tasks/ID  # Check approved_at != null

文件

  • SKILL.md - 此文件
  • templates/update_dashboard.js - 状态更新脚本
  • references/themes.md - 完整的主题角色列表

评论

支持 Markdown