agi-farm
Builds a complete multi-agent AI team on OpenClaw. One wizard, full team.
Commands
| Command | What it does |
|---|
| INLINECODE0 | Full wizard — agents, workspace, crons, bundle, GitHub |
| INLINECODE1 |
Team health: agents, tasks, cron status |
|
/agi-farm rebuild | Regenerate workspace from existing bundle (preserves edits) |
|
/agi-farm export | Push bundle to GitHub |
|
/agi-farm dashboard | Launch live ops room — see
references/dashboard.md |
|
/agi-farm dispatch | Run auto-dispatcher — see
scripts/auto-dispatch.py |
/agi-farm setup
Ask one question at a time. Do not proceed until confirmed.
Step 1 — Team name
"What should we call your team? (e.g. NovaCorp, TradingDesk — default: MyTeam)"
Store as TEAM_NAME.
Step 2 — Orchestrator name
"What's your orchestrator's name? (default: Cooper)"
Store as ORCHESTRATOR_NAME.
Step 3 — Team size
"How many agents?
3 — Minimal: Orchestrator + Researcher + Builder
5 — Standard: adds QA + Content
11 — Full stack: complete AGI system (recommended)"
Store as PRESET.
Step 3.5 — Domain
"What domain? software / trading / research / general (default) / custom"
If custom: ask for one-phrase description. Store as DOMAIN.
Step 3.6 — Custom agents (PRESET 3 or 5 only)
"Add a custom agent? (yes/no, default: no)"
If yes, collect per agent: id, name, emoji, role, goal. Max 3 custom agents.
Append to roster in Step 7 with "template": "generic".
Step 4 — Frameworks
"Collaboration frameworks? autogen / crewai / langgraph / all / none"
Store as FRAMEWORKS list. all → ["autogen", "crewai", "langgraph"].
Step 5 — GitHub
"Create a GitHub repo for the bundle? yes / no"
Store as CREATE_GITHUB.
Step 6 — Confirm
Show summary, ask "Shall I proceed? (yes/no)". If no → restart Step 1.
Step 7 — Write team.json
CODEBLOCK0
Use the openclaw agents list output to assign each agent a model appropriate for
its role. Write resolved model strings directly into the "model" fields.
Model selection cheat sheet (based on openclaw agents list --json output):
| Role | Recommended tier | Why |
|---|
| Orchestrator | High-capability (e.g. sonnet, opus) | Needs broad reasoning, delegation judgment |
| Solution Architect / Researcher |
High-capability | Deep analysis + design |
| Implementation Engineer | Mid-tier (e.g.
glm-5,
sonnet) | Fast code gen; cost-efficiency matters |
| Debugger | High-capability (e.g.
opus) | Root-cause analysis benefits from deep reasoning |
| Business Analyst / Knowledge | Mid-high (e.g.
gemini-2.0-pro-exp) | Long-context research tasks |
| QA Engineer | Fast/cheap (e.g.
glm-4.7-flash) | High volume, pattern-matching checks |
| Content / Multimodal | Multimodal-capable (e.g.
gemini-2.0-pro-exp) | Vision + rich generation |
| R&D / Process Improvement | High-capability | Creative + structured experimentation |
Tip: assign opus or sonnet to roles that make decisions; use flash/glm-4.7-flash for high-frequency reviewers to manage cost.
3-agent roster:
CODEBLOCK1
5-agent: add to 3-agent roster:
CODEBLOCK2
11-agent roster:
[
{"id":"main", "name":"<ORCHESTRATOR_NAME>","emoji":"🦅","role":"Orchestrator", "goal":"Orchestrate specialists, delegate tasks, synthesize results", "model":"<MODEL>","workspace":"."},
{"id":"sage", "name":"Sage", "emoji":"🔮","role":"Solution Architect", "goal":"Design robust, scalable architectures", "model":"<MODEL>","workspace":"solution-architect"},
{"id":"forge", "name":"Forge", "emoji":"⚒️","role":"Implementation Engineer", "goal":"Implement clean, well-tested code efficiently", "model":"<MODEL>","workspace":"implementation-engineer"},
{"id":"pixel", "name":"Pixel", "emoji":"🐛","role":"Debugger", "goal":"Find the true root cause of any bug or failure", "model":"<MODEL>","workspace":"debugger"},
{"id":"vista", "name":"Vista", "emoji":"🔭","role":"Business Analyst", "goal":"Research deeply and surface the insights that matter most", "model":"<MODEL>","workspace":"business-analyst"},
{"id":"cipher","name":"Cipher", "emoji":"🔊","role":"Knowledge Curator", "goal":"Curate and surface knowledge so the team never forgets", "model":"<MODEL>","workspace":"knowledge-curator"},
{"id":"vigil", "name":"Vigil", "emoji":"🛡️","role":"QA Engineer", "goal":"Ensure every output meets quality standards", "model":"<MODEL>","workspace":"quality-assurance"},
{"id":"anchor","name":"Anchor", "emoji":"⚓", "role":"Content Specialist", "goal":"Craft clear content that communicates complex ideas simply", "model":"<MODEL>","workspace":"content-specialist"},
{"id":"lens", "name":"Lens", "emoji":"📡","role":"Multimodal Specialist", "goal":"Extract meaning from images, documents, and multimodal inputs", "model":"<MODEL>","workspace":"multimodal-specialist"},
{"id":"evolve","name":"Evolve", "emoji":"🔄","role":"Process Improvement Lead","goal":"Make the team better systematically through continuous improvement", "model":"<MODEL>","workspace":"process-improvement"},
{"id":"nova", "name":"Nova", "emoji":"🧪","role":"R&D Lead", "goal":"Turn hypotheses into proven capabilities through structured experimentation", "model":"<MODEL>","workspace":"r-and-d"}
]
Step 8 — Generate workspace files
CODEBLOCK4
Step 9 — Create OpenClaw agents
For each agent except main (skip if already exists):
CODEBLOCK5
Use agent["model"] from team.json directly.
Step 10 — Register cron jobs
CODEBLOCK6
Timezone is read automatically from OpenClaw config. Skips any cron that already exists.
Step 11 — Install frameworks
For each framework in FRAMEWORKS:
CODEBLOCK7
Step 12 — GitHub (if chosen)
CODEBLOCK8
Step 13 — Commit workspace
CODEBLOCK9
Step 14 — Initialize registries + health check
CODEBLOCK10
Step 15 — Done
CODEBLOCK11
/agi-farm status
CODEBLOCK12
/agi-farm rebuild
CODEBLOCK13
INLINECODE42 skips files that already exist, preserving manual edits.
Add --force (remove --no-overwrite) to overwrite everything.
/agi-farm export
CODEBLOCK14
/agi-farm dashboard
React + SSE ops room. File-watcher pushes live data to the browser in ~350ms on any workspace .json or .md change. Runs as a persistent macOS LaunchAgent — always on, auto-restarts on crash.
Architecture
CODEBLOCK15
Data sources (all real-time from workspace files)
| Field | Source file | Refresh |
|---|
| tasks, taskcounts, slaat_risk | INLINECODE49 | instant |
| agents (inbox, perf, status) |
AGENT_STATUS.json,
AGENT_PERFORMANCE.json,
comms/inboxes/ | instant |
| agent model, cron error/busy |
openclaw agents/cron list | 30s cache |
| budget |
BUDGET.json | instant |
| velocity |
VELOCITY.json | instant |
| okrs |
OKRs.json | instant |
| broadcast |
comms/broadcast.md | instant |
| experiments / backlog |
EXPERIMENTS.json,
IMPROVEMENT_BACKLOG.json | instant |
| knowledge_count |
SHARED_KNOWLEDGE.json | instant |
| memory_lines |
MEMORY.md | instant |
LaunchAgent (always-on)
The dashboard is registered as ai.coopercorp.dashboard and starts automatically at login.
CODEBLOCK16
URL: http://localhost:8080
Rebuild React frontend
CODEBLOCK17
Full reference: references/dashboard.md
/agi-farm dispatch
CODEBLOCK18
Fires agent sessions for pending tasks, handles HITL notifications, stale task
resets, rate-limit backoff, and dependency checking. Cron (every 1 min):
* * * * * python3 ~/.openclaw/skills/agi-farm/scripts/auto-dispatch.py --execute \
>> ~/.openclaw/workspace/logs/auto-dispatch.log 2>&1
Troubleshooting
Setup issues
| Symptom | Fix |
|---|
| INLINECODE64 fails with INLINECODE65 | Run INLINECODE66 |
| INLINECODE67 says agent already exists |
Safe to ignore — skip that agent |
|
gh repo create fails | Run
gh auth login first |
| Cron registration shows 0 crons added | Run
openclaw cron list to check for duplicates; use
--force flag on re-register |
|
git commit fails in Step 13 | Run
git config --global user.email and set name/email first |
Runtime issues
| Symptom | Fix |
|---|
| Auto-dispatcher fires but agents don't respond | Check logs/auto-dispatch.log; verify openclaw agents list shows agents |
| Dashboard shows stale data |
Restart LaunchAgent:
launchctl stop ai.coopercorp.dashboard && launchctl start ai.coopercorp.dashboard |
| TASKS.json parse error | Validate JSON:
python3 -m json.tool ~/.openclaw/workspace/TASKS.json |
| Agent stuck >30 min | Check broadcast.md for
[BLOCKED] tags; reassign task manually |
| Rate-limit backoff too aggressive | Edit
RATE_LIMIT_BACKOFF_MIN in
scripts/auto-dispatch.py (default: 10 min) |
|
openclaw not found in cron | Set
OPENCLAW_BIN=/path/to/openclaw in the cron environment, or add
PATH=/opt/homebrew/bin:$PATH |
Recovery
CODEBLOCK20
agi-farm
在 OpenClaw 上构建一个完整的多智能体 AI 团队。一个向导,完整的团队。
命令
| 命令 | 功能 |
|---|
| /agi-farm setup | 完整向导 — 智能体、工作区、定时任务、捆绑包、GitHub |
| /agi-farm status |
团队健康状态:智能体、任务、定时任务状态 |
| /agi-farm rebuild | 从现有捆绑包重新生成工作区(保留编辑内容) |
| /agi-farm export | 将捆绑包推送到 GitHub |
| /agi-farm dashboard | 启动实时运营室 — 参见
references/dashboard.md |
| /agi-farm dispatch | 运行自动调度器 — 参见
scripts/auto-dispatch.py |
/agi-farm setup
每次只问一个问题。在确认之前不要继续。
步骤 1 — 团队名称
你的团队叫什么名字?(例如 NovaCorp、TradingDesk — 默认:MyTeam)
存储为 TEAM_NAME。
步骤 2 — 协调器名称
你的协调器叫什么名字?(默认:Cooper)
存储为 ORCHESTRATOR_NAME。
步骤 3 — 团队规模
需要多少个智能体?
3 — 最小化:协调器 + 研究员 + 构建者
5 — 标准:增加 QA + 内容
11 — 全栈:完整的 AGI 系统(推荐)
存储为 PRESET。
步骤 3.5 — 领域
什么领域?软件 / 交易 / 研究 / 通用(默认)/ 自定义
如果选择自定义:要求提供一句话描述。存储为 DOMAIN。
步骤 3.6 — 自定义智能体(仅限 PRESET 3 或 5)
添加自定义智能体?(是/否,默认:否)
如果是,为每个智能体收集:id、name、emoji、role、goal。最多 3 个自定义智能体。
在步骤 7 中追加到名册,使用 template: generic。
步骤 4 — 框架
协作框架?autogen / crewai / langgraph / all / none
存储为 FRAMEWORKS 列表。all → [autogen, crewai, langgraph]。
步骤 5 — GitHub
为捆绑包创建 GitHub 仓库?是 / 否
存储为 CREATE_GITHUB。
步骤 6 — 确认
显示摘要,询问是否继续?(是/否)。如果否 → 重新开始步骤 1。
步骤 7 — 写入 team.json
bash
mkdir -p ~/.openclaw/workspace/agi-farm-bundle/
openclaw agents list --json # 使用输出为每个角色分配适当的模型
使用 openclaw agents list 输出为每个智能体分配适合其角色的模型。将解析后的模型字符串直接写入 model 字段。
模型选择速查表(基于 openclaw agents list --json 输出):
| 角色 | 推荐层级 | 原因 |
|---|
| 协调器 | 高能力(例如 sonnet、opus) | 需要广泛的推理、委派判断 |
| 解决方案架构师 / 研究员 |
高能力 | 深度分析 + 设计 |
| 实现工程师 | 中端(例如 glm-5、sonnet) | 快速代码生成;成本效益重要 |
| 调试器 | 高能力(例如 opus) | 根因分析受益于深度推理 |
| 业务分析师 / 知识 | 中高(例如 gemini-2.0-pro-exp) | 长上下文研究任务 |
| QA 工程师 | 快速/便宜(例如 glm-4.7-flash) | 高容量、模式匹配检查 |
| 内容 / 多模态 | 多模态能力(例如 gemini-2.0-pro-exp) | 视觉 + 丰富生成 |
| 研发 / 流程改进 | 高能力 | 创造性 + 结构化实验 |
提示:将 opus 或 sonnet 分配给做决策的角色;使用 flash/glm-4.7-flash 给高频审查者以控制成本。
3 智能体名册:
json
{teamname:NAME>,orchestratorname:NAME>,preset:3,
domain:,frameworks:JSON>,createdat:,
agents:[
{id:main, name:,emoji:🦅,role:Orchestrator, goal:协调团队、委派任务、综合结果, model:,workspace:.},
{id:researcher, name:Sage, emoji:🔮,role:Researcher, goal:深入研究并揭示最重要的洞察, model:,workspace:researcher},
{id:builder, name:Forge, emoji:⚒️,role:Builder, goal:干净高效地实现解决方案, model:,workspace:builder}
]}
5 智能体: 在 3 智能体名册基础上增加:
json
{id:qa, name:Vigil, emoji:🛡️,role:QA Engineer, goal:确保每个输出都符合质量标准,model:,workspace:qa},
{id:content,name:Anchor,emoji:⚓, role:Content Specialist,goal:制作清晰的内容,用简单的方式传达复杂想法,model:,workspace:content}
11 智能体名册:
json
[
{id:main, name:,emoji:🦅,role:Orchestrator, goal:协调专家、委派任务、综合结果, model:,workspace:.},
{id:sage, name:Sage, emoji:🔮,role:Solution Architect, goal:设计稳健、可扩展的架构, model:,workspace:solution-architect},
{id:forge, name:Forge, emoji:⚒️,role:Implementation Engineer, goal:高效实现干净、经过良好测试的代码, model:,workspace:implementation-engineer},
{id:pixel, name:Pixel, emoji:🐛,role:Debugger, goal:找到任何错误或失败的真实根本原因, model:,workspace:debugger},
{id:vista, name:Vista, emoji:🔭,role:Business Analyst, goal:深入研究并揭示最重要的洞察, model:,workspace:business-analyst},
{id:cipher,name:Cipher, emoji:🔊,role:Knowledge Curator, goal:策划和呈现知识,让团队永不遗忘, model:,workspace:knowledge-curator},
{id:vigil, name:Vigil, emoji:🛡️,role:QA Engineer, goal:确保每个输出都符合质量标准, model:,workspace:quality-assurance},
{id:anchor,name:Anchor, emoji:⚓, role:Content Specialist, goal:制作清晰的内容,用简单的方式传达复杂想法, model:,workspace:content-specialist},
{id:lens, name:Lens, emoji:📡,role:Multimodal Specialist, goal:从图像、文档和多模态输入中提取意义, model:,workspace:multimodal-specialist},
{id:evolve,name:Evolve, emoji:🔄,role:Process Improvement Lead,goal:通过持续改进系统性地让团队变得更好, model:,workspace:process-improvement},
{id:nova, name:Nova, emoji:🧪,role:R&D Lead, goal:通过结构化实验将假设转化为