Solo Dev Team: Complete OpenClaw Agent Swarm Configuration Guide
How to Use OpenClaw to Orchestrate Multiple AI Agents: Manage an Entire Development Team Solo
Original Author: Elvis (@elvissun) Source: X/Twitter Original Link: https://x.com/elvissun/status/2025920521871716562
Core Architecture
The author no longer uses Codex or Claude Code directly, instead utilizing OpenClaw as an orchestration layer. His AI assistant, Zoe, is responsible for:
- Generating Agent prompts
- Selecting the appropriate model for each task
- Monitoring progress
- Notifying him on Telegram when PRs are ready to merge
Performance Metrics
- 94 commits/day — Most productive day: 3 client meetings held, editor opened zero times
- 7 PRs/30 mins — From idea to production at extreme speed
- Almost all small to medium tasks are completed in one shot
Why do you need an Agent Orchestration Layer?
The context window is a zero-sum game:
- Fill in code → No space left for business context
- Fill in customer history → No space left for the codebase
This is the advantage of a two-layer system: each AI only loads what it needs.
8-Step Workflow
Step 1: Client Request → Zoe Evaluates
Automatically syncs meeting notes from Obsidian with zero context-switching cost. After a client call, discuss requirements directly with Zoe; she automatically retrieves relevant background information.
Step 2: Spawn Agent
Each Agent has an independent worktree (isolated branch) and tmux session—completely isolated.
Step 3: Monitoring Loop
Checks every 10 minutes via cron; auto-restarts on failure (max 3 retries). Instead of polling the Agent directly (too expensive), it reads a JSON registry to determine status:
- Is tmux session alive?
- Are there pending PRs?
- CI status
- Auto-restart on failure
Step 4: Create PR
Agent commits, pushes, and creates a PR via gh pr create.
Definition of Done (Critical):
- PR created
- Branch synced to main (no merge conflicts)
- CI passed (lint, types, unit tests, E2E)
- Codex review passed
- Claude Code review passed
- Screenshots included (if UI changes)
Step 5: Automated Code Review
Three AI models review, each with its own strength:
| Review Model | Characteristics |
|---|---|
| Codex Reviewer | Edge case expert, most detailed, logic errors, race conditions |
| Gemini Code Assist | Free, excels at security and scalability issues |
| Claude Code | More conservative, suggestions often over-engineered |
Step 6: Automated Testing
The CI pipeline runs extensive automated tests:
- Lint and TypeScript checks
- Unit tests
- E2E tests
- Playwright tests (against preview environment)
New Rule: Any UI change must include a screenshot, or CI fails. This significantly reduces review time.
Step 7: Human Review
Receive Telegram notification: “PR #341 ready for review”
At this point, the following is done:
- CI passed
- Three AI reviews passed
- Screenshots show UI changes
Review takes only 5-10 minutes; for many PRs, reading code isn’t even necessary—just looking at the screenshots is enough.
Step 8: Merge
PR is merged. A daily cron job cleans up orphaned worktrees and the task registry.
Ralph Loop V2
This is an upgrade of the Ralph Loop. Unlike the traditional Ralph Loop which runs the same prompt every time, this system is different:
When an Agent fails, Zoe doesn’t retry with the same prompt. Instead, she adapts:
- Agent context exhausted? → “Focus only on these three files”
- Agent went in the wrong direction? → “Stop, the client wants X not Y; here is what they said in the meeting”
- Agent needs clarification? → “Here is the client’s email and what their company does”
Zoe also proactively finds work to do:
- Morning: Scans Sentry → Finds 4 new errors → Spawns 4 Agents to investigate and fix
- After Meetings: Scans meeting notes → Marks 3 feature requests mentioned by clients → Spawns 3 Codex Agents
- Evening: Scans git log → Spawns Claude Code to update changelog and client documentation
Agent Selection Guide
| Agent | Best For |
|---|---|
| Codex | Backend logic, complex bugs, multi-file refactoring, cross-repo reasoning (90% of tasks) |
| Claude Code | Faster on frontend work, fewer git operation permission issues |
| Gemini | Strong design sense, generates HTML/CSS specs for Claude Code to implement |
Zoe’s Selection Logic: Billing system bug → Codex; Button style fix → Claude Code; New dashboard design → Gemini designs first, Claude Code implements.
Current Bottleneck
RAM — Each Agent requires an independent worktree and node_modules. A Mac Mini with 16GB can only run 4-5 Agents.
The author purchased a Mac Studio M4 Max with 128GB RAM ($3,500) to scale.
Future Outlook
By 2026, there will be an explosion of one-person million-dollar companies. The next generation of founders won’t hire a team of 10, but will handle it solo using the right system:
An AI orchestrator acts as your extension (like Zoe), delegating to Agents specialized in different business functions: engineering, customer support, operations, and marketing.
Summary
The core insights of this system:
- Two-Layer Architecture: Orchestration layer (OpenClaw) handles business context, Agent layer handles code execution
- Specialized Context: Specialization is achieved not through different models, but through different contexts
- Automation Level: From code generation to review to testing, almost fully automated
- Human-AI Collaboration: Humans only make high-value decisions (merging PRs), everything else is automated
Cost: Claude ~90/mo, can get started for $20.
Want to set this up? Copy the original text into OpenClaw and tell it: “Implement this agent swarm setup for my codebase.” Done in 10 minutes.
Further Reading: