Custom OpenCode agents (explorer, librarian, oracle, ui-planner) with orchestration injection for Build/Plan agents
npm install ayush-opencodeCustom OpenCode plugin with specialized subagents and orchestration injection.
- 4 Custom Subagents: Explorer, Librarian, Oracle, UI-Planner
- Auto-Loaded MCP Servers: exa, grep_app, sequential-thinking (no manual config needed!)
- Orchestration Injection: Automatically teaches Build/Plan agents how to delegate tasks
- Portable: Install on any machine via opencode.json
Just add to your opencode.json — OpenCode will auto-install the plugin:
``json`
{
"plugin": ["ayush-opencode@0.2.0"]
}
That's it! Restart OpenCode and the plugin is ready to use.
> Important: OpenCode does NOT auto-update plugins. You must pin versions for reliable updates.
`json`
{
"plugin": ["ayush-opencode@0.2.0"]
}
Why pin versions? OpenCode uses Bun's lockfile which pins resolved versions. If you use "ayush-opencode" without a version, it resolves to "latest" once and never updates even when new versions are published.
Simply change the version in your config and restart OpenCode:
`jsonc
// Change from:
"plugin": ["ayush-opencode@0.2.0"]
// To:
"plugin": ["ayush-opencode@0.3.0"]
`
OpenCode will detect the version mismatch and install the new version automatically.
If you previously used an unpinned version, clear the cache:
`bash`
rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock
Then restart OpenCode with a pinned version in your config.
Model: anthropic/claude-haiku-4-5
Model: anthropic/claude-sonnet-4-5
Model: openai/gpt-5.2-high
Model: google/gemini-3-pro-high
This plugin automatically injects delegation guidelines into OpenCode's Build and Plan agents. After installation, these agents will know when and how to delegate tasks to the specialized subagents.
| User Request | Delegated To |
|--------------|--------------|
| "How does React Query handle caching?" | @librarian |
| "Where is the auth middleware?" | @explorer |
| "Should I use Redux or Zustand?" | @oracle |
| "Make this dashboard look better" | @ui-planner |
You can customize agent models or disable agents by creating a config file.
| Location | Priority | Use Case |
|----------|----------|----------|
| ~/.config/opencode/ayush-opencode.json | Base | User-level defaults |.opencode/ayush-opencode.json
| | Override | Project-specific settings |
Project config overrides user config when both exist.
`json`
{
"agents": {
"explorer": { "model": "anthropic/claude-haiku-4-5" },
"librarian": { "model": "anthropic/claude-sonnet-4-5" },
"oracle": { "model": "openai/gpt-5.2-high" },
"ui-planner": { "model": "google/gemini-3-pro-high" }
},
"disabled_agents": [],
"disabled_mcps": []
}
To use different models for specific agents:
`json`
{
"agents": {
"explorer": { "model": "anthropic/claude-sonnet-4" },
"oracle": { "model": "openai/gpt-4o" }
}
}
To disable specific agents:
`json`
{
"disabled_agents": ["oracle", "ui-planner"]
}
Available agent names: explorer, librarian, oracle, ui-planner
This plugin automatically loads the following MCP servers — no manual configuration needed!
| MCP Server | Type | Description |
|------------|------|-------------|
| exa | HTTP Streamable | Web search, code context, URL crawling (no API key required) |grep_app
| | Remote | GitHub code search across millions of repos |sequential-thinking
| | Local | Structured reasoning for complex problems |
When you install this plugin, these MCP servers are automatically injected into OpenCode's config:
- Your other MCPs are preserved — If you have supabase, memcontext, or any custom MCPs, they continue to workexa
- Conflicts use our config — If you have configured differently, our version takes prioritydisabled_mcps
- Disable if needed — Use config to opt-out (see below)
If you want to keep your own MCP config for a server we provide:
`json`
{
"disabled_mcps": ["exa"]
}
Available MCP names: exa, grep_app, sequential-thinking
This will skip injecting our exa config, allowing your custom one to remain.
`bashInstall dependencies
bun install
This plugin was built with inspiration and learnings from:
- OpenCode — The CLI tool this plugin extends. Check out their documentation and plugin development guide.
- oh-my-opencode by YeonGyu Kim — A fantastic OpenCode plugin that pioneered many orchestration patterns used here. The agent delegation strategies, parallel execution patterns, and prompt structuring were heavily influenced by their work.
MIT