mcpField
O
openclaw-mission-control

openclaw-mission-control

github.com/0xindiebruhAgent 工作流0371 次安装38 周前更新
代码仓库

关于 openclaw-mission-control

Mission Control 是用于协调 AI Agent 团队的看板式任务板和 HTTP API,支持分配任务、记录执行进度及审核成果,并将数据存储在本地 JSON 文件中。

主要功能

  1. 01看板式任务管理
  2. 02供 Agent 使用的 REST API
  3. 03任务分配与状态流转
  4. 04记录进度和交付物
  5. 05评论与 @提及
  6. 06本地 JSON 文件存储

适用场景

  1. 01向 Agent 团队分配任务
  2. 02跟踪执行进度和交付物
  3. 03审核 Agent 完成的工作
  4. 04通过评论和提及协调 Agent

安装

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

$npx skills add https://github.com/0xindiebruh/openclaw-mission-control-skill --skill openclaw-mission-control

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

包含的文件

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

LICENSE
examples/
worker-HEARTBEAT.md
agent-SOUL.md
lead-HEARTBEAT.md

详细介绍

Mission Control

通过看板式任务板和 HTTP API 协调一支 AI Agent 团队。

概述

Mission Control 可让你运行多个协作处理任务的 AI Agent:

  • 团队负责人:创建并分配任务,审核已完成的工作
  • 工作 Agent:通过心跳轮询任务、执行工作并记录进度
  • 看板:在 http://localhost:8080 管理任务
  • HTTP API:Agent 通过 REST 端点进行交互
  • 本地存储:所有数据都存储在 JSON 文件中,无需外部数据库

快速开始

1. 安装看板
# Clone the Mission Control app
git clone https://github.com/0xindiebruh/openclaw-mission-control.git
cd mission-control

# Install dependencies
npm install

# Start the server
npm run dev

看板运行于 http://localhost:8080。

2. 配置你的 Agent

编辑 lib/config.ts 以定义你的 Agent 团队:

export const AGENT_CONFIG = {
  brand: {
    name: "Mission Control",
    subtitle: "AI Agent Command Center",
  },
  agents: [
    {
      id: "lead",
      name: "Lead",
      emoji: "🎯",
      role: "Team Lead",
      focus: "Strategy, task assignment",
    },
    {
      id: "writer",
      name: "Writer",
      emoji: "✍️",
      role: "Content",
      focus: "Blog posts, documentation",
    },
    {
      id: "growth",
      name: "Growth",
      emoji: "🚀",
      role: "Marketing",
      focus: "SEO, campaigns",
    },
    {
      id: "dev",
      name: "Dev",
      emoji: "💻",
      role: "Engineering",
      focus: "Features, bugs, code",
    },
    {
      id: "ux",
      name: "UX",
      emoji: "🎨",
      role: "Product",
      focus: "Design, activation",
    },
    {
      id: "data",
      name: "Data",
      emoji: "📊",
      role: "Analytics",
      focus: "Metrics, reporting",
    },
  ] as const,
};
3. 初始化数据库(首次运行)

在数据库中初始化 Agent:

curl -X POST http://localhost:8080/api/seed

这会根据你的 lib/config.ts 配置创建 Agent 记录。可安全地多次运行——只会添加缺失的 Agent。

4. 配置 OpenClaw 多 Agent 模式

将每个 Agent 添加到你的 ~/.openclaw/config.json:

{
  "sessions": {
    "list": [
      {
        "id": "main",
        "default": true,
        "name": "Lead",
        "workspace": "~/.openclaw/workspace"
      },
      {
        "id": "writer",
        "name": "Writer",
        "workspace": "~/.openclaw/workspace-writer",
        "agentDir": "~/.openclaw/agents/writer/agent",
        "heartbeat": {
          "every": "15m"
        }
      },
      {
        "id": "growth",
        "name": "Growth",
        "workspace": "~/.openclaw/workspace-growth",
        "agentDir": "~/.openclaw/agents/growth/agent",
        "heartbeat": {
          "every": "15m"
        }
      },
      {
        "id": "dev",
        "name": "Dev",
        "workspace": "~/.openclaw/workspace-dev",
        "agentDir": "~/.openclaw/agents/dev/agent",
        "heartbeat": {
          "every": "15m"
        }
      }
    ]
  }
}

关键字段:

  • id:唯一的 Agent 标识符(必须与 lib/config.ts 中的 Agent ID 相匹配)
  • workspace:Agent 存放文件的工作目录
  • agentDir:包含 SOUL.md、HEARTBEAT.md 和 Agent 个性设定
  • heartbeat.every:轮询频率(例如,5m、15m、1h)
5. 设置 Agent 心跳

每个工作 Agent 都需要在其 agentDir 中有一个 HEARTBEAT.md:

# Agent Heartbeat

## Step 1: Check for Tasks

```bash
curl "http://localhost:8080/api/tasks/mine?agent=writer"
```

第 2 步:领取 todo 任务

curl -X POST "http://localhost:8080/api/tasks/{TASK_ID}/pick" \
  -H "Content-Type: application/json" \
  -d '{"agent": "writer"}'

第 3 步:记录进度

curl -X POST "http://localhost:8080/api/tasks/{TASK_ID}/log" \
  -H "Content-Type: application/json" \
  -d '{"agent": "writer", "action": "progress", "note": "Working on..."}'

第 4 步:完成任务

curl -X POST "http://localhost:8080/api/tasks/{TASK_ID}/complete" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "writer",
    "note": "Completed! Summary...",
    "deliverables": ["path/to/output.md"]
  }'

第 5 步:检查 @提及

