Package Exports
- opencode-orchestrator
Readme
Multi-Agent Orchestration Plugin for OpenCode
β‘ Quick Start
npm install -g opencode-orchestratorThen in OpenCode:
/task "Implement a Diablo2 Online Game for Web"ποΈ Extreme Resilience & Performance
Built for "Infinite Missions," the OpenCode Orchestrator is engineered to handle massive codebases and long-running tasks where absolute stability is non-negotiable.
- π Continuous Operation (WAL): Mission continuity is guaranteed via Write-Ahead Logging. Even after a system crash, the orchestrator "replays" its history from disk to resume complex tasks exactly where they left off.
- β‘ 80% Resource Efficiency: Smart intent-based polling and output caching reduce API overhead by 60-80%. The system intelligently filters redundant traffic, ensuring extreme agility even under heavy multi-agent load.
- 𧬠Self-Scaling Intelligence: Real-time success/failure feedback dynamic concurrency. The system learns model reliability and rate limits on the fly, autonomously balancing execution speed with fail-safe stability.
- π Zero-Leak Architecture: Rigorous, lifecycle-based resource management ensures 100% memory reclamation. Engineered for sessions lasting 10,000+ iterations without a single byte of memory drift.
β Core Philosophy
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π EXPLORE β π LEARN β π ADAPT β β‘ ACT β
β Scan Document Adjust Execute β
βββββββββββββββββββββββββββββββββββββββββββββββββββββπ The Agents
| Agent | Role | What It Does |
|---|---|---|
| π― Commander | Orchestrator | Leads the task, delegates work to other agents, ensures completion |
| π Planner | Researcher | Analyzes the project, creates the plan, documents findings |
| π¨ Worker | Implementer | Writes code, modifies files, follows the project's patterns |
| β Reviewer | Verifier | Tests changes, checks for errors, confirms quality |
π Principles
| Principle | What It Means |
|---|---|
| π Never Assume | Always check the actual code and config files first |
| π Document Everything | Record patterns and findings for future tasks |
| π Verify with Evidence | Run tests, cite sources, complete with proof |
| π Adapt to the Project | Match the project's existing style and patterns |
| π€ Specialized Roles | Each agent has a clear, focused responsibility |
ποΈ Workflow Architecture
/task "Build REST API"
β
βββββββββββββββββββββββββββββββββββββ
β π― COMMANDER β "Start the task" β
βββββββββββββββββ€ββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
βββββββββ βββββββββ βββββββββ
βPLANNERβ βWORKER β βWORKER β β π₯ 50 PARALLEL
βplan.mdβ βauth.tsβ βapi.ts β TASKS CONCURRENTLY
βββββββββ βββββββββ βββββββββ
β β β
βββββββββββββββββΌββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββ
β β
REVIEWER β "Verify everything"β
βββββββββββββββββ€ββββββββββββββββββββ
β
ββββββββββ΄βββββββββ
β TODO 100%? β
β Issues = 0? β
ββββββββββ¬βββββββββ
No β β Yes
β»οΈ LOOP β
COMPLETEFeatures
| Feature | What It Does |
|---|---|
| π 60-80% Optimization | Smart polling & output caching for massive speed gains |
| β‘ 50 Parallel Tasks | Run up to 50 agents simultaneously |
| π Non-Stop Recovery | WAL-based persistence (resumes tasks after crashes) |
| π₯ Multi-File Ops | Work on different files at the same time |
| π‘οΈ Self-Scaling | Dynamic concurrency limits based on success/failure |
| π©Ή Memory Integrity | Strict resource cleanup prevents leaks in long sessions |
| 𧬠Adaptive AI | Agents learn and adapt based on the project |
Error Handling
| Error | What Happens |
|---|---|
| π₯ Tool crash | Inject recovery prompt and retry |
| π¦ Rate limit hit | Wait and retry with exponential backoff |
| π¦ Context overflow | Compact the context automatically |
| β±οΈ Session timeout | Resume from the last checkpoint |
| π¨ Build failure | Fix the issue and retry |
π Documentation
- System Architecture β Full technical deep-dive
πΉ Developer's Words
π License
MIT License. LICENSE