clawteam

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

clawteam — Agent Swarm Intelligence

clawteam — Agent集群智能

Keyword:
clawteam
·
agent swarm
·
spawn agents
·
multi-agent team
One command → a self-organizing team of AI agents that spawn workers, coordinate tasks, isolate workspaces with git worktrees, and deliver results autonomously.
"Agents spawn agents, delegate tasks, and deliver results."
关键词:
clawteam
·
agent swarm
·
spawn agents
·
multi-agent team
一条命令 → 由AI Agent组成的自组织团队,可生成工作Agent、协调任务、通过git worktree隔离工作区,并自主交付结果。
"Agent生成Agent、分发任务并交付结果。"

When to use this skill

适用场景

  • Spawn parallel AI agent workers for large, decomposable tasks
  • Run autonomous ML experiments across multiple GPU workers
  • Orchestrate full-stack development with specialized agents (API, backend, frontend, tests)
  • Run investment analysis with multi-specialist agent teams
  • Coordinate agents across Claude Code, Codex, OpenClaw, nanobot, or Cursor
  • Monitor live agent progress via tmux tiled views or web Kanban dashboard
  • Track task dependencies and automatically unblock agents when prerequisites complete

  • 为大型可拆解任务生成并行AI Agent工作节点
  • 跨多个GPU工作节点运行自主ML实验
  • 搭配专用Agent(API、后端、前端、测试)编排全栈开发流程
  • 由多领域专家Agent团队运行投资分析
  • 跨Claude Code、Codex、OpenClaw、nanobot、Cursor协调Agent工作
  • 通过tmux平铺视图或网页看板仪表盘实时监控Agent进度
  • 追踪任务依赖,当前置条件完成时自动为Agent解除阻塞

Installation

安装

bash
undefined
bash
undefined

Requires Python 3.10+, tmux, and at least one compatible CLI coding agent

Requires Python 3.10+, tmux, and at least one compatible CLI coding agent

pip install clawteam
pip install clawteam

Verify installation

Verify installation

clawteam --version clawteam doctor # check tmux, agent CLI, environment

Compatible agents: `claude`, `codex`, `openclaw`, `nanobot`, `cursor`, custom scripts.

---
clawteam --version clawteam doctor # check tmux, agent CLI, environment

兼容Agent: `claude`, `codex`, `openclaw`, `nanobot`, `cursor`, 自定义脚本。

---

Core Concepts

核心概念

ConceptDescription
LeaderThe orchestrating agent that spawns workers and delegates tasks
WorkerA sub-agent spawned into an isolated git worktree + tmux pane
TeamNamed group of workers coordinating on a shared task set
TaskA unit of work with status:
pending
in_progress
completed
/
blocked
InboxFile-based or ZeroMQ P2P message queue per agent
WorktreeGit worktree at branch
clawteam/{team}/{agent}
— isolated file system

概念描述
主控Agent(Leader)负责编排工作的Agent,用于生成工作节点并分发任务
工作Agent(Worker)被生成的子Agent,运行在隔离的git worktree + tmux窗格中
团队(Team)协同完成同一组任务的工作节点的命名组
任务(Task)工作单元,状态流转:
pending
in_progress
completed
/
blocked
收件箱(Inbox)每个Agent对应的基于文件或ZeroMQ P2P的消息队列
工作树(Worktree)分支为
clawteam/{team}/{agent}
的Git工作树,即隔离的文件系统

Quick Start

快速开始

Spawn a team from your agent session

从你的Agent会话生成一个团队

bash
undefined
bash
undefined

Leader spawns 3 Claude workers on a task

Leader spawns 3 Claude workers on a task

clawteam spawn claude "Build the REST API" --workers 3 --team api-build
clawteam spawn claude "Build the REST API" --workers 3 --team api-build

Spawn specialized workers

Spawn specialized workers

