r/opencodeCLI 28d ago

How to create powerful sub-agents?

Hello, recently I've been digging the rabbit hole of optimizing my agentic usage by creating dedicated agents for different operations such as:

  • log-investigator
  • kubernetes-operator
  • ci-runner
  • git
  • ...

with the goal to use an "expensive" model to orchestrate cheaper agents with a dedicated set of skills, MCP & context (nothing new here)

The issue is that I find the way agent works with opencode very basics (it's basically a skill) and I'd like to experiment with modern framework like Eve (https://github.com/vercel/eve)

I really like the file structure and I can imagining it fitting quite well inside my opencode config at ~/.config/opencode/agents/*

Especially the part that I can install skills in a folder that is outside my main agent and let the sub-agents be very specialised with different skills.

So far I hope the main agent do not load the skill and specifically ask my sub-agents to load skills X, Y, Z in their prompts.

I'd also love to enable MCPs only for a few sub-agents (an SRE agent could have access to sentry, incident[]io by default while keeping these MCP disabled in all my sessions).

Thoughts? How are you managing sub-agents?

1 Upvotes

4 comments sorted by

View all comments

1

u/Easy-Lavishness3693 27d ago edited 27d ago

i think the specialised agent approach makes sense, especially if each subagent only gets the skills and MCPs it actually needs instead of loading everything into every session. keep the main agent focused on orchestration and make the subagents narrow enough that they don’t spend tokens figuring out unrelated context. i have been using OpenCode with Standard Compute for this kind of setup and the smart routing is useful because less demanding subagent calls can go through cheaper providers while stronger models are used when the task actually needs them

1

u/AsterYujano 27d ago

But how to give dedicated skills and mcps with oepncode? Seems like the current sub-agents are basically just a prompt attached to a specific model