Multi-Agent Orchestration System for AI-Powered Development
A reusable workspace orchestrator that coordinates multiple AI coding agents (Claude, Codex, OpenCode, etc.) to work in parallel on real projects, while keeping the project repository completely clean of orchestrator files.
project-workspace/
my-project/ # Real project (stays clean)
orchestrator-my-project/ # Orchestrator workspace (generated)
- Coordinates multiple AI agents (Claude, Codex, OpenCode, Gemini, Cursor, Abacus) to work simultaneously on your project.
- Real-time monitoring with a modern TUI (Terminal User Interface) that shows live agent status, queue, and progress.
- Automatic task delegation based on agent specialization (analysis, implementation, code review).
- Persistent memory using Engram to maintain context across sessions.
- Spec-Driven Development (SDD) support with OpenSpec for large, multi-phase changes.
- Fallback system that automatically reassigns tasks when an agent fails or reaches rate limits.
- Multi-language support (English and Spanish) for all templates and documentation.
- The orchestrator creates a separate workspace next to your real project.
- Your project repository stays completely clean (no
QUEUE.md,logs/, or orchestrator files). - Agents work on the real project files via absolute paths configured in
orchestrator.config.json.
| Agent | Role | Priority | Notes |
|---|---|---|---|
| Claude-Orchestrator | Session coordinator | - | Never implements code directly; delegates to workers |
| Codex | Primary implementation | 1st choice | Structured tasks, tests, docs |
| OpenCode | Analysis + Implementation | 2nd choice | Uses your configured model |
| Claude-Worker (Backend/Frontend) | Fallback implementation | 3rd choice | Takes over when Codex/OpenCode fail |
| Gemini | Code review/audits | Optional | Disabled by default |
| Cursor/Abacus | Mechanical tasks | Optional | Disabled by default |
- fs.watch on QUEUE.md: Detects changes in ~1-2 seconds (Linux/macOS: direct file watch; Windows: directory watch fallback).
- Live TUI updates: The dashboard refreshes automatically when tasks are added, started, or completed.
- Instant notifications: Claude-Orchestrator receives alerts in
INBOX.mdandNOTIFY.mdwhen tasks finish.
- Analysis tasks β Always assigned to OpenCode.
- Implementation tasks β Assigned to Codex (1st) β OpenCode (2nd) β Claude-Worker (3rd).
- Fallback chain:
Codex β OpenCode β Claude-Worker(automatic).
- Engram: Stores decisions, bugs, and findings across sessions.
- OpenSpec: Supports
proposal.md,spec.md,design.md,tasks.md, andverify-report.mdfor large changes. - Handoffs: Session summaries for continuity.
pnpm add -g @liriraid/agentflow-aigit clone https://github.com/LiriRaid/agentflow-ai.git
cd agentflow-ai
pnpm install# Interactive (asks for language)
agentflow init-workspace C:/code/my-project
# Direct (English)
agentflow init-workspace C:/code/my-project --lang en
# Direct (Spanish)
agentflow init-workspace C:/code/mi-proyecto --lang esThis creates a sibling workspace (e.g., orchestrator-my-project/) with all configuration files.
Edit orchestrator.config.json in the generated workspace:
{
"repos": {
"backend": "C:/code/my-backend",
"frontend": "C:/code/my-frontend"
}
}cd orchestrator-my-project
agentflow ink --pausedControls:
S: Start/ResumeP: PauseR: Reload queueQ: Quit (stops all agents)
Open a second terminal in the orchestrator workspace (not the real project):
cd orchestrator-my-project
claudeThen run:
Read ORCHESTRATOR.md and start.
Examples:
"Explore this project"β OpenCode analyzes and reports."Add JWT authentication"β OpenCode analyzes, then Codex/OpenCode implement."Refactor the API layer"β OpenCode explores, then workers implement in parallel.
The generated workspace includes:
orchestrator-my-project/
βββ ORCHESTRATOR.md # Core rules for the orchestrator session
βββ CLAUDE.md # Routing rules for Claude
βββ QUEUE.md # Active task queue (TASK-NNN | title | agent | ...)
βββ ENGRAM.md # Persistent memory conventions
βββ orchestrator.config.json # Repos, agents, models, and profiles
βββ agents/ # Agent-specific instructions
β βββ BACKEND.md
β βββ FRONTEND.md
β βββ CODEX.md
β βββ OPENCODE.md
βββ .claude/ # Local Claude skills and config
β βββ skills/ # Orchestrator skills (init, explore, etc.)
βββ .codex/ # Codex config
βββ .opencode/ # OpenCode config
βββ openspec/ # SDD artifacts
β βββ changes/
β βββ templates/
βββ docs/ # Documentation
βββ logs/ # Execution logs
βββ handoffs/ # Session handoffs
βββ progress/ # Agent progress reports
{
"projectName": "My Project",
"workspaceLanguage": "es",
"maxConcurrent": 5,
"pollIntervalSeconds": 5, // Fallback polling (realtime uses fs.watch)
"taskTimeoutMinutes": 30,
"repos": {
"backend": "C:/code/my-backend",
"frontend": "C:/code/my-frontend"
},
"agentProfiles": {
"claude": { "enabled": true, "localConfigDir": ".claude" },
"codex": { "enabled": true, "localConfigDir": ".codex" },
"opencode": { "enabled": true, "localConfigDir": ".opencode" }
},
"agents": {
"Backend": { "cli": "claude", "defaultRepo": "backend" },
"Frontend": { "cli": "claude", "defaultRepo": "frontend" },
"Codex": { "cli": "codex", "defaultRepo": "backend" },
"OpenCode": { "cli": "opencode", "defaultRepo": "frontend" }
}
}Each agent uses the model you have configured in its own CLI. You can optionally override it by adding "model": "model-name" to any agent entry β for Claude this accepts values like sonnet or opus.
- User Request:
"Add user authentication to the backend." - Claude-Orchestrator:
- Creates
TASK-001(OpenCode):"Analyze current auth system" - Waits for OpenCode's report in
progress/PROGRESS-OpenCode.md
- Creates
- OpenCode:
- Analyzes the codebase.
- Writes findings to
progress/PROGRESS-OpenCode.mdandINBOX.md.
- Claude-Orchestrator:
- Reads OpenCode's report.
- Creates
TASK-002(Codex):"Implement JWT auth"(depends on TASK-001).
- Codex:
- Implements the feature.
- Reports completion in
progress/PROGRESS-Codex.md.
- TUI:
- Shows real-time updates (task status, agent activity, costs).
| Agent | CLI | Model | Implementation? | Notes |
|---|---|---|---|---|
| Backend | claude |
auto | β Yes | Claude-Worker for backend tasks |
| Frontend | claude |
auto | β Yes | Claude-Worker for frontend tasks |
| Codex | codex |
auto | β Yes | Primary implementation |
| OpenCode | opencode |
auto | β Yes | Secondary implementation |
| Gemini | gemini |
auto | β No | Audits/reviews only |
| Cursor | cursor |
auto | β No | Bulk edits only |
| Abacus | abacusai |
auto | β No | Small focused tasks |
- No auto-commits: Agents never run
git commitorgit push. - No YOLO by default: Safe permissions mode is enabled unless
--yolois used. - Claude as reviewer: Claude-Orchestrator validates all work before user approval.
- Clean repos: Project files stay untouched; orchestrator files live in the sibling workspace.
- Fallback safety: Tasks are automatically reassigned if an agent fails.
- Core Rules: See
ORCHESTRATOR.mdin the generated workspace. - Agent Routing: See
CLAUDE.md. - Architecture: See
docs/architecture.md. - OpenSpec: See
openspec/FLOW.md.
Inspired by Orquestador-AI by Ariel Lontero (MIT). Built from scratch with a modern architecture: Ink TUI + React, npm package, real-time fs.watch, multi-language templates, and multi-agent coordination.