clawteam spawn claude "Implement auth endpoints" --team api-build --name auth-worker clawteam spawn claude "Implement user CRUD" --team api-build --name crud-worker clawteam spawn codex "Write integration tests" --team api-build --name test-worker
undefined
clawteam spawn claude "Implement auth endpoints" --team api-build --name auth-worker clawteam spawn claude "Implement user CRUD" --team api-build --name crud-worker clawteam spawn codex "Write integration tests" --team api-build --name test-worker
undefined

Check team status

查看团队状态

bash
clawteam status                      # all teams
clawteam status --team api-build     # specific team
clawteam board --team api-build      # live web Kanban dashboard
bash
clawteam status                      # all teams
clawteam status --team api-build     # specific team
clawteam board --team api-build      # live web Kanban dashboard

Send messages between agents

Agent间发送消息

bash
undefined
bash
undefined

Leader sends task to a worker

Leader sends task to a worker

clawteam send --to crud-worker "Priority: implement DELETE /users/{id} first"
clawteam send --to crud-worker "Priority: implement DELETE /users/{id} first"

Worker broadcasts status

Worker broadcasts status

clawteam broadcast --team api-build "Auth module complete, unblocking crud-worker"
undefined
clawteam broadcast --team api-build "Auth module complete, unblocking crud-worker"
undefined

Task management

任务管理

bash
clawteam task add "Implement rate limiting" --team api-build
clawteam task list --team api-build
clawteam task done --id <task-id> --team api-build
clawteam task block --id <task-id> --blocked-by <other-id>

bash
clawteam task add "Implement rate limiting" --team api-build
clawteam task list --team api-build
clawteam task done --id <task-id> --team api-build
clawteam task block --id <task-id> --blocked-by <other-id>

Instructions

使用说明

Use this sequence when the user asks to create or run a ClawTeam workflow.
  1. Verify prerequisites first.
    • Check Python 3.10+,
      tmux
      ,
      git
      , and at least one supported agent CLI.
    • If setup is unclear, run
      bash scripts/install.sh
      or show the minimal install commands.
  2. Pick the team shape.
    • Use
      clawteam template ...
      for known patterns like
      fullstack
      ,
      ml-research
      , or
      hedge-fund
      .
    • Use explicit
      clawteam spawn ... --name ...
      commands when worker roles need to be custom.
  3. Make worker ownership explicit.
    • Give each worker a semantic role such as
      architect
      ,
      backend
      ,
      tester
      , or
      risk-analyst
      .
    • If tasks depend on one another, show
      clawteam task block --id ... --blocked-by ...
      .
  4. Show how to monitor and communicate.
    • Include
      clawteam status --team <name>
      .
    • Include either
      clawteam board --team <name>
      or
      clawteam monitor --team <name>
      .
    • Include
      clawteam send
      or
      clawteam broadcast
      when coordination matters.
  5. Close with the lifecycle.
    • Explain how to mark tasks done, inspect costs when relevant, and tear down the team with
      clawteam teardown --team <name>
      .
If the user asks for a recommendation, prefer the smallest team that can execute in parallel without overlapping ownership.

当用户要求创建或运行ClawTeam工作流时,请遵循以下流程:
  1. 首先验证前置条件。
    • 检查Python 3.10+、
      tmux
      git
      ,以及至少一个支持的Agent CLI是否可用。
    • 如果设置不清晰,运行
      bash scripts/install.sh
      或展示最小安装命令。
  2. 选择团队架构。
    • 已知场景可使用
      clawteam template ...
      ,比如
      fullstack
      ml-research
      hedge-fund
      模板。
    • 当需要自定义工作节点角色时,使用显式的
      clawteam spawn ... --name ...
      命令。
  3. 明确工作节点权责。
    • 为每个工作节点赋予语义化角色,比如
      architect
      backend
      tester
      risk-analyst
    • 如果任务间存在依赖,展示
      clawteam task block --id ... --blocked-by ...
      的使用方法。
  4. 展示监控与通信方式。
    • 包含
      clawteam status --team <name>
      命令。
    • 包含
      clawteam board --team <name>
      clawteam monitor --team <name>
      命令。
    • 当协调需求较高时,包含
      clawteam send
      clawteam broadcast
      命令。
  5. 收尾说明生命周期。
    • 说明如何标记任务完成、按需查看成本,以及使用
      clawteam teardown --team <name>
      销毁团队。
