https://github.com/agnusdei1207/opencode-orchestrator
Opencode Plugin for AI-Agent Orchestration
https://github.com/agnusdei1207/opencode-orchestrator
ai-orchestration opencode rust
Last synced: about 1 month ago
JSON representation
Opencode Plugin for AI-Agent Orchestration
- Host: GitHub
- URL: https://github.com/agnusdei1207/opencode-orchestrator
- Owner: agnusdei1207
- License: mit
- Created: 2026-01-13T01:25:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-01-29T02:59:48.000Z (2 months ago)
- Last Synced: 2026-02-26T16:50:53.606Z (about 1 month ago)
- Topics: ai-orchestration, opencode, rust
- Language: TypeScript
- Homepage: https://rdot.agnusdei.kr/
- Size: 42.9 MB
- Stars: 91
- Watchers: 1
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-AI-driven-development - OpenCode Orchestrator - Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering (Multi-Agent & Orchestration / Other IDEs)
README
---
OpenCode Orchestrator
Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering
[](LICENSE)
[](https://www.npmjs.com/package/opencode-orchestrator)
---
## β‘ Quick Start
```bash
npm install -g opencode-orchestrator
```
Inside an OpenCode environment:
```bash
/task "Implement a new authentication module with JWT and audit logs"
```
---
## π Engine Workflow
OpenCode Orchestrator utilizes a **Hub-and-Spoke Topology** with **Work-Stealing Queues** to execute complex engineering tasks through parallel, context-isolated sessions.
```text
[ User Task ]
β
ββββββββββββΌβββββββββββ
β COMMANDER ββββββββββββββ (Loop Phase)
β [Work-Stealing] β β
ββββββββββ¬βββββββββββββ β
β β
ββββββββββΌβββββββββββ β
β PLANNER β (Todo.md) β
β [Session Pool] β β
ββββββββββ¬βββββββββββ β
β β (MVCC Atomic Sync)
βββββββββββββββΌβββββββββββββββ β
βΌ (Isolated Session Pool)βΌ β
[ Session A ] [ Session B ] [ Session C ] β
[ Worker ] [ Worker ] [ Reviewer ] β
β [Memory ] β [Memory ] β [Memory β β
β Pooling] β β Pooling] β β Pooling] β β
βββββββββββββββ¬βββββββββββββββ β
β β
ββββββββββΌβββββββββββ β
β MSVP MONITOR ββββββββββββββββ
β [Adaptive Poll] β
ββββββββββ¬βββββββββββ
β
ββββββββββΌβββββββββββ
β QUALITY ASSURANCE β
ββββββββββ¬βββββββββββ
β
[ β¨COMPLETED ]
```
---
## β‘ Elite Multi-Agent Swarm
| Agent | Expertise | Capability |
|:------|:----------|:-----------|
| **Commander** | Mission Hub | Session pooling, parallel thread control, state rehydration, work-stealing coordination |
| **Planner** | Architect | Symbolic mapping, dependency research, roadmap generation, file-level planning |
| **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
| **Reviewer** | Auditor | Rigid verification, LSP/Lint authority, integration testing, final mission seal |
---
## π οΈ Core Capabilities
### π Atomic MVCC State Synchronization
Solves the "Concurrent TODO Update" problem using **MVCC + Mutex**. Agents safely mark tasks complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged.
### π§© Advanced Hook Orchestration
Execution flows governed by a **Priority-Phase Hook Registry**. Hooks are grouped into phases (`early`, `normal`, `late`) and executed via **Topological Sort** for predictable, dependency-aware ordering.
### π‘οΈ Autonomous Recovery
- **Self-healing loops** with adaptive stagnation detection
- **Proactive Agency**: Smart monitoring that audits logs and plans ahead during background tasks
- **Auto-retry with backoff**: Exponential backoff for transient failures
### π― State-Level Session Isolation
Reused sessions in the **SessionPool** are explicitly reset via server-side compaction, ensuring previous task context never leaks into new tasks.
### π Zero-Payload Turbo Mode
Leverages `system.transform` to unshift agent instruction sets server-side, reducing initial message payloads by **90%+** and preventing context fragmentation.
### π§ Hierarchical Memory System
Maintains focus across thousands of conversation turns using a 4-tier memory structure with **EMA-based Context Gating** to preserve architectural truth while pruning noise.
### π Adaptive Intelligence Loop
- **Stagnation Detection**: Senses when no progress is made across iterations
- **Diagnostic Intervention**: Forces "Diagnostic Mode" mandating log audits and strategy pivots
- **Proactive Agency**: Mandates Speculative Planning during background task execution
---
## οΏ½ Performance Benchmarks
| Metric | Improvement |
|:-------|:------------|
| CPU Utilization | 90%+ (up from 50-70%) |
| Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
| Session Creation | 90% faster (50ms vs 500ms) via session pooling |
| Memory Usage | 60% reduction via object/string/buffer pooling |
| GC Pressure | 80% reduction |
| Token Efficiency | 40% reduction via Incremental State & System Transform |
| Sync Accuracy | 99.95% via MVCC+Mutex |
| Parallel Efficiency | 80% improvement (50% β 90%+) |
---
## ποΈ Infrastructure & Reliability
### Resource Safety
- **RAII Pattern**: Guaranteed resource cleanup with zero leaks
- **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
- **Atomic File Operations**: Temp file + rename for corruption-proof writes
- **Automatic Backups**: Timestamped config backups with rollback support
### Safety Features
- **Circuit Breaker**: Auto-recovery from API failures (5 failures β open)
- **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
- **Terminal Node Guard**: Prevents infinite recursion via depth limit
- **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
### Technical Stack
- **Runtime**: Node.js 18+ (TypeScript)
- **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
- **Concurrency**: Chase-Lev work-stealing deque + priority queues
- **Memory**: Object pooling + string interning + buffer pooling
- **State Management**: MVCC + Mutex
- **Safety**: RAII + circuit breaker + resource pressure detection
---
## π§ Installation & Configuration
### Safe Installation
The installation process is **production-safe** with multiple protection layers:
1. β
**Never overwrites** β always merges with existing config
2. β
**Automatic backups** β timestamped, last 5 kept
3. β
**Atomic writes** β temp file + rename (OS-level atomic)
4. β
**Automatic rollback** β restores from backup on any failure
5. β
**Cross-platform** β Windows (native, Git Bash, WSL2), macOS, Linux
### Configuration Logs
- Unix: `/tmp/opencode-orchestrator.log`
- Windows: `%TEMP%\opencode-orchestrator.log`
---
## π Documentation
- [Why We Built a Custom Orchestrator β](docs/WHY_CUSTOM_ORCHESTRATOR.md)
- [System Architecture Deep-Dive β](docs/SYSTEM_ARCHITECTURE.md)
- [Windows Configuration Guide β](docs/WINDOWS_CONFIGURATION.md)
- [Developer Notes β](docs/DEVELOPERS_NOTE.md)
---
## π License
MIT License β see [LICENSE](LICENSE) for details.
---
Built with β‘ for production-grade autonomous software engineering