clawteam
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseclawteam — Agent Swarm Intelligence
clawteam — Agent集群智能
Keyword:·clawteam·agent swarm·spawn agentsmulti-agent teamOne 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 agentsmulti-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
undefinedbash
undefinedRequires 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
核心概念
| Concept | Description |
|---|---|
| Leader | The orchestrating agent that spawns workers and delegates tasks |
| Worker | A sub-agent spawned into an isolated git worktree + tmux pane |
| Team | Named group of workers coordinating on a shared task set |
| Task | A unit of work with status: |
| Inbox | File-based or ZeroMQ P2P message queue per agent |
| Worktree | Git worktree at branch |
| 概念 | 描述 |
|---|---|
| 主控Agent(Leader) | 负责编排工作的Agent,用于生成工作节点并分发任务 |
| 工作Agent(Worker) | 被生成的子Agent,运行在隔离的git worktree + tmux窗格中 |
| 团队(Team) | 协同完成同一组任务的工作节点的命名组 |
| 任务(Task) | 工作单元,状态流转: |
| 收件箱(Inbox) | 每个Agent对应的基于文件或ZeroMQ P2P的消息队列 |
| 工作树(Worktree) | 分支为 |
Quick Start
快速开始
Spawn a team from your agent session
从你的Agent会话生成一个团队
bash
undefinedbash
undefinedLeader 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
undefinedclawteam 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
undefinedCheck team status
查看团队状态
bash
clawteam status # all teams
clawteam status --team api-build # specific team
clawteam board --team api-build # live web Kanban dashboardbash
clawteam status # all teams
clawteam status --team api-build # specific team
clawteam board --team api-build # live web Kanban dashboardSend messages between agents
Agent间发送消息
bash
undefinedbash
undefinedLeader 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"
undefinedclawteam broadcast --team api-build "Auth module complete, unblocking crud-worker"
undefinedTask 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.
- Verify prerequisites first.
- Check Python 3.10+, ,
tmux, and at least one supported agent CLI.git - If setup is unclear, run or show the minimal install commands.
bash scripts/install.sh
- Check Python 3.10+,
- Pick the team shape.
- Use for known patterns like
clawteam template ...,fullstack, orml-research.hedge-fund - Use explicit commands when worker roles need to be custom.
clawteam spawn ... --name ...
- Use
- Make worker ownership explicit.
- Give each worker a semantic role such as ,
architect,backend, ortester.risk-analyst - If tasks depend on one another, show .
clawteam task block --id ... --blocked-by ...
- Give each worker a semantic role such as
- Show how to monitor and communicate.
- Include .
clawteam status --team <name> - Include either or
clawteam board --team <name>.clawteam monitor --team <name> - Include or
clawteam sendwhen coordination matters.clawteam broadcast
- Include
- Close with the lifecycle.
- Explain how to mark tasks done, inspect costs when relevant, and tear down the team with .
clawteam teardown --team <name>
- Explain how to mark tasks done, inspect costs when relevant, and tear down the team with
If the user asks for a recommendation, prefer the smallest team that can execute in parallel without overlapping ownership.
当用户要求创建或运行ClawTeam工作流时,请遵循以下流程:
- 首先验证前置条件。
- 检查Python 3.10+、、
tmux,以及至少一个支持的Agent CLI是否可用。git - 如果设置不清晰,运行或展示最小安装命令。
bash scripts/install.sh
- 检查Python 3.10+、
- 选择团队架构。
- 已知场景可使用,比如
clawteam template ...、fullstack、ml-research模板。hedge-fund - 当需要自定义工作节点角色时,使用显式的命令。
clawteam spawn ... --name ...
- 已知场景可使用
- 明确工作节点权责。
- 为每个工作节点赋予语义化角色,比如、
architect、backend、tester。risk-analyst - 如果任务间存在依赖,展示的使用方法。
clawteam task block --id ... --blocked-by ...
- 为每个工作节点赋予语义化角色,比如
- 展示监控与通信方式。
- 包含命令。
clawteam status --team <name> - 包含或
clawteam board --team <name>命令。clawteam monitor --team <name> - 当协调需求较高时,包含或
clawteam send命令。clawteam broadcast
- 包含
- 收尾说明生命周期。
- 说明如何标记任务完成、按需查看成本,以及使用销毁团队。
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 trackingWorkspace isolation: Each worker operates in git branch → no merge conflicts during parallel development.
clawteam/{team}/{worker}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工作区隔离: 每个工作节点运行在 Git分支上 → 并行开发过程中不会出现合并冲突。
clawteam/{team}/{worker}传输层: FileTransport(默认,原子tmp+重命名)或P2PTransport(ZeroMQ TCP,带文件系统降级方案)。
Pre-built Team Templates
预置团队模板
ML Research Team
机器学习研究团队
bash
undefinedbash
undefined8 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
--agents 8
--task "Optimize transformer attention with val_bpb target 0.97"
--team ml-exp
undefinedclawteam template ml-research
--agents 8
--task "Optimize transformer attention with val_bpb target 0.97"
--team ml-exp
--agents 8
--task "Optimize transformer attention with val_bpb target 0.97"
--team ml-exp
undefinedFull-Stack Development Team
全栈开发团队
bash
clawteam template fullstack \
--agents 4 \
--task "Build e-commerce product catalog API" \
--team shop-apibash
clawteam template fullstack \
--agents 4 \
--task "Build e-commerce product catalog API" \
--team shop-apiSpawns: api-designer, backend-dev, frontend-dev, test-engineer
Spawns: api-designer, backend-dev, frontend-dev, test-engineer
undefinedundefinedInvestment Analysis Team
投资分析团队
bash
clawteam template hedge-fund \
--agents 7 \
--ticker AAPL \
--team aapl-analysisbash
clawteam template hedge-fund \
--agents 7 \
--ticker AAPL \
--team aapl-analysisSpawns: 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
undefinedbash
undefinedReal-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.tomltoml
[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 budgetEnvironment variables override config:
bash
CLAWTEAM_TRANSPORT=p2p # use ZeroMQ
CLAWTEAM_BASE_DIR=/tmp/clawteam配置文件路径:
~/.clawteam/config.tomltoml
[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/clawteamCLI Reference
CLI参考
| Command | Description |
|---|---|
| Spawn a worker agent with a task |
| Show team and task status |
| Open web Kanban dashboard |
| Live tmux tiled view |
| Send message to a specific worker |
| Broadcast to all team workers |
| Manage tasks |
| Show token/cost usage |
| Check environment and dependencies |
| Use pre-built team templates |
| Shut down team and clean up |
| 命令 | 描述 |
|---|---|
| 生成带指定任务的工作Agent |
| 展示团队和任务状态 |
| 打开网页看板仪表盘 |
| 实时tmux平铺视图 |
| 向指定工作Agent发送消息 |
| 向团队所有工作Agent广播消息 |
| 管理任务 |
| 展示token/成本消耗 |
| 检查环境和依赖 |
| 使用预置团队模板 |
| 关闭团队并清理资源 |
Worker Auto-Injection
工作Agent自动注入
When ClawTeam spawns a worker, it injects a coordination prompt teaching the agent to:
- Check assigned tasks:
clawteam task list --team {name} --owner {me} - Mark task in progress:
clawteam task start --id {id} - Report completion:
clawteam task done --id {id} - Check inbox:
clawteam inbox --team {name} --worker {me} - Send status:
clawteam send --to leader "Task complete: {summary}"
Workers operate autonomously — no human intervention needed once spawned.
当ClawTeam生成工作Agent时,会自动注入协调提示词,指导Agent完成以下操作:
- 查看分配的任务:
clawteam task list --team {name} --owner {me} - 标记任务进行中:
clawteam task start --id {id} - 上报任务完成:
clawteam task done --id {id} - 查看收件箱:
clawteam inbox --team {name} --worker {me} - 发送状态:
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-buildbash
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-buildExample 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-sweepbash
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-sweepExample 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 backendbash
clawteam status --team shop-api
clawteam board --team shop-api --port 7420
clawteam inbox --team shop-api --worker backendBest practices
最佳实践
- Name workers semantically — ,
auth-worker, nottest-engineerworker-1 - Use task dependencies — prevents out-of-order execution
clawteam task block - Set budget limits — use in config to prevent runaway costs
budget_limit - Use templates for known patterns — ,
ml-research,fullstackhedge-fund - FileTransport for most cases — P2PTransport only needed for cross-machine teams
- Monitor with — web dashboard gives clearest progress view
clawteam board
- 为工作节点起语义化名称 —— 比如、
auth-worker,不要用test-engineer这类名称worker-1 - 使用任务依赖 —— 可避免任务乱序执行
clawteam task block - 设置预算上限 —— 在配置中使用避免超额成本
budget_limit - 已知场景使用模板 —— 、
ml-research、fullstackhedge-fund - 绝大多数场景使用FileTransport —— 仅跨机器团队需要使用P2PTransport
- 使用监控 —— 网页仪表盘提供最清晰的进度视图
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