如果用户需要推荐方案,优先选择可并行执行且权责不重叠的最小规模团队。

Architecture

架构

Leader Agent
    ├── clawteam spawn → Worker 1 (tmux pane, git worktree: clawteam/my-team/worker-1)
    ├── clawteam spawn → Worker 2 (tmux pane, git worktree: clawteam/my-team/worker-2)
    └── clawteam spawn → Worker 3 (tmux pane, git worktree: clawteam/my-team/worker-3)
    ┌───────────┼───────────┐
    │           │           │
 Task 1      Task 2      Task 3
 (independent) (blocked  (blocked
               by T1)     by T2)

State: ~/.clawteam/{team}/
  tasks.json    — task list with deps
  inbox/        — per-agent message queues
  snapshots/    — periodic state snapshots
  costs.json    — token/API cost tracking
Workspace isolation: Each worker operates in
clawteam/{team}/{worker}
git branch → no merge conflicts during parallel development.
Transport: FileTransport (default, atomic tmp+rename) or P2PTransport (ZeroMQ TCP with filesystem fallback).

Leader Agent
    ├── clawteam spawn → Worker 1 (tmux pane, git worktree: clawteam/my-team/worker-1)
    ├── clawteam spawn → Worker 2 (tmux pane, git worktree: clawteam/my-team/worker-2)
    └── clawteam spawn → Worker 3 (tmux pane, git worktree: clawteam/my-team/worker-3)
    ┌───────────┼───────────┐
    │           │           │
 Task 1      Task 2      Task 3
 (independent) (blocked  (blocked
               by T1)     by T2)

State: ~/.clawteam/{team}/
  tasks.json    — task list with deps
  inbox/        — per-agent message queues
  snapshots/    — periodic state snapshots
  costs.json    — token/API cost tracking
工作区隔离: 每个工作节点运行在
clawteam/{team}/{worker}
Git分支上 → 并行开发过程中不会出现合并冲突。
传输层: FileTransport(默认,原子tmp+重命名)或P2PTransport(ZeroMQ TCP,带文件系统降级方案)。

Pre-built Team Templates

预置团队模板

ML Research Team

机器学习研究团队

bash
undefined
bash
undefined

8 agents × H100 GPU experiments

8 agents × H100 GPU experiments

clawteam template ml-research
--agents 8
--task "Optimize transformer attention with val_bpb target 0.97"
--team ml-exp
undefined
clawteam template ml-research
--agents 8
--task "Optimize transformer attention with val_bpb target 0.97"
--team ml-exp
undefined

Full-Stack Development Team

全栈开发团队

bash
clawteam template fullstack \
  --agents 4 \
  --task "Build e-commerce product catalog API" \
  --team shop-api
bash
clawteam template fullstack \
  --agents 4 \
  --task "Build e-commerce product catalog API" \
  --team shop-api

Spawns: api-designer, backend-dev, frontend-dev, test-engineer

Spawns: api-designer, backend-dev, frontend-dev, test-engineer

undefined
undefined

Investment Analysis Team

投资分析团队

bash
clawteam template hedge-fund \
  --agents 7 \
  --ticker AAPL \
  --team aapl-analysis
bash
clawteam template hedge-fund \
  --agents 7 \
  --ticker AAPL \
  --team aapl-analysis

Spawns: growth-analyst, technical-analyst, fundamental-analyst,

Spawns: growth-analyst, technical-analyst, fundamental-analyst,

sentiment-analyst, risk-analyst, macro-analyst, synthesizer

sentiment-analyst, risk-analyst, macro-analyst, synthesizer


