Compose built-in extensions#

Start with the capability you need. Passing an extension list replaces optional defaults, so explicitly include history and tool guidance if you want them. Do not add InternalMessageExtension or SteeringExtension yourself; the runtime already provides them.

Capability map#

Extension

Use when

Important constraint

InMemoryMessageAccumulator

Retain conversation history inside one process.

Share the instance to share its memory; not durable.

SQLiteSessionExtension

Restore raw history and compaction checkpoints across restarts.

Close the owned pool; use one history restorer.

JSONLExtension

Append one self-contained audit record for each Agent turn.

One session owns one file; earlier turns are not repeated.

ToolGuidelinesExtension

Include tool snippets and guidelines in model instructions, or in each tool’s description.

Include explicitly when supplying a custom extension list; placement chooses where the guidance goes.

AgentsMdExtension

Load working-directory AGENTS.md files into model instructions.

Reads parent directories too; treat files as external input, not authorization.

FileSystemExtension

Read/search or edit files through relative or absolute paths.

Injects the current directory; read_only limits tools, not OS permissions.

CodingExtension

Add writable filesystem tools and shell execution.

Injects the directory used by relative paths and shell execution.

ReadFileExtension, EditExtension, and the other single-tool extensions

Offer one built-in tool on its own: read_file, read (text or image), view_image, glob, grep, write_file, edit, delete_file, or bash.

One extension, one tool; they inject no directory message. ToolExtension wraps any tool the same way.

AskUserExtension

Let the model ask the UI a question and wait.

Route replies with session ID and tool-call ID.

PlanModeExtension

Model-selected planning entry/exit with user approval events.

UI must implement its external-response protocol.

TodoWriteExtension

Track ordered tasks within the current request.

Only one in_progress item; lists are cleared at request end.

CompactionExtension

Summarize older complete turns before a model step.

Token estimates and model context limits must be configured appropriately.

GoalExtension

Continue externally selected Goal Mode work after private evaluation.

UI arms one exact session/request before starting it; selection is one-shot.

SubAgentExtension

Delegate to configured child profiles.

Models, tools, and persistence live in each definition.

AsyncSubAgentExtension

Run child profiles in the background and manage them with start, list, status, output, and cancel tools.

Tasks live in memory and need the event loop to keep running; call close() on shutdown.

SkillExtension

Discover skill descriptions and lazily load complete instructions.

Treat skill files as external input, not authorization.

ToolSearchExtension

Search for optional tools instead of sending every definition up front, and list what can be found.

Requires the Responses or Anthropic Messages protocol; see Load tools and skills on demand.

JITHarnessExtension

Let a model create, compose, update, unload, and reload Python tools.

Trusted code, not a sandbox; deferred inspection tools keep context small; see Build and reuse JIT capabilities.

McpExtension

Register remote or subprocess MCP tools.

Trust and resource ownership remain application responsibilities.

Provider ServerToolExtension variants

Enable a capability executed by the selected model provider.

The tool type and endpoint protocol must be compatible; no local executor runs.

Try the examples rather than enabling everything#

Start with Stream a tool round trip for tools, Restore SQLite history for durability, Pause for external approval for user interaction, and Compact without losing history for context management. The subagent and goal examples show two distinct delegation patterns.

For complete setup guides, see Load project instructions for AGENTS.md, Load tools and skills on demand for skills and deferred tools, and Connect MCP tools for remote tool servers. Browse Extensions for exact configuration options and event payloads.