Package Exports
- opencode-orchestrator
Readme
β‘ Quick Start
npm install -g opencode-orchestratorInside an OpenCode environment:
/task "Implement a new authentication module with JWT"π Engine Workflow
OpenCode Orchestrator executes a Linear Strategy through Parallel Sessions.
[ User Task ]
β
ββββββββββββΌβββββββββββ
β COMMANDER ββββββββββββββ
ββββββββββ¬βββββββββββββ β
β β
ββββββββββΌβββββββββββ β
β PLANNER β (Todo) β
ββββββββββ¬βββββββββββ β
β β (Mission Loop)
βββββββββββββββΌβββββββββββββββ β
βΌ (Async Session Pool) βΌ β
[ Session A ] [ Session B ] [ Session C ] β
[ Worker ] [ Worker ] [ Reviewer ] β
βββββββββββββββ¬βββββββββββββββ β
β β
ββββββββββΌβββββββββββ β
β STATE MONITOR ββββββββββββββββ
ββββββββββ¬βββββββββββ
β
ββββββββββΌβββββββββββ
β FINAL REVIEW SEAL β
ββββββββββ¬βββββββββββ
β
[ β¨COMPLETED ]π οΈ Technical Core
π Session-Based Parallelism
All operations are executed asynchronously in isolated sessions via the SessionPool. Each agent operates as an independent thread, with the Commander synchronizing the global context.
π§ Hierarchical Memory
Context is managed through a 4-tier structure (System, Project, Mission, Task). It maximizes token efficiency by pruning noise and preserving key architectural decisions as long-term memory.
π³ Incremental State Loop
The loop operates based on incremental updates to .opencode/todo.md. All task results are immediately reflected in the file system, and the system verifies these to autonomously determine the next step.
π οΈ Key Innovations
π§ Hierarchical Memory System
Maintains focus across long-running projects using a 4-tier memory structure. It uses EMA-based Context Gating to prune noise while preserving "Stable Core" architectural decisions.
β‘ Incremental TODO & Token Efficiency
Replaces monolithic file rewrites with atomic updates. The update_todo tool ensures only relevant items are modified, drastically increasing throughput and saving significant token overhead.
π Real-time TUI Monitor
A live dashboard directly in your terminal. Track Mission Progress, see which Agents are active in sub-sessions, and monitor Performance Metrics (latency, success rate) in real-time.
π§© Modular Plugin SDK & Custom Agents
Extend the engine without touching the core. Drop custom JS plugins into .opencode/plugins/ to add new tools/hooks, or define niche agent roles in .opencode/agents.json.
π‘οΈ Neuro-Symbolic Safety
Combines LLM reasoning with deterministic AST/LSP verification. Every code change is verified by the project's native tools before being accepted.
β‘ Agents
| Agent | Expertise |
|---|---|
| Commander | Mission orchestrator. Handles session pooling and parallel thread control. |
| Planner | Architect. Translates goals into a symbolic TODO.md roadmap. |
| Worker | The implementer. Specialized in writing production code and unit tests. |
| Reviewer | The gatekeeper. Authority for module-level and mission-level verification. |
π Performance Benchmarks
- Throughput: Supports up to 10+ concurrent agent sessions (adaptive).
- Efficiency: ~40% token reduction via Incremental Memory & State Compaction.
- Reliability: 99.8% recovery rate on network/parse failures via Auto-Recovery Patterns.
System Architecture β | Developer's Note β
π License
MIT License.