---

---

Monitoring

监控

bash
undefined
bash
undefined

Real-time tiled tmux view (split panes per worker)

Real-time tiled tmux view (split panes per worker)

clawteam monitor --team api-build
clawteam monitor --team api-build

Web Kanban dashboard (localhost:7420)

Web Kanban dashboard (localhost:7420)

clawteam board --team api-build --port 7420
clawteam board --team api-build --port 7420

Show agent costs and token usage

Show agent costs and token usage

clawteam costs --team api-build

---
clawteam costs --team api-build

---

Configuration

配置

Config file:
~/.clawteam/config.toml
toml
[transport]
type = "file"          # "file" (default) or "p2p" (ZeroMQ)

[workspace]
base_dir = "~/.clawteam"
worktree_pattern = "clawteam/{team}/{agent}"

[spawn]
default_agent = "claude"
tmux_session_prefix = "ct-"

[costs]
budget_limit = 10.0    # USD, optional
alert_threshold = 0.8  # warn at 80% of budget
Environment variables override config:
bash
CLAWTEAM_TRANSPORT=p2p   # use ZeroMQ
CLAWTEAM_BASE_DIR=/tmp/clawteam

配置文件路径:
~/.clawteam/config.toml
toml
[transport]
type = "file"          # "file" (default) or "p2p" (ZeroMQ)

[workspace]
base_dir = "~/.clawteam"
worktree_pattern = "clawteam/{team}/{agent}"

[spawn]
default_agent = "claude"
tmux_session_prefix = "ct-"

[costs]
budget_limit = 10.0    # USD, optional
alert_threshold = 0.8  # warn at 80% of budget
环境变量可覆盖配置:
bash
CLAWTEAM_TRANSPORT=p2p   # use ZeroMQ
CLAWTEAM_BASE_DIR=/tmp/clawteam

CLI Reference

CLI参考

CommandDescription
clawteam spawn <agent> <task>
Spawn a worker agent with a task
clawteam status [--team NAME]
Show team and task status
clawteam board [--team NAME]
Open web Kanban dashboard
clawteam monitor [--team NAME]
Live tmux tiled view
clawteam send --to <worker> <msg>
Send message to a specific worker
clawteam broadcast --team <name> <msg>
Broadcast to all team workers
clawteam task add/list/done/block
Manage tasks
clawteam costs [--team NAME]
Show token/cost usage
clawteam doctor
Check environment and dependencies
clawteam template <name>
Use pre-built team templates
clawteam teardown --team NAME
Shut down team and clean up

命令描述
clawteam spawn <agent> <task>
生成带指定任务的工作Agent
clawteam status [--team NAME]
展示团队和任务状态
clawteam board [--team NAME]
打开网页看板仪表盘
clawteam monitor [--team NAME]
实时tmux平铺视图
clawteam send --to <worker> <msg>
向指定工作Agent发送消息
clawteam broadcast --team <name> <msg>
向团队所有工作Agent广播消息
clawteam task add/list/done/block
管理任务
clawteam costs [--team NAME]
展示token/成本消耗
clawteam doctor
检查环境和依赖
clawteam template <name>
使用预置团队模板
clawteam teardown --team NAME
关闭团队并清理资源

Worker Auto-Injection

工作Agent自动注入

When ClawTeam spawns a worker, it injects a coordination prompt teaching the agent to:
  1. Check assigned tasks:
    clawteam task list --team {name} --owner {me}
  2. Mark task in progress:
    clawteam task start --id {id}
  3. Report completion:
    clawteam task done --id {id}
  4. Check inbox:
    clawteam inbox --team {name} --worker {me}
  5. Send status:
    clawteam send --to leader "Task complete: {summary}"
Workers operate autonomously — no human intervention needed once spawned.