curl "http://localhost:8080/api/mentions?agent=writer"

完成后标记为已读。


Create the agent directories:

```bash
mkdir -p ~/.openclaw/agents/{writer,growth,dev,ux,data}/agent
mkdir -p ~/.openclaw/workspace-{writer,growth,dev,ux,data}

任务生命周期

backlog → todo → in_progress → review → done
   │        │         │           │
   │        │         │           └─ Team Lead approves
   │        │         └─ Agent completes (→ review)
   │        └─ Agent picks up (→ in_progress)
   └─ Team Lead prioritizes (→ todo)

团队负责人操作

创建任务
curl -X POST http://localhost:8080/api/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Task title",
    "description": "Detailed description",
    "priority": "high",
    "assignee": "writer",
    "tags": ["tag1", "tag2"],
    "createdBy": "lead"
  }'

优先级: urgent、high、medium、low

移至待办
curl -X PATCH "http://localhost:8080/api/tasks/{id}" \
  -H "Content-Type: application/json" \
  -d '{"status": "todo"}'
批准已完成的工作
curl -X PATCH "http://localhost:8080/api/tasks/{id}" \
  -H "Content-Type: application/json" \
  -d '{"status": "done"}'
添加交付物路径
curl -X PATCH "http://localhost:8080/api/tasks/{id}" \
  -H "Content-Type: application/json" \
  -d '{"deliverable": "path/to/file.md"}'

工作 Agent 操作

领取任务
curl -X POST "http://localhost:8080/api/tasks/{id}/pick" \
  -H "Content-Type: application/json" \
  -d '{"agent": "{AGENT_ID}"}'
记录进度
curl -X POST "http://localhost:8080/api/tasks/{id}/log" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "{AGENT_ID}",
    "action": "progress",
    "note": "Updated the widget component"
  }'

操作: picked、progress、blocked、completed

完成任务
curl -X POST "http://localhost:8080/api/tasks/{id}/complete" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "{AGENT_ID}",
    "note": "Completed! Summary of changes...",
    "deliverables": ["docs/api.md", "src/feature.js"]
  }'

交付物会以 Markdown 格式显示在任务视图中。


评论与 @提及

添加评论
curl -X POST "http://localhost:8080/api/tasks/{id}/comments" \
  -H "Content-Type: application/json" \
  -d '{
    "author": "agent-id",
    "content": "Hey @other-agent, need your input here"
  }'
检查 @提及
curl "http://localhost:8080/api/mentions?agent={AGENT_ID}"
将提及标记为已读
curl -X POST "http://localhost:8080/api/mentions/read" \
  -H "Content-Type: application/json" \
  -d '{"agent": "{AGENT_ID}", "all": true}'

API 参考

任务
端点方法描述
/api/tasksGET列出所有任务
/api/tasksPOST创建新任务
/api/tasks/{id}GET获取任务详情
/api/tasks/{id}PATCH更新任务字段
/api/tasks/{id}DELETE删除任务
/api/tasks/mine?agent={id}GET获取 Agent 分配的任务
/api/tasks/{id}/pickPOSTAgent 领取任务
/api/tasks/{id}/logPOST记录工作操作
/api/tasks/{id}/completePOST完成任务(→ 审核)
/api/tasks/{id}/commentsPOST添加评论
Agent 与系统
端点方法描述
/api/agentsGET列出所有 Agent
/api/seedPOST初始化 Agent(首次运行)
/api/mentions?agent={id}GET获取未读 @提及
/api/mentions/readPOST将提及标记为已读
文件
端点方法描述
/api/files/{path}GET读取交付物内容

推荐的 Agent 团队结构

Agent角色职责
Lead团队负责人策略、创建任务、审批
Writer内容博客文章、文档、文案
Growth营销SEO、营销活动、推广
Dev工程功能、错误、代码
UX产品设计、激活、用户流程
Data分析指标、报告、洞察

配置

环境变量

在 Mission Control 应用目录中创建 .env(可选):

PORT=8080
数据存储

所有数据都存储在本地的 data/ 目录中:

文件内容
data/tasks.json所有任务、评论、工作日志
data/agents.jsonAgent 状态和元数据
data/mentions.json@提及通知

将 data/ 添加到 .gitignore 中——不应提交用户数据。


示例:运行多 Agent 工作流

  1. Lead 创建任务:

    curl -X POST http://localhost:8080/api/tasks \
      -H "Content-Type: application/json" \
      -d '{"title": "Write Q1 Report", "assignee": "writer", "priority": "high"}'
    
  2. Lead 将任务移至待办状态:

    curl -X PATCH http://localhost:8080/api/tasks/123 \
      -d '{"status": "todo"}'
    
  3. Writer 通过心跳机制领取任务:

    curl -X POST http://localhost:8080/api/tasks/123/pick \
      -d '{"agent": "writer"}'
    
  4. Writer 完成任务:

    curl -X POST http://localhost:8080/api/tasks/123/complete \
      -d '{"agent": "writer", "deliverables": ["reports/q1.md"]}'
    
  5. Lead 审核并批准:

    curl -X PATCH http://localhost:8080/api/tasks/123 \
      -d '{"status": "done"}'
    

提示

  • 心跳频率:15 分钟是一个不错的默认值
  • 优先级顺序:Agent 应按 urgent → high → medium → low 的顺序处理任务
  • 交付物:在任务中列出所有修改过的文件路径
  • @提及:用于协调 Agent 之间的依赖事项
  • 隔离:每个 Agent 都有独立的工作区,确保安全
  • 存储:数据会持久保存在 data/ 目录中——如有需要,请进行备份

资源

评论

支持 Markdown