summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-02-04 00:00:05 -0600
committerGitHub <[email protected]>2026-02-04 00:00:05 -0600
commit8c1f1f13dcb74cd22d158e5f7eb3fce5f4240cbf (patch)
treef4360119c2472a4a014e63407282dcfb07905b16
parentb942e0b4dcaada78ed646f7e3868424cab9e913a (diff)
downloadopencode-8c1f1f13dcb74cd22d158e5f7eb3fce5f4240cbf.tar.gz
opencode-8c1f1f13dcb74cd22d158e5f7eb3fce5f4240cbf.zip
docs: document the built in agents (#12066)
-rw-r--r--packages/opencode/src/provider/provider.ts2
-rw-r--r--packages/web/src/content/docs/agents.mdx32
2 files changed, 29 insertions, 5 deletions
diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts
index d5d54c5e5..af4048c6c 100644
--- a/packages/opencode/src/provider/provider.ts
+++ b/packages/opencode/src/provider/provider.ts
@@ -989,7 +989,7 @@ export namespace Provider {
// Merge configured headers into request headers
opts.headers = {
- ...(typeof opts.headers === "object" ? opts.headers : {}),
+ ...(opts.headers ?? {}),
...options["headers"],
}
diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx
index 755c4ba25..53de8af5f 100644
--- a/packages/web/src/content/docs/agents.mdx
+++ b/packages/web/src/content/docs/agents.mdx
@@ -46,7 +46,7 @@ OpenCode comes with two built-in primary agents and two built-in subagents.
---
-### Build
+### Use build
_Mode_: `primary`
@@ -54,7 +54,7 @@ Build is the **default** primary agent with all tools enabled. This is the stand
---
-### Plan
+### Use plan
_Mode_: `primary`
@@ -68,7 +68,7 @@ This agent is useful when you want the LLM to analyze code, suggest changes, or
---
-### General
+### Use general
_Mode_: `subagent`
@@ -76,7 +76,7 @@ A general-purpose agent for researching complex questions and executing multi-st
---
-### Explore
+### Use explore
_Mode_: `subagent`
@@ -84,6 +84,30 @@ A fast, read-only agent for exploring codebases. Cannot modify files. Use this w
---
+### Use compaction
+
+_Mode_: `primary`
+
+Hidden system agent that compacts long context into a smaller summary. It runs automatically when needed and is not selectable in the UI.
+
+---
+
+### Use title
+
+_Mode_: `primary`
+
+Hidden system agent that generates short session titles. It runs automatically and is not selectable in the UI.
+
+---
+
+### Use summary
+
+_Mode_: `primary`
+
+Hidden system agent that creates session summaries. It runs automatically and is not selectable in the UI.
+
+---
+
## Usage
1. For primary agents, use the **Tab** key to cycle through them during a session. You can also use your configured `switch_agent` keybind.