当ClawTeam生成工作Agent时,会自动注入协调提示词,指导Agent完成以下操作:
  1. 查看分配的任务:
    clawteam task list --team {name} --owner {me}
  2. 标记任务进行中:
    clawteam task start --id {id}
  3. 上报任务完成:
    clawteam task done --id {id}
  4. 查看收件箱:
    clawteam inbox --team {name} --worker {me}
  5. 发送状态:
    clawteam send --to leader "Task complete: {summary}"
工作Agent可自主运行 —— 生成后无需人工干预。

Examples

示例

Example 1: Spawn a 3-worker API team

示例1: 生成3个工作节点的API开发团队

bash
clawteam spawn claude "Design the API contracts" --team api-build --name architect
clawteam spawn claude "Implement the REST endpoints" --team api-build --name backend
clawteam spawn codex "Write integration tests" --team api-build --name tester

clawteam task block --id backend-impl --blocked-by api-spec
clawteam task block --id integration-tests --blocked-by backend-impl

clawteam status --team api-build
clawteam board --team api-build
bash
clawteam spawn claude "Design the API contracts" --team api-build --name architect
clawteam spawn claude "Implement the REST endpoints" --team api-build --name backend
clawteam spawn codex "Write integration tests" --team api-build --name tester

clawteam task block --id backend-impl --blocked-by api-spec
clawteam task block --id integration-tests --blocked-by backend-impl

clawteam status --team api-build
clawteam board --team api-build

Example 2: Run parallel ML experiments

示例2: 运行并行ML实验

bash
clawteam template ml-research \
  --agents 4 \
  --task "Sweep learning rate and context length for val_bpb improvement" \
  --team ml-sweep

clawteam monitor --team ml-sweep
clawteam costs --team ml-sweep
bash
clawteam template ml-research \
  --agents 4 \
  --task "Sweep learning rate and context length for val_bpb improvement" \
  --team ml-sweep

clawteam monitor --team ml-sweep
clawteam costs --team ml-sweep

Example 3: Check what a team is doing right now

示例3: 查看团队当前运行状态

bash
clawteam status --team shop-api
clawteam board --team shop-api --port 7420
clawteam inbox --team shop-api --worker backend

bash
clawteam status --team shop-api
clawteam board --team shop-api --port 7420
clawteam inbox --team shop-api --worker backend

Best practices

最佳实践

  1. Name workers semantically
    auth-worker
    ,
    test-engineer
    , not
    worker-1
  2. Use task dependencies
    clawteam task block
    prevents out-of-order execution
  3. Set budget limits — use
    budget_limit
    in config to prevent runaway costs
  4. Use templates for known patterns
    ml-research
    ,
    fullstack
    ,
    hedge-fund
  5. FileTransport for most cases — P2PTransport only needed for cross-machine teams
  6. Monitor with
    clawteam board
    — web dashboard gives clearest progress view

  1. 为工作节点起语义化名称 —— 比如
    auth-worker
    test-engineer
    ,不要用
    worker-1
    这类名称
  2. 使用任务依赖 ——
    clawteam task block
    可避免任务乱序执行
  3. 设置预算上限 —— 在配置中使用
    budget_limit
    避免超额成本
  4. 已知场景使用模板 ——
    ml-research
    fullstack
    hedge-fund
  5. 绝大多数场景使用FileTransport —— 仅跨机器团队需要使用P2PTransport
  6. 使用
    clawteam board
    监控
    —— 网页仪表盘提供最清晰的进度视图

References

参考资料

  • Architecture Overview — transport, workspace isolation, state model
  • Agent Types & Compatibility — claude, codex, openclaw, nanobot, cursor
  • Use Cases & Templates — ML research, fullstack dev, investment analysis
  • ClawTeam GitHub — MIT License
  • PyPI
    pip install clawteam
  • 架构概览 — 传输层、工作区隔离、状态模型
  • Agent类型与兼容性 — claude, codex, openclaw, nanobot, cursor
  • 使用场景与模板 — 机器学习研究、全栈开发、投资分析
  • ClawTeam GitHub — MIT License
  • PyPI
    pip install clawteam