TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lnardev/opencode-config-agent/llms.txt
Use this file to discover all available pages before exploring further.
opencode.json file is the central configuration for OpenCode Config Agent. It lives at ~/.config/opencode/opencode.json and controls everything about how agents behave: which agents exist, what prompts they use, what tools they can invoke, which MCP servers are connected, what filesystem and shell permissions are enforced, and which plugins are loaded.
Top-level structure
The file is a single JSON object with four top-level keys:Points to the OpenCode JSON schema for editor validation and autocompletion.
A map of agent names to agent configuration objects. Each key becomes the agent’s identifier used in the agent picker and for delegation.
A map of MCP server names to connection configurations. See the MCP field section below and the MCP Servers reference for full details.
Global permission rules controlling bash command execution and file read access. See the Permissions reference for full details.
An array of npm package names to load as OpenCode plugins.
agent field
Each entry underagent defines one agent available in OpenCode. Agents are addressed by their key name (e.g. "tony stark", "sdd-orchestrator").
Agent object fields
A short human-readable description shown in the agent picker when selecting which agent to use.
When
true, the agent is hidden from the autocomplete picker and agent selection UI. Use this for subagents that are only meant to be called programmatically by orchestrators. Defaults to false.Controls how the agent can be invoked.
primary— can be selected directly by the user from the agent picker or invoked in conversation.subagent— intended only for delegation from another agent. Cannot be invoked directly by the user in normal flow.
The system prompt for the agent. Can be either inline text or a
{file:path} reference. See Prompt reference syntax below.A map of tool names to booleans. Set a tool to
true to enable it for this agent, false to disable. Common tools: bash, read, write, edit, delegate, delegation_list, delegation_read.Per-agent permission overrides that layer on top of the global
permission block. Useful for restricting what a specific agent can delegate to. See Per-agent permissions.Agents in this configuration
OpenCode Config Agent ships with two primary agents and ten hidden subagents:| Agent | Mode | Hidden | Description |
|---|---|---|---|
tony stark | primary | false | Senior Architect mentor — helpful first, challenging when it matters |
sdd-orchestrator | primary | false | Agent Teams Orchestrator — coordinates sub-agents, never does work inline |
sdd-init | subagent | true | Bootstrap SDD context and project configuration |
sdd-explore | subagent | true | Investigate codebase and think through ideas |
sdd-propose | subagent | true | Create change proposals from explorations |
sdd-design | subagent | true | Create technical design from proposals |
sdd-spec | subagent | true | Write detailed specifications from proposals |
sdd-tasks | subagent | true | Break down specs and designs into implementation tasks |
sdd-apply | subagent | true | Implement code changes from task definitions |
sdd-verify | subagent | true | Validate implementation against specs |
sdd-archive | subagent | true | Archive completed change artifacts |
sdd-onboard | subagent | true | Guide user through a complete SDD cycle using their real codebase |
The two primary agents —
tony stark and sdd-orchestrator — are the entry points you interact with directly. All sdd-* subagents are invoked automatically by the orchestrator as it progresses through the SDD workflow phases.tony stark
Tony Stark is a senior architect mentor persona. Its prompt is loaded from./AGENTS.md (relative to the opencode.json location), making it easy to customize the mentor’s personality and focus areas by editing that file.
sdd-orchestrator
The SDD orchestrator is a coordinator agent. It holds the SDD workflow logic inline in itsprompt field and delegates all real work to the sdd-* subagents. It has the full delegation toolset enabled and a permission override that restricts it to only delegating to agents matching sdd-*.
Prompt reference syntax
Agent prompts support a{file:path} syntax that loads prompt content from an external file at runtime. This keeps large prompt files out of the JSON and allows you to edit them in your preferred editor.
A path relative to the directory containing
opencode.json. For a config at ~/.config/opencode/opencode.json, ./AGENTS.md resolves to ~/.config/opencode/AGENTS.md.An absolute path anywhere on the filesystem. The SDD subagents use absolute paths pointing to their individual prompt files under
~/.config/opencode/prompts/sdd/.mcp field
Themcp block registers Model Context Protocol servers that agents can call as tools. Each key is the server’s name as it appears in tool calls.
remote— connects to an MCP server over HTTP/SSE at the givenurl.local— spawns a local process viacommandand communicates over stdio.
Required when
type is "remote". The HTTP endpoint of the MCP server.Required when
type is "local". The command and arguments to spawn the MCP server process.When
false, the server is registered but not started. Defaults to true.context7
Remote MCP server providing up-to-date library documentation. Used by agents when they need current API references.
engram
Local persistent memory server. Used by the SDD orchestrator and subagents to store and retrieve artifacts across sessions.
chrome-devtools
Local MCP server bridging the Chrome DevTools Protocol. Useful for frontend debugging workflows.
plugin field
Plugins extend OpenCode’s core functionality. They are loaded fromnode_modules in the config directory.
opencode-anthropic-login-via-cli
Enables authentication with Anthropic via the CLI, so you can log in to your Anthropic account directly from the terminal rather than managing API keys manually.
Installing plugins
After adding a plugin to theplugin array, you must install it:
package.json in the config directory tracks plugin versions. To pin a specific version, replace @latest with the version tag:
TUI plugins (like
opencode-subagent-statusline) are configured separately in tui.json — they do not go in the plugin array in opencode.json. See the TUI configuration reference.