Skip to content

opencode-agents

Use when working with OpenCode agents — creating custom agents, configuring Build/Plan modes, subagents, agent properties (model, tools, permissions, prompts), or switching between agents.

ModelSource
sonnetpack: opencode
Full Reference

Agents are specialized AI assistants with custom prompts, models, and tool access. Two types: primary (direct interaction, Tab to switch) and subagents (invoked by primary agents or via @mention). Current version: v1.2.10 (Feb 2026).

ItemValue
Switch agentsTab key or switch_agent keybind
Invoke subagent@agent-name in message
Config location (global)~/.config/opencode/agents/
Config location (project).opencode/agents/
Create interactivelyopencode agent create
List all agentsopencode agent list
AgentTypeToolsPurpose
BuildPrimaryAll enabledFull development (default)
PlanPrimaryRestricted (edit/bash = “ask”)Analysis and exploration
GeneralSubagentFull accessComplex multi-step research
ExploreSubagentRead-onlyFast codebase analysis
CompactionHiddenSystemAuto-compresses long context
TitleHiddenSystemAuto-generates session titles
SummaryHiddenSystemAuto-generates summaries
TopicFile
Agent types — primary, subagent, hidden, mode valuesreference/agent-types.md
Built-in agents — Build, Plan, General, Explore, systemreference/built-in-agents.md
All agent properties — description, model, steps, hidden, disablereference/agent-properties.md
JSON and Markdown config formats, file locations, YAML gotchasreference/configuration.md
Tool enable/disable, wildcard patterns, MCP tool namespacingreference/tool-configuration.md
Permission values, bash patterns, task permission, conflict resolutionreference/permission-configuration.md
Per-agent model override, variants, model selection strategyreference/model-configuration.md
opencode agent create, agent list, manual file creationreference/agent-creation-cli.md
Build, Plan, Review, Debug, Docs, Security, Haiku patternsreference/design-patterns.md
Agent missing from UI, tool/permission conflicts, step limitsreference/troubleshooting.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.


┏━ 🤖 opencode-agents ━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Create and configure OpenCode agents — modes, tools, permissions, prompts ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