agi-farm 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +542 -0
- package/dashboard-dist/assets/index-BkPgvUOQ.js +50 -0
- package/dashboard-dist/assets/index-CAS2IEKB.css +1 -0
- package/dashboard-dist/index.html +14 -0
- package/dashboard-dist/vite.svg +1 -0
- package/openclaw.plugin.json +103 -0
- package/package.json +94 -0
- package/scripts/dashboard.js +46 -0
- package/scripts/dispatch.js +48 -0
- package/scripts/export.js +81 -0
- package/scripts/rebuild.js +65 -0
- package/scripts/setup.js +361 -0
- package/scripts/status.js +82 -0
- package/scripts/teardown.js +109 -0
- package/server/dashboard.js +459 -0
- package/server/utils.js +83 -0
- package/skills/agi-farm/SKILL.md +439 -0
- package/templates/AGENTS.md.template +37 -0
- package/templates/BOOTSTRAP.md.template +39 -0
- package/templates/CLAUDE.md.template +119 -0
- package/templates/DASHBOARD.md.template +31 -0
- package/templates/DECISIONS.md.template +16 -0
- package/templates/EXPERIMENTS.json.template +10 -0
- package/templates/FAILURES.md.template +13 -0
- package/templates/HEARTBEAT.md.template +24 -0
- package/templates/IDENTITY.md.template +34 -0
- package/templates/IMPROVEMENT_BACKLOG.json.template +29 -0
- package/templates/MEMORY.md.template +39 -0
- package/templates/PROCESSES.json.template +61 -0
- package/templates/README.md.bundle.template +78 -0
- package/templates/SHARED_KNOWLEDGE.json.template +10 -0
- package/templates/SOUL.md.anchor +61 -0
- package/templates/SOUL.md.cipher +69 -0
- package/templates/SOUL.md.evolve +58 -0
- package/templates/SOUL.md.forge +55 -0
- package/templates/SOUL.md.generic +65 -0
- package/templates/SOUL.md.lens +62 -0
- package/templates/SOUL.md.main +96 -0
- package/templates/SOUL.md.nova +75 -0
- package/templates/SOUL.md.pixel +58 -0
- package/templates/SOUL.md.sage +67 -0
- package/templates/SOUL.md.vigil +71 -0
- package/templates/SOUL.md.vista +64 -0
- package/templates/TASKS.json.template +34 -0
- package/templates/TOOLS.md.template +26 -0
- package/templates/USER.md.template +18 -0
- package/templates/install.sh.template +79 -0
- package/templates/standards/coding.md.template +27 -0
- package/templates/standards/documentation.md.template +26 -0
- package/templates/standards/quality.md.template +37 -0
- package/templates/standards/research.md.template +23 -0
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agi-farm
|
|
3
|
+
description: >
|
|
4
|
+
Interactive setup wizard that creates a fully working multi-agent AI team on OpenClaw.
|
|
5
|
+
One command bootstraps agents, SOUL.md personas, comms infrastructure (inboxes/outboxes/broadcast),
|
|
6
|
+
cron jobs, auto-dispatcher (HITL + rate-limit backoff + dependency checking), and a portable
|
|
7
|
+
GitHub bundle — all customized to team name, size (3/5/11 agents), domain, and frameworks
|
|
8
|
+
(autogen/crewai/langgraph). Includes a React + SSE live ops dashboard with file-watcher
|
|
9
|
+
(~350ms push latency) and persistent macOS LaunchAgent. Model-selection guidance built in.
|
|
10
|
+
Commands: setup | status | rebuild | export | dashboard | dispatch
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# agi-farm
|
|
14
|
+
|
|
15
|
+
Builds a complete multi-agent AI team on OpenClaw. One wizard, full team.
|
|
16
|
+
|
|
17
|
+
> **Note:** AGI Farm is now an OpenClaw plugin. See the plugin documentation at
|
|
18
|
+
> `~/.openclaw/extensions/agi-farm/README.md` for full details.
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
| Command | What it does |
|
|
23
|
+
|---------|-------------|
|
|
24
|
+
| `/agi-farm setup` | Full wizard — agents, workspace, crons, bundle, GitHub |
|
|
25
|
+
| `/agi-farm status` | Team health: agents, tasks, cron status |
|
|
26
|
+
| `/agi-farm rebuild` | Regenerate workspace from existing bundle (preserves edits) |
|
|
27
|
+
| `/agi-farm export` | Push bundle to GitHub |
|
|
28
|
+
| `/agi-farm dashboard` | Launch live ops room — see [references/dashboard.md](references/dashboard.md) |
|
|
29
|
+
| `/agi-farm dispatch` | Run auto-dispatcher — see [scripts/auto-dispatch.py](scripts/auto-dispatch.py) |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## `/agi-farm setup`
|
|
34
|
+
|
|
35
|
+
Ask **one question at a time**. Do not proceed until confirmed.
|
|
36
|
+
|
|
37
|
+
### Step 1 — Team name
|
|
38
|
+
> "What should we call your team? (e.g. NovaCorp, TradingDesk — default: MyTeam)"
|
|
39
|
+
|
|
40
|
+
Store as `TEAM_NAME`.
|
|
41
|
+
|
|
42
|
+
### Step 2 — Orchestrator name
|
|
43
|
+
> "What's your orchestrator's name? (default: Cooper)"
|
|
44
|
+
|
|
45
|
+
Store as `ORCHESTRATOR_NAME`.
|
|
46
|
+
|
|
47
|
+
### Step 3 — Team size
|
|
48
|
+
> "How many agents?
|
|
49
|
+
> **3** — Minimal: Orchestrator + Researcher + Builder
|
|
50
|
+
> **5** — Standard: adds QA + Content
|
|
51
|
+
> **11** — Full stack: complete AGI system (recommended)"
|
|
52
|
+
|
|
53
|
+
Store as `PRESET`.
|
|
54
|
+
|
|
55
|
+
### Step 3.5 — Domain
|
|
56
|
+
> "What domain? software / trading / research / general (default) / custom"
|
|
57
|
+
|
|
58
|
+
If custom: ask for one-phrase description. Store as `DOMAIN`.
|
|
59
|
+
|
|
60
|
+
### Step 3.6 — Custom agents _(PRESET 3 or 5 only)_
|
|
61
|
+
> "Add a custom agent? (yes/no, default: no)"
|
|
62
|
+
|
|
63
|
+
If yes, collect per agent: `id`, `name`, `emoji`, `role`, `goal`. Max 3 custom agents.
|
|
64
|
+
Append to roster in Step 7 with `"template": "generic"`.
|
|
65
|
+
|
|
66
|
+
### Step 4 — Frameworks
|
|
67
|
+
> "Collaboration frameworks? autogen / crewai / langgraph / all / none"
|
|
68
|
+
|
|
69
|
+
Store as `FRAMEWORKS` list. `all` → `["autogen", "crewai", "langgraph"]`.
|
|
70
|
+
|
|
71
|
+
### Step 5 — GitHub
|
|
72
|
+
> "Create a GitHub repo for the bundle? yes / no"
|
|
73
|
+
|
|
74
|
+
Store as `CREATE_GITHUB`.
|
|
75
|
+
|
|
76
|
+
### Step 6 — Confirm
|
|
77
|
+
Show summary, ask "Shall I proceed? (yes/no)". If no → restart Step 1.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### Step 7 — Write `team.json`
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mkdir -p ~/.openclaw/workspace/agi-farm-bundle/
|
|
85
|
+
openclaw agents list --json # use output to assign appropriate models per role
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Use the `openclaw agents list` output to assign each agent a model appropriate for
|
|
89
|
+
its role. Write resolved model strings directly into the `"model"` fields.
|
|
90
|
+
|
|
91
|
+
**Model selection cheat sheet** (based on `openclaw agents list --json` output):
|
|
92
|
+
|
|
93
|
+
| Role | Recommended tier | Why |
|
|
94
|
+
|------|-----------------|-----|
|
|
95
|
+
| Orchestrator | High-capability (e.g. `sonnet`, `opus`) | Needs broad reasoning, delegation judgment |
|
|
96
|
+
| Solution Architect / Researcher | High-capability | Deep analysis + design |
|
|
97
|
+
| Implementation Engineer | Mid-tier (e.g. `glm-5`, `sonnet`) | Fast code gen; cost-efficiency matters |
|
|
98
|
+
| Debugger | High-capability (e.g. `opus`) | Root-cause analysis benefits from deep reasoning |
|
|
99
|
+
| Business Analyst / Knowledge | Mid-high (e.g. `gemini-2.0-pro-exp`) | Long-context research tasks |
|
|
100
|
+
| QA Engineer | Fast/cheap (e.g. `glm-4.7-flash`) | High volume, pattern-matching checks |
|
|
101
|
+
| Content / Multimodal | Multimodal-capable (e.g. `gemini-2.0-pro-exp`) | Vision + rich generation |
|
|
102
|
+
| R&D / Process Improvement | High-capability | Creative + structured experimentation |
|
|
103
|
+
|
|
104
|
+
> Tip: assign `opus` or `sonnet` to roles that make decisions; use `flash`/`glm-4.7-flash` for high-frequency reviewers to manage cost.
|
|
105
|
+
|
|
106
|
+
**3-agent roster:**
|
|
107
|
+
```json
|
|
108
|
+
{"team_name":"<TEAM_NAME>","orchestrator_name":"<ORCHESTRATOR_NAME>","preset":"3",
|
|
109
|
+
"domain":"<DOMAIN>","frameworks":<FRAMEWORKS_JSON>,"created_at":"<ISO_TIMESTAMP>",
|
|
110
|
+
"agents":[
|
|
111
|
+
{"id":"main", "name":"<ORCHESTRATOR_NAME>","emoji":"🦅","role":"Orchestrator", "goal":"Orchestrate the team, delegate tasks, synthesize results", "model":"<MODEL>","workspace":"."},
|
|
112
|
+
{"id":"researcher", "name":"Sage", "emoji":"🔮","role":"Researcher", "goal":"Research deeply and surface the insights that matter most", "model":"<MODEL>","workspace":"researcher"},
|
|
113
|
+
{"id":"builder", "name":"Forge", "emoji":"⚒️","role":"Builder", "goal":"Implement solutions cleanly and efficiently", "model":"<MODEL>","workspace":"builder"}
|
|
114
|
+
]}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**5-agent:** add to 3-agent roster:
|
|
118
|
+
```json
|
|
119
|
+
{"id":"qa", "name":"Vigil", "emoji":"🛡️","role":"QA Engineer", "goal":"Ensure every output meets quality standards","model":"<MODEL>","workspace":"qa"},
|
|
120
|
+
{"id":"content","name":"Anchor","emoji":"⚓", "role":"Content Specialist","goal":"Craft clear content that communicates complex ideas simply","model":"<MODEL>","workspace":"content"}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**11-agent roster:**
|
|
124
|
+
```json
|
|
125
|
+
[
|
|
126
|
+
{"id":"main", "name":"<ORCHESTRATOR_NAME>","emoji":"🦅","role":"Orchestrator", "goal":"Orchestrate specialists, delegate tasks, synthesize results", "model":"<MODEL>","workspace":"."},
|
|
127
|
+
{"id":"sage", "name":"Sage", "emoji":"🔮","role":"Solution Architect", "goal":"Design robust, scalable architectures", "model":"<MODEL>","workspace":"solution-architect"},
|
|
128
|
+
{"id":"forge", "name":"Forge", "emoji":"⚒️","role":"Implementation Engineer", "goal":"Implement clean, well-tested code efficiently", "model":"<MODEL>","workspace":"implementation-engineer"},
|
|
129
|
+
{"id":"pixel", "name":"Pixel", "emoji":"🐛","role":"Debugger", "goal":"Find the true root cause of any bug or failure", "model":"<MODEL>","workspace":"debugger"},
|
|
130
|
+
{"id":"vista", "name":"Vista", "emoji":"🔭","role":"Business Analyst", "goal":"Research deeply and surface the insights that matter most", "model":"<MODEL>","workspace":"business-analyst"},
|
|
131
|
+
{"id":"cipher","name":"Cipher", "emoji":"🔊","role":"Knowledge Curator", "goal":"Curate and surface knowledge so the team never forgets", "model":"<MODEL>","workspace":"knowledge-curator"},
|
|
132
|
+
{"id":"vigil", "name":"Vigil", "emoji":"🛡️","role":"QA Engineer", "goal":"Ensure every output meets quality standards", "model":"<MODEL>","workspace":"quality-assurance"},
|
|
133
|
+
{"id":"anchor","name":"Anchor", "emoji":"⚓", "role":"Content Specialist", "goal":"Craft clear content that communicates complex ideas simply", "model":"<MODEL>","workspace":"content-specialist"},
|
|
134
|
+
{"id":"lens", "name":"Lens", "emoji":"📡","role":"Multimodal Specialist", "goal":"Extract meaning from images, documents, and multimodal inputs", "model":"<MODEL>","workspace":"multimodal-specialist"},
|
|
135
|
+
{"id":"evolve","name":"Evolve", "emoji":"🔄","role":"Process Improvement Lead","goal":"Make the team better systematically through continuous improvement", "model":"<MODEL>","workspace":"process-improvement"},
|
|
136
|
+
{"id":"nova", "name":"Nova", "emoji":"🧪","role":"R&D Lead", "goal":"Turn hypotheses into proven capabilities through structured experimentation", "model":"<MODEL>","workspace":"r-and-d"}
|
|
137
|
+
]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### Step 8 — Generate workspace files
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
python3 ~/.openclaw/skills/agi-farm/generate.py \
|
|
146
|
+
--team-json ~/.openclaw/workspace/agi-farm-bundle/team.json \
|
|
147
|
+
--output ~/.openclaw/workspace/ \
|
|
148
|
+
--all-agents --shared --bundle
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Step 9 — Create OpenClaw agents
|
|
154
|
+
|
|
155
|
+
For each agent **except `main`** (skip if already exists):
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
openclaw agents add \
|
|
159
|
+
--agent <id> --name "<name>" --emoji "<emoji>" \
|
|
160
|
+
--model "<model>" \
|
|
161
|
+
--workspace "~/.openclaw/workspace/agents-workspaces/<workspace>"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Use `agent["model"]` from team.json directly.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### Step 10 — Register cron jobs
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
python3 ~/.openclaw/skills/agi-farm/scripts/register-crons.py \
|
|
172
|
+
--team-json ~/.openclaw/workspace/agi-farm-bundle/team.json
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Timezone is read automatically from OpenClaw config. Skips any cron that already exists.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### Step 11 — Install frameworks
|
|
180
|
+
|
|
181
|
+
For each framework in `FRAMEWORKS`:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
if [ ! -d ~/.openclaw/skills/<fw>-collab ]; then
|
|
185
|
+
TMP=$(mktemp -d)
|
|
186
|
+
git clone --depth 1 --filter=blob:none --sparse \
|
|
187
|
+
https://github.com/oabdelmaksoud/openclaw-skills.git "$TMP"
|
|
188
|
+
cd "$TMP" && git sparse-checkout set <fw>-collab
|
|
189
|
+
cp -r <fw>-collab ~/.openclaw/skills/ && rm -rf "$TMP"
|
|
190
|
+
fi
|
|
191
|
+
python3 ~/.openclaw/skills/<fw>-collab/build_agents.py --force 2>/dev/null || true
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### Step 12 — GitHub (if chosen)
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
cd ~/.openclaw/workspace/agi-farm-bundle
|
|
200
|
+
git init -b main && git add . && git commit -m "feat: <TEAM_NAME> AGI farm"
|
|
201
|
+
gh repo create agi-farm-<TEAM_NAME_LOWER> --public --source . --remote origin --push
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### Step 13 — Commit workspace
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
cd ~/.openclaw/workspace
|
|
210
|
+
git add -A && git commit -m "feat: <TEAM_NAME> AGI team — agi-farm setup complete"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### Step 14 — Initialize registries + health check
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Write TASKS.json and AGENT_STATUS.json
|
|
219
|
+
python3 - << 'EOF'
|
|
220
|
+
import json
|
|
221
|
+
from pathlib import Path
|
|
222
|
+
ws = Path.home() / ".openclaw/workspace"
|
|
223
|
+
team = json.loads((ws / "agi-farm-bundle/team.json").read_text())
|
|
224
|
+
(ws / "TASKS.json").write_text("[]")
|
|
225
|
+
(ws / "AGENT_STATUS.json").write_text(json.dumps(
|
|
226
|
+
{a["id"]: {"status": "available", "name": a["name"]} for a in team["agents"]}, indent=2))
|
|
227
|
+
print("✅ registries written")
|
|
228
|
+
EOF
|
|
229
|
+
|
|
230
|
+
# Health check
|
|
231
|
+
AGENTS=$(openclaw agents list --json 2>/dev/null | python3 -c "import json,sys; print(len(json.load(sys.stdin)))" || echo 0)
|
|
232
|
+
CRONS=$(openclaw cron list 2>/dev/null | grep -c "<TEAM_NAME_LOWER>" || echo 0)
|
|
233
|
+
[ -d ~/.openclaw/workspace/comms/inboxes ] && echo "✅ comms OK" || echo "❌ comms missing"
|
|
234
|
+
[ -f ~/.openclaw/workspace/TASKS.json ] && echo "✅ TASKS.json OK" || echo "❌ TASKS.json missing"
|
|
235
|
+
echo "✅ Agents: $AGENTS | Crons: $CRONS"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Step 15 — Done
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
✅ <TEAM_NAME> AGI team is live!
|
|
244
|
+
Agents : <PRESET> (<AGENT_NAMES_LIST>)
|
|
245
|
+
Workspace: ~/.openclaw/workspace/
|
|
246
|
+
Bundle : ~/.openclaw/workspace/agi-farm-bundle/
|
|
247
|
+
GitHub : <URL if created>
|
|
248
|
+
|
|
249
|
+
Next: talk to <ORCHESTRATOR_NAME> · /agi-farm status · /agi-farm dashboard
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## `/agi-farm status`
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
openclaw agents list --json | python3 -c "
|
|
258
|
+
import json,sys
|
|
259
|
+
for a in json.load(sys.stdin):
|
|
260
|
+
print(f' {a.get(\"identityEmoji\",\"🤖\")} {a.get(\"identityName\",a[\"id\"])}: {a.get(\"model\",\"?\")}')
|
|
261
|
+
"
|
|
262
|
+
python3 -c "
|
|
263
|
+
import json
|
|
264
|
+
from pathlib import Path
|
|
265
|
+
ws = Path.home() / '.openclaw/workspace'
|
|
266
|
+
tasks = json.loads((ws/'TASKS.json').read_text()) if (ws/'TASKS.json').exists() else []
|
|
267
|
+
t = [t for t in tasks if isinstance(t,dict)]
|
|
268
|
+
print(f' Tasks: {len(t)} total · {sum(1 for x in t if x.get(\"status\")==\"pending\")} pending · {sum(1 for x in t if x.get(\"status\")==\"needs_human_decision\")} HITL')
|
|
269
|
+
"
|
|
270
|
+
openclaw cron list 2>/dev/null | head -15
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## `/agi-farm rebuild`
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
python3 ~/.openclaw/skills/agi-farm/generate.py \
|
|
279
|
+
--team-json ~/.openclaw/workspace/agi-farm-bundle/team.json \
|
|
280
|
+
--output ~/.openclaw/workspace/ \
|
|
281
|
+
--all-agents --shared --no-overwrite
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
`--no-overwrite` skips files that already exist, preserving manual edits.
|
|
285
|
+
Add `--force` (remove `--no-overwrite`) to overwrite everything.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## `/agi-farm export`
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
cd ~/.openclaw/workspace/agi-farm-bundle
|
|
293
|
+
git add -A
|
|
294
|
+
git commit -m "export: $(date +%Y-%m-%d)" 2>/dev/null || echo "Nothing to commit"
|
|
295
|
+
git push 2>/dev/null || echo "No remote — run /agi-farm setup first"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## `/agi-farm dashboard`
|
|
301
|
+
|
|
302
|
+
**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.
|
|
303
|
+
|
|
304
|
+
### Architecture
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
dashboard.py ← Python HTTP server (SSE + static)
|
|
308
|
+
├── WorkspaceWatcher watchdog file-watcher, 250ms debounce
|
|
309
|
+
├── SlowDataCache background thread — caches `openclaw agents list`
|
|
310
|
+
│ and `openclaw cron list` every 30s (each takes ~1-2s)
|
|
311
|
+
├── Broadcaster thread-safe SSE fan-out to all connected clients
|
|
312
|
+
└── /api/stream SSE endpoint — pushes full snapshot on every file change
|
|
313
|
+
|
|
314
|
+
dashboard-react/ ← Vite + React 18 + Recharts frontend
|
|
315
|
+
dist/ ← production build (served by dashboard.py)
|
|
316
|
+
src/
|
|
317
|
+
hooks/useDashboard.js SSE hook — auto-reconnects on disconnect
|
|
318
|
+
components/
|
|
319
|
+
Header.jsx live badge, stats, clock
|
|
320
|
+
Nav.jsx tab switcher
|
|
321
|
+
tabs/
|
|
322
|
+
Overview.jsx stats, budget bar, SLA alerts, agent grid, broadcast preview
|
|
323
|
+
Agents.jsx full agent cards — model, inbox, quality, credibility, cache age
|
|
324
|
+
Tasks.jsx filterable table, expandable rows, ticking deadlines, pagination
|
|
325
|
+
Velocity.jsx 7-day charts (Recharts), quality trend, task-type donut
|
|
326
|
+
Budget.jsx period bars, threshold markers, per-agent/model breakdown
|
|
327
|
+
OKRs.jsx objectives + KRs with progress bars
|
|
328
|
+
RD.jsx experiments, backlog, benchmarks
|
|
329
|
+
Broadcast.jsx terminal log, color-coded CRITICAL/BLOCKED/HITL
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Data sources (all real-time from workspace files)
|
|
333
|
+
|
|
334
|
+
| Field | Source file | Refresh |
|
|
335
|
+
|-------|-------------|---------|
|
|
336
|
+
| tasks, task_counts, sla_at_risk | `TASKS.json` | instant |
|
|
337
|
+
| agents (inbox, perf, status) | `AGENT_STATUS.json`, `AGENT_PERFORMANCE.json`, `comms/inboxes/` | instant |
|
|
338
|
+
| agent model, cron error/busy | `openclaw agents/cron list` | 30s cache |
|
|
339
|
+
| budget | `BUDGET.json` | instant |
|
|
340
|
+
| velocity | `VELOCITY.json` | instant |
|
|
341
|
+
| okrs | `OKRs.json` | instant |
|
|
342
|
+
| broadcast | `comms/broadcast.md` | instant |
|
|
343
|
+
| experiments / backlog | `EXPERIMENTS.json`, `IMPROVEMENT_BACKLOG.json` | instant |
|
|
344
|
+
| knowledge_count | `SHARED_KNOWLEDGE.json` | instant |
|
|
345
|
+
| memory_lines | `MEMORY.md` | instant |
|
|
346
|
+
|
|
347
|
+
### LaunchAgent (always-on)
|
|
348
|
+
|
|
349
|
+
The dashboard is registered as `ai.coopercorp.dashboard` and starts automatically at login.
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# Status
|
|
353
|
+
launchctl list | grep coopercorp
|
|
354
|
+
curl -s http://localhost:8080/api/data | python3 -m json.tool | head -5
|
|
355
|
+
|
|
356
|
+
# Restart
|
|
357
|
+
launchctl stop ai.coopercorp.dashboard
|
|
358
|
+
launchctl start ai.coopercorp.dashboard
|
|
359
|
+
|
|
360
|
+
# Logs
|
|
361
|
+
tail -f /tmp/coopercorp-dashboard.log
|
|
362
|
+
tail -f /tmp/coopercorp-dashboard.err
|
|
363
|
+
|
|
364
|
+
# Disable / re-enable
|
|
365
|
+
launchctl unload ~/Library/LaunchAgents/ai.coopercorp.dashboard.plist
|
|
366
|
+
launchctl load ~/Library/LaunchAgents/ai.coopercorp.dashboard.plist
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**URL**: http://localhost:8080
|
|
370
|
+
|
|
371
|
+
### Rebuild React frontend
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
cd ~/.openclaw/skills/agi-farm/dashboard-react
|
|
375
|
+
npm install # first time only
|
|
376
|
+
npm run build # outputs to dist/ — dashboard.py serves automatically
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Full reference: [references/dashboard.md](references/dashboard.md)
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## `/agi-farm dispatch`
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
# Dry-run (preview only)
|
|
387
|
+
python3 ~/.openclaw/skills/agi-farm/scripts/auto-dispatch.py
|
|
388
|
+
|
|
389
|
+
# Execute
|
|
390
|
+
python3 ~/.openclaw/skills/agi-farm/scripts/auto-dispatch.py --execute
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Fires agent sessions for pending tasks, handles HITL notifications, stale task
|
|
394
|
+
resets, rate-limit backoff, and dependency checking. Cron (every 1 min):
|
|
395
|
+
```bash
|
|
396
|
+
* * * * * python3 ~/.openclaw/skills/agi-farm/scripts/auto-dispatch.py --execute \
|
|
397
|
+
>> ~/.openclaw/workspace/logs/auto-dispatch.log 2>&1
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Troubleshooting
|
|
403
|
+
|
|
404
|
+
### Setup issues
|
|
405
|
+
|
|
406
|
+
| Symptom | Fix |
|
|
407
|
+
|---------|-----|
|
|
408
|
+
| `generate.py` fails with `ModuleNotFoundError` | Run `pip3 install jinja2` |
|
|
409
|
+
| `openclaw agents add` says agent already exists | Safe to ignore — skip that agent |
|
|
410
|
+
| `gh repo create` fails | Run `gh auth login` first |
|
|
411
|
+
| Cron registration shows 0 crons added | Run `openclaw cron list` to check for duplicates; use `--force` flag on re-register |
|
|
412
|
+
| `git commit` fails in Step 13 | Run `git config --global user.email` and set name/email first |
|
|
413
|
+
|
|
414
|
+
### Runtime issues
|
|
415
|
+
|
|
416
|
+
| Symptom | Fix |
|
|
417
|
+
|---------|-----|
|
|
418
|
+
| Auto-dispatcher fires but agents don't respond | Check `logs/auto-dispatch.log`; verify `openclaw agents list` shows agents |
|
|
419
|
+
| Dashboard shows stale data | Restart LaunchAgent: `launchctl stop ai.coopercorp.dashboard && launchctl start ai.coopercorp.dashboard` |
|
|
420
|
+
| TASKS.json parse error | Validate JSON: `python3 -m json.tool ~/.openclaw/workspace/TASKS.json` |
|
|
421
|
+
| Agent stuck >30 min | Check broadcast.md for `[BLOCKED]` tags; reassign task manually |
|
|
422
|
+
| Rate-limit backoff too aggressive | Edit `RATE_LIMIT_BACKOFF_MIN` in `scripts/auto-dispatch.py` (default: 10 min) |
|
|
423
|
+
| `openclaw` not found in cron | Set `OPENCLAW_BIN=/path/to/openclaw` in the cron environment, or add `PATH=/opt/homebrew/bin:$PATH` |
|
|
424
|
+
|
|
425
|
+
### Recovery
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
# Re-run setup without overwriting existing files
|
|
429
|
+
python3 ~/.openclaw/skills/agi-farm/generate.py \
|
|
430
|
+
--team-json ~/.openclaw/workspace/agi-farm-bundle/team.json \
|
|
431
|
+
--output ~/.openclaw/workspace/ \
|
|
432
|
+
--all-agents --shared --no-overwrite
|
|
433
|
+
|
|
434
|
+
# Force full regeneration (overwrites everything)
|
|
435
|
+
python3 ~/.openclaw/skills/agi-farm/generate.py \
|
|
436
|
+
--team-json ~/.openclaw/workspace/agi-farm-bundle/team.json \
|
|
437
|
+
--output ~/.openclaw/workspace/ \
|
|
438
|
+
--all-agents --shared --bundle --force
|
|
439
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- Template: AGENTS.md.template -->
|
|
2
|
+
<!-- Purpose: Team roster — lists all agents, roles, comms paths, and session startup checklist -->
|
|
3
|
+
<!-- Variables: team_name, orchestrator_name, agents[] -->
|
|
4
|
+
<!-- Rendered by: generate.py -->
|
|
5
|
+
# AGENTS.md — {{TEAM_NAME}} Team
|
|
6
|
+
|
|
7
|
+
This workspace belongs to **{{AGENT_NAME}} {{AGENT_EMOJI}}** ({{AGENT_ROLE}}).
|
|
8
|
+
|
|
9
|
+
## Your Team
|
|
10
|
+
|
|
11
|
+
| ID | Name | Emoji | Model | Role |
|
|
12
|
+
|----|------|-------|-------|------|
|
|
13
|
+
{{AGENTS_TABLE}}
|
|
14
|
+
|
|
15
|
+
## Communication
|
|
16
|
+
|
|
17
|
+
- **Your inbox**: `comms/inboxes/{{AGENT_ID}}.md`
|
|
18
|
+
- **Your outbox**: `comms/outboxes/{{AGENT_ID}}.md`
|
|
19
|
+
- **Broadcast**: `comms/broadcast.md`
|
|
20
|
+
- **Orchestrator**: {{ORCHESTRATOR_NAME}} (main)
|
|
21
|
+
|
|
22
|
+
## Every Session
|
|
23
|
+
|
|
24
|
+
1. Read `SOUL.md` — who you are and how to operate
|
|
25
|
+
2. Check `comms/inboxes/{{AGENT_ID}}.md` for pending tasks
|
|
26
|
+
3. Check `comms/broadcast.md` for team-wide alerts
|
|
27
|
+
4. Complete tasks, write results to outbox
|
|
28
|
+
5. Mark done tasks `[DONE]` in your inbox
|
|
29
|
+
|
|
30
|
+
## Escalation
|
|
31
|
+
|
|
32
|
+
- Stuck or uncertain → write to {{ORCHESTRATOR_NAME}} inbox
|
|
33
|
+
- Blocked → write to broadcast.md with `[BLOCKED]` tag
|
|
34
|
+
- Critical issue → write to broadcast.md with `[CRITICAL]` tag
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
_{{TEAM_NAME}} AGI Team | agi-farm | {{DATE}}_
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Template: BOOTSTRAP.md.template -->
|
|
2
|
+
<!-- Purpose: Session bootstrap checklist read at the start of every agent session -->
|
|
3
|
+
<!-- Variables: team_name, orchestrator_name, agent_name, agent_goal -->
|
|
4
|
+
<!-- Rendered by: generate.py -->
|
|
5
|
+
# BOOTSTRAP.md — {{AGENT_NAME}} Session Bootstrap
|
|
6
|
+
|
|
7
|
+
_Read this at the start of every session._
|
|
8
|
+
|
|
9
|
+
## Who You Are
|
|
10
|
+
|
|
11
|
+
You are **{{AGENT_NAME}} {{AGENT_EMOJI}}**, the {{AGENT_ROLE}} for the {{TEAM_NAME}} AGI team.
|
|
12
|
+
|
|
13
|
+
**Your goal**: {{AGENT_GOAL}}
|
|
14
|
+
|
|
15
|
+
**Your model**: {{AGENT_MODEL}}
|
|
16
|
+
|
|
17
|
+
## Session Startup Checklist
|
|
18
|
+
|
|
19
|
+
- [ ] Read `SOUL.md` — your persona and operating instructions
|
|
20
|
+
- [ ] Read `AGENTS.md` — your team roster
|
|
21
|
+
- [ ] Check `comms/inboxes/{{AGENT_ID}}.md` — pending tasks
|
|
22
|
+
- [ ] Check `comms/broadcast.md` — team alerts
|
|
23
|
+
|
|
24
|
+
## Task Execution
|
|
25
|
+
|
|
26
|
+
1. Pick the highest-priority pending task from your inbox
|
|
27
|
+
2. Execute it according to your SOUL.md guidelines
|
|
28
|
+
3. Write results to `comms/outboxes/{{AGENT_ID}}.md`
|
|
29
|
+
4. Mark task `[DONE]` in your inbox
|
|
30
|
+
5. If blocked: write to broadcast.md with `[BLOCKED]`
|
|
31
|
+
|
|
32
|
+
## Escalation
|
|
33
|
+
|
|
34
|
+
- Uncertainty or low confidence → escalate to {{ORCHESTRATOR_NAME}}
|
|
35
|
+
- Architectural decisions → loop in orchestrator
|
|
36
|
+
- Irreversible actions → HITL required
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
_{{TEAM_NAME}} AGI Team | agi-farm | {{DATE}}_
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!-- Template: CLAUDE.md.template -->
|
|
2
|
+
<!-- Purpose: Team-wide operating manual injected into every agent's CLAUDE.md -->
|
|
3
|
+
<!-- Variables: team_name, orchestrator_name, frameworks -->
|
|
4
|
+
<!-- Rendered by: generate.py -->
|
|
5
|
+
# CLAUDE.md — {{TEAM_NAME}} Team Operating Manual
|
|
6
|
+
|
|
7
|
+
_Read by ALL agents. These are the shared rules of the {{TEAM_NAME}} system._
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Team Roster
|
|
12
|
+
|
|
13
|
+
| ID | Name | Emoji | Model | Role |
|
|
14
|
+
|----|------|-------|-------|------|
|
|
15
|
+
{{AGENTS_TABLE}}
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 2. Communication Protocol
|
|
20
|
+
|
|
21
|
+
### Inboxes (receive tasks here)
|
|
22
|
+
`~/.openclaw/workspace/comms/inboxes/<agent-id>.md`
|
|
23
|
+
|
|
24
|
+
### Outboxes (write results here)
|
|
25
|
+
`~/.openclaw/workspace/comms/outboxes/<agent-id>.md`
|
|
26
|
+
|
|
27
|
+
### Broadcast (team-wide alerts)
|
|
28
|
+
`~/.openclaw/workspace/comms/broadcast.md`
|
|
29
|
+
|
|
30
|
+
**Rules:**
|
|
31
|
+
- Inboxes are append-only. Mark completed tasks `[DONE]`.
|
|
32
|
+
- {{ORCHESTRATOR_NAME}} reads all outboxes on synthesis cycles.
|
|
33
|
+
- All agents check broadcast.md on every heartbeat.
|
|
34
|
+
- Only write to broadcast for: critical alerts, learning sessions, process updates.
|
|
35
|
+
|
|
36
|
+
### Task Message Format ({{ORCHESTRATOR_NAME}} → Agent)
|
|
37
|
+
```markdown
|
|
38
|
+
---
|
|
39
|
+
TASK_ID: <uuid>
|
|
40
|
+
FROM: main
|
|
41
|
+
TO: <agent-id>
|
|
42
|
+
TYPE: implementation|research|debug|review|content|analysis
|
|
43
|
+
PRIORITY: immediate|normal|background
|
|
44
|
+
ASSIGNED_AT: <ISO timestamp>
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Context
|
|
48
|
+
## Task
|
|
49
|
+
## Expected Output
|
|
50
|
+
## Constraints
|
|
51
|
+
## Escalation
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. Quality Gate
|
|
57
|
+
|
|
58
|
+
Every output goes through quality review before delivery.
|
|
59
|
+
|
|
60
|
+
| Score | Meaning | Action |
|
|
61
|
+
|-------|---------|--------|
|
|
62
|
+
| 5 | Exceptional | Deliver |
|
|
63
|
+
| 4 | Good | Deliver |
|
|
64
|
+
| 3 | Acceptable | Deliver with notes |
|
|
65
|
+
| 2 | Needs work | Block, revise |
|
|
66
|
+
| 1 | Unacceptable | Block, reassign |
|
|
67
|
+
|
|
68
|
+
Score ≤2 blocks delivery and triggers retrospective.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 4. Task State Machine
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
pending → in-progress → complete
|
|
76
|
+
→ failed → retry → complete
|
|
77
|
+
→ escalate
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
All state transitions must be logged in TASKS.json.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 5. Escalation Chain
|
|
85
|
+
|
|
86
|
+
| Trigger | Action |
|
|
87
|
+
|---------|--------|
|
|
88
|
+
| Same task fails 2× | Reassign to different specialist |
|
|
89
|
+
| Quality score ≤2 | Block, revise, trigger retrospective |
|
|
90
|
+
| Confidence <70% | HITL — escalate to user |
|
|
91
|
+
| Irreversible action | HITL — user must approve |
|
|
92
|
+
| Agent stuck >30min | Ping agent, log incident |
|
|
93
|
+
| Task stuck >1h | Escalate to {{ORCHESTRATOR_NAME}} |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 6. Constitutional Rules (INVIOLABLE)
|
|
98
|
+
|
|
99
|
+
1. Never fabricate — if unsure, say so and escalate
|
|
100
|
+
2. Never skip quality gate
|
|
101
|
+
3. {{ORCHESTRATOR_NAME}} never does specialist work — always delegates
|
|
102
|
+
4. Never mark a task complete without actual output
|
|
103
|
+
5. Always update AGENT_STATUS.json on session start/end
|
|
104
|
+
6. MAX_GENERATION_DEPTH: 3
|
|
105
|
+
7. HITL before irreversible actions
|
|
106
|
+
8. **On task completion: update TASKS.json — set `status: complete` and `completed_at: <ISO>` for your task ID**
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 7. Memory System
|
|
111
|
+
|
|
112
|
+
- `MEMORY.md` — curated long-term memory (≤200 lines)
|
|
113
|
+
- `memory/YYYY-MM-DD.md` — daily session logs
|
|
114
|
+
- `TASKS.json` — task history and state
|
|
115
|
+
- `AGENT_STATUS.json` — agent availability
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
_Built with agi-farm on {{DATE}} | Team: {{TEAM_NAME}} | Preset: {{PRESET}} agents | Frameworks: {{FRAMEWORKS}}_
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Template: DASHBOARD.md.template -->
|
|
2
|
+
<!-- Purpose: Live ops dashboard reference — architecture, data sources, LaunchAgent instructions -->
|
|
3
|
+
<!-- Variables: team_name -->
|
|
4
|
+
<!-- Rendered by: generate.py -->
|
|
5
|
+
# DASHBOARD.md — {{TEAM_NAME}} Team Health
|
|
6
|
+
_Updated by Vigil on every heartbeat. Last updated: {{DATE}}_
|
|
7
|
+
|
|
8
|
+
## Agent Status
|
|
9
|
+
| Agent | Status | Last Active | Current Task |
|
|
10
|
+
|-------|--------|-------------|-------------|
|
|
11
|
+
{{AGENTS_DASHBOARD_TABLE}}
|
|
12
|
+
|
|
13
|
+
## Task Queue
|
|
14
|
+
- **Pending**: 0
|
|
15
|
+
- **In Progress**: 0
|
|
16
|
+
- **Completed today**: 0
|
|
17
|
+
- **Failed today**: 0
|
|
18
|
+
|
|
19
|
+
## Quality Scores (last 10 outputs)
|
|
20
|
+
- Average: N/A
|
|
21
|
+
- Below standard (≤2): 0
|
|
22
|
+
- Blocked: 0
|
|
23
|
+
|
|
24
|
+
## System Health
|
|
25
|
+
- Cron jobs: ✅ Running
|
|
26
|
+
- Comms: ✅ Active
|
|
27
|
+
- Memory: ✅ Under 200 lines
|
|
28
|
+
- Frameworks: {{FRAMEWORKS}}
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
_{{TEAM_NAME}} AGI Team | Vigil 🛡️ | agi-farm | {{DATE}}_
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Template: DECISIONS.md.template -->
|
|
2
|
+
<!-- Purpose: Architectural decision log — records key decisions and their rationale -->
|
|
3
|
+
<!-- Variables: team_name -->
|
|
4
|
+
<!-- Rendered by: generate.py -->
|
|
5
|
+
# DECISIONS.md — {{TEAM_NAME}} Architecture Decision Records
|
|
6
|
+
_Maintained by Sage and Cipher. Every significant decision documented._
|
|
7
|
+
|
|
8
|
+
## ADR Format
|
|
9
|
+
Each ADR includes: Context → Decision → Consequences → Status
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
_No decisions yet. First ADRs will be added as the team makes architectural choices._
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
_{{TEAM_NAME}} AGI Team | agi-farm | {{DATE}}_
|