antfarm-workflows
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAntfarm
Antfarm
Multi-agent workflow pipelines on OpenClaw. Each workflow is a sequence of specialized agents (planner, developer, verifier, tester, reviewer) that execute autonomously via cron jobs polling a shared SQLite database.
All CLI commands use the full path to avoid PATH issues:
bash
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js <command>Shorthand used below: means .
antfarm-clinode ~/.openclaw/workspace/antfarm/dist/cli/cli.js运行在OpenClaw上的多Agent工作流管线。每个工作流由一系列专门的Agent(规划器、开发者、验证器、测试人员、评审员)组成,这些Agent通过轮询共享SQLite数据库的cron任务自主执行。
所有CLI命令均使用完整路径以避免PATH配置问题:
bash
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js <command>下文使用简写: 指代 。
antfarm-clinode ~/.openclaw/workspace/antfarm/dist/cli/cli.jsWorkflows
工作流
| Workflow | Pipeline | Use for |
|---|---|---|
| plan -> setup -> develop (stories) -> verify -> test -> PR -> review | New features, refactors |
| triage -> investigate -> setup -> fix -> verify -> PR | Bug reports with reproduction steps |
| scan -> prioritize -> setup -> fix -> verify -> test -> PR | Codebase security review |
| 工作流 | 管线 | 适用场景 |
|---|---|---|
| 规划 -> 环境配置 -> 开发(用户故事) -> 验证 -> 测试 -> PR提交 -> 评审 | 新功能开发、重构 |
| 问题分类 -> 原因排查 -> 环境配置 -> 修复 -> 验证 -> PR提交 | 附有复现步骤的Bug报告 |
| 扫描 -> 优先级排序 -> 环境配置 -> 修复 -> 验证 -> 测试 -> PR提交 | 代码库安全评审 |
Core Commands
核心命令
bash
undefinedbash
undefinedInstall all workflows (creates agents + starts dashboard)
安装所有工作流(创建Agent + 启动仪表盘)
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js install
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js install
Full uninstall (workflows, agents, crons, DB, dashboard)
完全卸载(工作流、Agent、定时任务、数据库、仪表盘)
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js uninstall [--force]
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js uninstall [--force]
Start a run
启动一次运行
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow run <workflow-id> "<detailed task with acceptance criteria>"
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow run <workflow-id> "<含验收标准的详细任务>"
Check a run
查看运行状态
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow status "<task or run-id prefix>"
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow status "<任务或运行ID前缀>"
List all runs
列出所有运行记录
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow runs
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow runs
Resume a failed run from the failed step
从失败步骤恢复失败的运行
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow resume <run-id>
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow resume <run-id>
View logs
查看日志
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js logs [lines]
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js logs [lines]
Dashboard
仪表盘操作
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard [start] [--port N]
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard stop
undefinednode ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard [start] [--port N]
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard stop
undefinedBefore Starting a Run
启动运行前注意事项
The task string is the contract between you and the agents. A vague task produces bad results.
Always include in the task string:
- What to build/fix (specific, not vague)
- Key technical details and constraints
- Acceptance criteria (checkboxes)
Get the user to confirm the plan and acceptance criteria before running.
任务字符串是你和Agent之间的约定,模糊的任务会导致糟糕的结果。
任务字符串中必须包含:
- 需要开发/修复的内容(具体明确,不要模糊)
- 关键技术细节和约束条件
- 验收标准(可用复选框列出)
运行前请让用户确认计划和验收标准。
How It Works
运行原理
- Agents have cron jobs (every 15 min, staggered) that poll for pending steps
- Each agent claims its step, does the work, marks it done, advancing the next step
- Context passes between steps via KEY: value pairs in agent output
- No central orchestrator — agents are autonomous
- Agent 拥有定时cron任务(每15分钟,错峰执行)轮询待处理步骤
- 每个Agent认领对应步骤,完成工作后标记为已完成,推进到下一个步骤
- 上下文通过Agent输出中的KEY: value键值对在步骤间传递
- 无中央编排器 —— Agent是完全自治的
Force-Triggering Agents
强制触发Agent
To skip the 15-min cron wait, use the tool with and the agent's job ID. List crons to find them — they're named .
cronaction: "run"antfarm/<workflow-id>/<agent-id>要跳过15分钟的cron等待,可使用工具,传入和Agent的任务ID。列出所有cron任务即可找到它们,命名格式为。
cronaction: "run"antfarm/<workflow-id>/<agent-id>Workflow Management
工作流管理
bash
undefinedbash
undefinedList available workflows
列出可用工作流
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow list
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow list
Install/uninstall individual workflows
安装/卸载单个工作流
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow install <name>
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow uninstall <name>
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow uninstall --all [--force]
undefinednode ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow install <name>
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow uninstall <name>
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js workflow uninstall --all [--force]
undefinedCreating Custom Workflows
创建自定义工作流
See for the full guide on writing workflow YAML, agent workspaces, step templates, and verification loops.
{baseDir}/../../docs/creating-workflows.md编写工作流YAML、Agent工作区、步骤模板和验证循环的完整指南请查看 。
{baseDir}/../../docs/creating-workflows.mdAgent Step Operations (used by agent cron jobs, not typically manual)
Agent步骤操作(供Agent定时任务使用,通常不需要手动操作)
bash
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step claim <agent-id> # Claim pending step
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step complete <step-id> # Complete step (output from stdin)
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step fail <step-id> <error> # Fail step with retry
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step stories <run-id> # List stories for a runbash
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step claim <agent-id> # 认领待处理步骤
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step complete <step-id> # 完成步骤(从标准输入读取输出)
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step fail <step-id> <error> # 标记步骤失败,支持重试
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js step stories <run-id> # 列出某次运行的用户故事