antfarm-workflows

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Antfarm

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:
antfarm-cli
means
node ~/.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-cli
指代
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js

Workflows

工作流

WorkflowPipelineUse for
feature-dev
plan -> setup -> develop (stories) -> verify -> test -> PR -> reviewNew features, refactors
bug-fix
triage -> investigate -> setup -> fix -> verify -> PRBug reports with reproduction steps
security-audit
scan -> prioritize -> setup -> fix -> verify -> test -> PRCodebase security review
工作流管线适用场景
feature-dev
规划 -> 环境配置 -> 开发(用户故事) -> 验证 -> 测试 -> PR提交 -> 评审新功能开发、重构
bug-fix
问题分类 -> 原因排查 -> 环境配置 -> 修复 -> 验证 -> PR提交附有复现步骤的Bug报告
security-audit
扫描 -> 优先级排序 -> 环境配置 -> 修复 -> 验证 -> 测试 -> PR提交代码库安全评审

Core Commands

核心命令

bash
undefined
bash
undefined

Install 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
undefined
node ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard [start] [--port N] node ~/.openclaw/workspace/antfarm/dist/cli/cli.js dashboard stop
undefined

Before 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:
  1. What to build/fix (specific, not vague)
  2. Key technical details and constraints
  3. Acceptance criteria (checkboxes)
Get the user to confirm the plan and acceptance criteria before running.
任务字符串是你和Agent之间的约定,模糊的任务会导致糟糕的结果。
任务字符串中必须包含:
  1. 需要开发/修复的内容(具体明确,不要模糊)
  2. 关键技术细节和约束条件
  3. 验收标准(可用复选框列出)
运行前请让用户确认计划和验收标准。

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
cron
tool with
action: "run"
and the agent's job ID. List crons to find them — they're named
antfarm/<workflow-id>/<agent-id>
.
要跳过15分钟的cron等待,可使用
cron
工具,传入
action: "run"
和Agent的任务ID。列出所有cron任务即可找到它们,命名格式为
antfarm/<workflow-id>/<agent-id>

Workflow Management

工作流管理

bash
undefined
bash
undefined

List 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]
undefined
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]
undefined

Creating Custom Workflows

创建自定义工作流

See
{baseDir}/../../docs/creating-workflows.md
for the full guide on writing workflow YAML, agent workspaces, step templates, and verification loops.
编写工作流YAML、Agent工作区、步骤模板和验证循环的完整指南请查看
{baseDir}/../../docs/creating-workflows.md

Agent 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 run
bash
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>        # 列出某次运行的用户故事