LeoYeAI/agent-master-skills / skills/agi-farm
agi-farm
FlaggedInteractive setup wizard that creates a fully working multi-agent AI team on OpenClaw. One command bootstraps agents, SOUL.md personas, comms infrastructure (inboxes/outboxes/broadcast), cron jobs, auto-dispatcher (HITL + rate-limit backoff + dependency checking), and a portable GitHub bundle โ all customized to team name, size (3/5/11 agents), domain, and frameworks (autogen/crewai/langgraph). Includes a React + SSE live ops dashboard with file-watcher (~350ms push latency) and persistent macOS LaunchAgent. Model-selection guidance built in. Commands: setup | status | rebuild | export | dashboard | dispatch
README.md
View on GitHub# ๐ฆ
AGI Farm
> One wizard. Full multi-agent AI team. Live in minutes.
**AGI Farm** is an [OpenClaw](https://docs.openclaw.ai) skill that bootstraps a fully operational multi-agent AI system โ agents, workspaces, cron jobs, comms infrastructure, live ops dashboard, and a portable GitHub bundle โ all from a single interactive wizard.
---
## โจ What It Does
- ๐ง **Interactive setup wizard** โ answers 6 questions, generates everything
- ๐ค **Multi-agent team** โ 3, 5, or 11 pre-wired specialist agents
- ๐ก **Live ops dashboard** โ React + SSE, ~350ms push latency, persistent LaunchAgent
- ๐ **Auto-dispatcher** โ cron-driven task delegation with HITL, rate-limit backoff, dependency checking
- ๐ฆ **Portable bundle** โ export your team to GitHub with one command
- ๐งฉ **Framework support** โ autogen, crewai, langgraph out of the box
---
## ๐บ๏ธ Architecture
### System Overview
```mermaid
graph TB
User["๐ค User"] -->|"/agi-farm setup"| Cooper["๐ฆ
Cooper\nOrchestrator"]
subgraph Workspace ["~/.openclaw/workspace/"]
Cooper --> TASKS["๐ TASKS.json"]
Cooper --> COMMS["๐ฌ comms/\ninboxes & outboxes"]
Cooper --> BROADCAST["๐ข broadcast.md"]
end
subgraph Agents ["Specialist Agents"]
Sage["๐ฎ Sage\nSolution Architect"]
Forge["โ๏ธ Forge\nImpl. Engineer"]
Pixel["๐ Pixel\nDebugger"]
Vista["๐ญ Vista\nBiz Analyst"]
Cipher["๐ Cipher\nKnowledge Curator"]
Vigil["๐ก๏ธ Vigil\nQA Engineer"]
Anchor["โ Anchor\nContent Specialist"]
Lens["๐ก Lens\nMultimodal"]
end
COMMS -->|"inbox task"| Sage & Forge & Pixel & Vista & Cipher & Vigil & Anchor & Lens
Sage & Forge & Pixel & Vista & Cipher & Vigil & Anchor & Lens -->|"outbox result"| Cooper
subgraph Infra ["Infrastructure"]
Dispatcher["๐ auto-dispatch.py\n(cron every 1 min)"]
Dashboard["๐ dashboard.py\n(SSE server :8080)"]
CronJobs["โฐ OpenClaw Crons\n(heartbeat, sweep, dispatch)"]
end
Dispatcher -->|"trigger agent sessions"| Agents
Dashboard -->|"file-watch"| Workspace
```
### Setup Wizard Flow
```mermaid
flowchart LR
S1["Step 1\nTeam Name"] --> S2["Step 2\nOrchestrator Name"]
S2 --> S3["Step 3\nTeam Size\n3 / 5 / 11"]
S3 --> S35["Step 3.5\nDomain"]
S35 --> S36["Step 3.6\nCustom Agents?"]
S36 --> S4["Step 4\nFrameworks"]
S4 --> S5["Step 5\nGitHub?"]
S5 --> S6["Step 6\nConfirm"]
S6 --> S7["Step 7\nWrite team.json\nassign models"]
S7 --> S8["Step 8\nGenerate workspace\nfiles via generate.py"]
S8 --> S9["Step 9\nCreate OpenClaw\nagents"]
S9 --> S10["Step 10\nRegister cron jobs"]
S10 --> S11["Step 11\nInstall frameworks"]
S11 --> S12["Step 12\nGitHub push"]
S12 --> S13["Step 13\nCommit workspace"]
S13 --> S14["Step 14\nInit registries\nhealth check"]
S14 --> DONE["โ
Team is live!"]
```
### Auto-Dispatcher Logic
```mermaid
flowchart TD
Start["โฐ Cron triggers\nevery 1 min"] --> LoadState["Load TASKS.json\nDISPATCHER_STATE.json"]
LoadState --> HITL["HITL scan\nneeds_human_decision?"]
HITL -->|"yes"| Notify["๐จ Notify orchestrator\n2h cooldown"]
HITL -->|"no"| Stale["Stale reset\nin_progress >90 min?"]
Notify --> Stale
Stale -->|"yes"| Reset["Reset to pending"]
Stale --> Pending["Filter pending tasks\nby eligible agents"]
Reset --> Pending
Pending --> Check["Per agent checks:\nnot orchestrator\nnot on cooldown\nnot rate-limited\nnot blocked\ndeps satisfied\nhas inbox messages"]
Check -->|"eligible"| Trigger["๐ Trigger agent session\nparallel fire-and-forget"]
Check -->|"skip"| Log["๐ Log skip reason"]
Trigger --> RateCheck["Detect rate-limit\nin early output?"]
RateCheck -->|"yes"| Backoff["Set 10-min backoff"]
RateCheck -->|"no"| UpdateState["Update DISPATCHER_STATE.json\ncooldown timer"]
Backoff --> UpdateState
Log --> UpdateState
UpdateState --> Done["Done โ next run in 1 min"]
```
### Dashboard Architecture
```mermaid
graph LR
subgraph Backend ["dashboard.py (Python)"]
Watcher["WorkspaceWatcher\nwatchdog 250ms debounce"]
Cache["SlowDataCache\nagents + crons 30s refresh"]
SSE["SSE Broadcaster\n/api/stream"]
end
subgraph Frontend ["dashboard-react (Vite + React 18)"]
Hook["useDashboard.js\nSSE + auto-reconnect"]
Tabs["Overview ยท Agents ยท Tasks\nVelocity ยท Budget ยท OKRs\nR&D ยท Broadcast"]
end
subgraph Files ["Workspace Files (watched)"]
TJ["TASKS.json"]
AS["AGENT_STATUS.json"]
BU["BUDGET.json"]
VE["VELOCITY.json"]
OK["OKRs.json"]
BC["comms/broadcast.md"]
end
Files -->|"fs events"| Watcher
Watcher --> SSE
Cache --> SSE
SSE -->|"push ~350ms"| Hook
Hook --> Tabs
```
### Agent Communication Protocol
```mermaid
sequenceDiagram
participant U as ๐ค User
participant C as ๐ฆ
Cooper
participant I as ๐ฌ comms/inboxes/
participant A as ๐ค Specialist Agent
participant O as ๐ค comms/outboxes/
participant T as ๐ TASKS.json
U->>C: Request
C->>T: Create task (status: pending)
C->>I: Write task to agent inbox
loop Auto-Dispatcher (every 1 min)
A->>I: Reads inbox
A->>A: Executes task
A->>O: Writes result to outbox
A->>I: Marks task [DONE]
end
C->>O: Reads agent outbox
C->>T: Update task (status: complete)
C->>U: Synthesized result
```
---
## ๐ Quick Start
```bash
# Install via ClawHub
clawhub install agi-farm
# Run the setup wizard
/agi-farm setup
```
Answer the questions. Your team will be live in ~2 minutes.
---
## ๐ฆ Commands
| Command | What it does |
|---------|-------------|
| `/agi-farm setup` | Full wizard โ agents, workspace, crons, bundle, GitHub |
| `/agi-farm status` | 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 (React + SSE, :8080) |
| `/agi-farm dispatch` | Run auto-dispatcher manually |
---
## ๐ค Team Presets
### 3-agent (Minimal)
```
๐ฆ
Orchestrator โโโบ ๐ฎ Researcher โโโบ โ๏ธ Builder
```
### 5-agent (Standard)
```
๐ฆ
Orchestrator โโโบ ๐ฎ Researcher โโโบ โ๏ธ Builder
โโโบ ๐ก๏ธ QA โโโบ โ Content
```
### 11-agent (Full Stack โ Recommended)
```
๐ฆ
Cooper (Orchestrator)
โโโ ๐ฎ Sage Solution Architect
โโโ โ๏ธ Forge Implementation Engineer
โโโ ๐ Pixel Debugger
โโโ ๐ญ Vista Business Analyst
โโโ ๐ Cipher Knowledge Curator
โโโ ๐ก๏ธ Vigil QA Engineer
โโโ โ Anchor Content Specialist
โโโ ๐ก Lens Multimodal Specialist
โโโ ๐ Evolve Process Improvement Lead
โโโ ๐งช Nova R&D Lead
```
---
## ๐ง Model Selection Guide
| Role | Recommended tier | Why |
|------|-----------------|-----|
| Orchestrator | High (`sonnet`, `opus`) | Delegation judgment, broad reasoning |
| Architect / Researcher | High | Deep analysis, design decisions |
| Implementation Engineer | Mid (`glm-5`, `sonnet`) | Fast code gen, cost-efficiency |
| Debugger | High (`opus`) | Root-cause analysis |
| Business Analyst / Knowledge | Mid-high (`gemini-2.0-pro-exp`) | Long-context research |
| QA Engineer | Fast (`glm-4.7-flash`) | High-volume pattern checks |
| Content / Multimodal | Multimodal (`gemini-2.0-pro-exp`) | Vision + rich generation |
| R&D / Process Improvement | High | Creative + structured experiments |
---
## ๐ Troubleshooting
| Symptom | Fix |
|---------|-----|
| `generate.py` fails: `ModuleNotFoundError` | `pip3 install jinja2` |
| `openclaw` not found in cron | Set `OPENCLAW_BIN=/path/to/openclaw` env var |
| Dashboard shows stale data | `launchctl stop ai.coopercorp.dashboard && launchctl start ai.coopercorp.dashboard` |
| Agent stuck >30 min | Check `comms/broadcast.md` for `[BLOCKED]` tags |
| Rate-limit backoff too aggressive | Edit `RATE_LIMIT_BACKOFF_MIN` in `scripts/auto-dispatch.py` |
| `gh repo create` fails | Run `gh auth login` first |
---
## ๐ Structure
```
agi-farm/
โโโ SKILL.md OpenClaw skill entry point
โโโ generate.py Workspace file generator (Jinja2)
โโโ scripts/
โ โโโ auto-dispatch.py Cron-driven task dispatcher
โ โโโ register-crons.py Cron job registration
โโโ templates/ 30 templates (SOUL.md, CLAUDE.md, TASKS.json, ...)
โโโ references/
โ โโโ dashboard.md Dashboard reference docs
โโโ dashboard-react/ Vite + React 18 frontend (dist/ served by dashboard.py)
```
---
## ๐ License
MIT โ built for [OpenClaw](https://docs.openclaw.ai) ยท published on [ClawHub](https://clawhub.com)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path โ even casually (like "the xlsx in my downloads") โ and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |