R.4

Agent file keys

Every key of the agent file at schema version 16, grouped by block, with its type, default, requirement, and meaning from agent-schema.json at v1.149.0.

The schema is titled Docker Agent Configuration, and the pinned copy is the file at tag v1.149.0, commit bf4169cdd31229d52385410c52c3dcc59b497858. Its version enum runs from "0" to "16", so "16" is the current form. The top level and every block below set additionalProperties to false, so an unknown key fails the load. The only required top-level key is agents. Required says whether the schema lists the key under required. Default is the schema default value, and none means the schema states none.

Top-level keys

All 16 keys come from the root properties object. The docs page configuration/overview explains the reusable blocks mcps, rag, commands, skills, and toolsets.

KeyTypeDefaultRequiredMeaning
versionstring, "0" to "16"nonenoConfiguration version
providersmap of ProviderConfignonenoReusable provider defaults: base_url, token_key, api_type
agentsmap of AgentConfignoneyesThe agents. At least one is required
modelsmap of ModelConfignonenoNamed model configurations
mcpsmap of MCPToolsetnonenoReusable MCP server definitions, referenced by name from a toolset
ragmap of RAGToolsetnonenoReusable RAG source definitions
commandsmap of CommandsnonenoNamed command groups, merged with use_commands
skillsmap of SkillsConfignonenoNamed skill groups, merged with use_skills
toolsetsmap of ToolsetnonenoNamed toolset definitions, appended with use_toolsets
metadataMetadatanonenoAuthor, license, readme, description, version, tags
permissionsPermissionsConfignonenoTool approval patterns for the whole file
runtimeRuntimeDefaultsnonenoExecution defaults the author wants. CLI flags and user settings win
budgetBudgetConfignonenoCeilings for one run, shared by every sub-session in it
budgetsmap of BudgetConfignonenoNamed budgets. Agents that share a name share one ceiling
flavorsmap of object or nullnonenoNamed YAML patches applied with --flavor, with JSON Merge Patch rules, key+ appends, key- removes
evaluatorsmap of EvaluatorConfignonenoNamed provider-backed assessments for tool_guard and routing hooks

Keys under agents

Every key of one agent comes from AgentConfig. The docs page configuration/agents explains them, configuration/structured-output covers structured_output, and features/harnesses covers harness.

KeyTypeDefaultRequiredMeaning
modelstringnonenoA model name from models or provider/model
fallbackFallbackConfig: models (array), retries (default 2), cooldown (default 1m)nonenoModels tried in order when the primary fails, with retry and cool-down rules
descriptionstringnonenoDescription of the agent
welcome_messagestringnonenoMessage shown when the agent starts
toolsetsarray of ToolsetnonenoThe toolsets of the agent
instructionstring or array of stringsnonenoThe system prompt. A list is joined with blank lines
instruction_filestring or array of stringsnonenoFiles, relative to the config file, whose content is the instruction. Exclusive with instruction
harnessHarnessConfig: type (required, claude-code, codex, pi, opencode), model, effort, agent, thinkingnonenoAn external coding CLI that runs the agent instead of a model provider
code_mode_toolsbooleannonenoExpose one tool that calls the others through JavaScript
sub_agentsarray of stringsnonenoAgents the parent delegates to with transfer_task: local names, OCI references, or name:reference
handoffsarray of stringsnonenoAgents that can receive the whole conversation
force_handoffstringnonenoThe agent that always receives the conversation after a final response
routingAgentRouting: allowed_agents (required), default_agentnonenoThe agents a routing hook can select, and the one used when an evaluator is uncertain
add_datebooleannonenoAdd the date to the context
add_environment_infobooleannonenoAdd cwd, git, OS, and arch to the context
readonlybooleannonenoKeep only tools with a read-only annotation in every toolset
safetystrict, balanced, restricted, autonomousnonenoDefault safety mode of new sessions on this agent, below any user choice
redact_secretsbooleantruenoInstall the redact_secrets builtin on tool input, model input, and tool output
max_iterationsintegernonenoMaximum loop iterations
budgetsarray of stringsnonenoNames of top-level budgets this agent spends against
max_consecutive_tool_callsinteger0, which means 5noIdentical tool calls in a row before the agent stops
max_old_tool_call_tokensintegernone, truncation offnoTokens kept from old tool arguments and results. -1 turns truncation off
max_tool_result_tokensintegernonenoTokens kept from each tool result, cut middle-out
num_history_itemsintegernonenoHistory items to keep
session_compactionbooleantruenoCompact the session at the threshold and after a context overflow
compaction_thresholdnumber0.9noFraction of the context window that starts compaction. The model value wins
compaction_modelstringnonenoModel that writes the summary. Highest priority of the three levels
add_prompt_filesarray of stringsnonenoPrompt files, such as AGENTS.md, added to the context
add_prompt_files_depthinteger0noLevels below the working directory in which the same file names are listed by path
commandsobject or arraynonenoNamed prompts for slash commands
structured_outputobject: name, description, schema, strictnonenoA JSON schema that constrains the response, native on OpenAI and Gemini
add_description_parameterbooleannonenoAdd a description parameter to every tool call
hooksHooksConfignonenoLifecycle hooks of this agent
cacheCacheConfig: enabled (default false), case_sensitive (false), trim_spaces (false), pathnonenoReplay the previous answer to the same question
skillsboolean or arraynonenotrue loads every discovered skill. A list mixes sources, names, and inline skills
use_commandsarray of stringsnonenoTop-level command groups to merge in
use_skillsarray of stringsnonenoTop-level skill groups to merge in
use_toolsetsarray of stringsnonenoTop-level toolsets to append after the inline ones

An inline skill under skills has name, description, and instructions as required keys, plus context: fork, model, allowed_tools, and toolsets. A command under commands is a string, or an object with description, instruction, agent, and url.

Keys under models

Every key comes from ModelConfig. The docs page configuration/models explains them, and configuration/routing covers routing.

KeyTypeDefaultRequiredMeaning
providerstringnoneno in the schema, yes in the docs unless first_available is setThe provider id, such as openai, anthropic, dmr
modelstringnoneno in the schema, yes in the docsThe model name
descriptionstringnonenoA human summary, not sent to the model
temperaturenumbernonenoSampling temperature
max_tokensintegernonenoMaximum output tokens per response, not the context window
top_pnumbernonenoTop-p sampling
frequency_penaltynumbernonenoFrequency penalty
presence_penaltynumbernonenoPresence penalty
base_urlstringnonenoThe API base URL, with ${env.VAR} substitution
parallel_tool_callsbooleannonenoAllow parallel tool calls
token_keystringnonenoEnvironment variable that holds the token
bypass_models_gatewaybooleannonenoConnect to the provider directly even when a models gateway is set
provider_optsobjectnonenoProvider options. For dmr: runtime_flags, context_size, keep_alive, and more in R.6
track_usagebooleannonenoTrack usage
thinking_budgetstring or integernonenoReasoning effort or token budget, in the forms R.6 lists
task_budgetinteger or objectnonenoTotal token budget of a task, sent to Anthropic as output_config.task_budget
routingarray of RoutingRule: model, examples (both required)nonenoRules that pick a model from example phrases. This model becomes the router
authAuthConfig: type (required, workload_identity_federation), workload_identity_federationnonenoA non-API-key scheme that wins over the provider path
first_availablearray of stringsnonenoCandidates in priority order. The first with credentials is used. Exclusive with the other keys
title_modelstringnonenoModel that writes session titles
compaction_modelstringnonenoModel that writes compaction summaries
compaction_thresholdnumber0.9noCompaction threshold for agents on this model
capabilitiesCapabilitiesConfig: image, pdf, audio, videononenoAttachment capabilities, when the models.dev catalogue is wrong or silent
output_capabilitiesOutputCapabilitiesConfig: imagenonenoWhether the model can generate images
costCostConfig: input, output, cache_read, cache_write, USD per million tokensnonenoPrices that override the catalogue

Keys under providers

Every key comes from ProviderConfig. The docs page providers/custom explains them.

KeyTypeDefaultRequiredMeaning
providerstringopenai when unsetnoThe underlying type: openai, anthropic, google, amazon-bedrock, dmr, or a built-in alias
api_typeopenai_chatcompletions, openai_responsesopenai_chatcompletions in the schema, model-dependent in the docsnoThe API schema of an OpenAI-compatible provider
base_urlstringnonenoThe endpoint, required for OpenAI-compatible providers, with ${env.VAR} substitution
token_keystringnonenoEnvironment variable that holds the token
unload_apistringnonenoPath or URL of the model unload endpoint, used by the unload builtin
temperaturenumbernonenoDefault temperature
max_tokensintegernonenoDefault output tokens
top_pnumbernonenoDefault top-p
frequency_penaltynumbernonenoDefault frequency penalty
presence_penaltynumbernonenoDefault presence penalty
parallel_tool_callsbooleannonenoDefault for parallel tool calls
provider_optsobjectnonenoProvider options passed to the client
track_usagebooleannonenoDefault usage tracking
thinking_budgetinteger or stringnonenoDefault reasoning budget
task_budgetinteger or objectnonenoDefault task budget
authAuthConfignonenoA non-API-key scheme
compaction_modelstringnonenoDefault compaction model, lowest of the three levels

The federation block under auth requires federation_rule_id (prefix fdrl_), organization_id, and identity_token, and accepts service_account_id. The token source has file, env, command, url, headers, and response_field.

Keys under toolsets

Every key of one toolset entry comes from Toolset. The docs page configuration/tools explains the shared keys, and R.5 says which type uses which.

KeyTypeDefaultRequiredMeaning
typeone of 27 namesnoneno in the schemaThe toolset type
instructionstringnonenoReplaces the built-in instructions, or extends them with {ORIGINAL_INSTRUCTIONS}
toonstringnonenoComma-separated regular expressions of tools whose JSON output is re-encoded as TOON
readonlybooleannonenoKeep only tools with a read-only annotation
modelstringnonenoModel for the turn that processes results from this toolset
refstringnonenodocker:<name> or a name from mcps
configanynonenoTool-specific configuration
commandstringnonenoCommand of a stdio MCP or LSP server
remoteRemote: url (required), transport_type, headers, oauthnonenoA remote MCP server
argsarray of stringsnonenoArguments of the command
toolsarray of stringsnonenoAllow-list of tool names
envmap of stringsnonenoEnvironment variables
sharedbooleannonenoShare the tool state across agents, for think and todo
pathstringnonenoStorage path of memory or tasks
shellobjectnonenoScript definitions of script: cmd, description, args, required, env, working_dir
post_editarray of PostEditConfig: path, cmd (both required)nonenoCommands after an edit of filesystem or file
api_configApiConfig: name, endpoint, method (required), instruction, headers, args, required, output_schemanonenoThe HTTP tool of api
webhook_configWebhookConfig: url (required), provider, headers, chat_idnonenoThe destination of webhook
rag_configRAGConfig: strategies (required), tool, docs, respect_vcs (default true), indexing_timeout, resultsnonenoThe sources and strategies of rag
ignore_vcsbooleantruenoExclude .git and .gitignore patterns from filesystem operations
allow_listarray of stringsnonenoDirectories the file tools can reach
deny_listarray of stringsnonenoDirectories the file tools cannot reach. Wins over allow_list
deferboolean or arraynonenoLoad tools on demand through search_tool and add_tool
timeoutinteger30 when omittednoHTTP timeout in seconds for fetch, api, openapi
max_output_bytesinteger30000noText cutoff of openapi output. 0 turns it off
escape_htmlbooleanfalsenoLegacy HTML escaping in multi-URL fetch results
allowed_domainsarray of stringsnonenoHosts fetch can reach
blocked_domainsarray of stringsnonenoHosts fetch cannot reach. Exclusive with allowed_domains
allow_private_ipsbooleannonenoPermit non-public addresses for fetch, api, openapi, a2a, and remote mcp
sudo_askpassbooleannonenoPrompt for a sudo password through the host UI, for shell
recallbooleannonenoExpose a recall parameter on run_background_job
urlstringnonenoURL of a2a, openapi, or open_url
headersmap of stringsnonenoHTTP headers for openapi, a2a, and fetch
namestringnonenoTool name of a2a
file_typesarray of stringsnonenoExtensions an lsp server handles
allowed_serversarray of stringsnonenoCatalog server ids mcp_catalog offers
blocked_serversarray of stringsnonenoCatalog server ids removed from the offer
modelsarray of stringsnonenoModels model_picker can choose
versionstringnonenoowner/repo@version for auto-install, or false to turn it off
working_dirstringnonenoWorking directory of an mcp or lsp subprocess
lifecycleLifecycle: profile (resilient, strict, best-effort), required, startup_timeout, call_timeout, restart, max_restarts, backoffnonenoThe supervisor rules of an mcp or lsp toolset

A reusable entry under mcps has command, args, ref, remote, config, version, env, tools, instruction, name, defer, working_dir, and lifecycle. An OAuth block under remote has clientId, clientSecret, callbackPort, scopes, and callbackRedirectURL.

Keys under permissions

The three keys come from PermissionsConfig, and the docs page configuration/permissions gives the pattern grammar.

KeyTypeDefaultRequiredMeaning
allowarray of stringsnonenoPatterns approved without confirmation, such as read_* or shell:cmd=ls*
askarray of stringsnonenoPatterns that always ask, even for read-only tools
denyarray of stringsnonenoPatterns always rejected. Wins over allow

Keys under hooks

The events come from HooksConfig, and the docs page configuration/hooks explains each one. Every event holds an array. Matcher events hold HookMatcherConfig entries with matcher, hooks (required), and preempt_yolo. The other events hold hook definitions directly.

EventEntriesWhen it runs
prompt_file_guarddefinitionsBefore a loaded prompt file is stored or used. Every hook must approve
skill_content_guarddefinitionsBefore raw skill text is expanded. Every hook must approve
pre_tool_usematchersBefore a tool runs. Can allow, deny, or modify
post_tool_usematchersAfter a tool completes, with its response
permission_requestmatchersBefore the user is asked to approve a call
session_startdefinitionsWhen a session begins
user_prompt_submitdefinitionsOnce per user message, before the first model call
user_steering_messages_submitdefinitionsWhen queued mid-turn messages are appended
user_followup_submitdefinitionsWhen a follow-up message starts a fresh turn
turn_startdefinitionsAt the start of every model call, with transient context
turn_enddefinitionsWhen a turn ends, for any reason
before_llm_calldefinitionsJust before each model call
after_llm_calldefinitionsAfter each successful model call
session_enddefinitionsWhen a session ends
pre_compactdefinitionsBefore the transcript is compacted
subagent_stopdefinitionsWhen a sub-agent finishes
on_user_inputdefinitionsWhen the agent needs user input
stopdefinitionsWhen the model finishes responding
notificationdefinitionsWhen the agent sends an error or warning
on_errordefinitionsWhen a turn hits an error
on_max_iterationsdefinitionsWhen max_iterations is reached
on_agent_switchdefinitionsWhen the active agent changes
on_session_resumedefinitionsWhen the user lets the run continue past max_iterations
on_tool_approval_decisiondefinitionsAfter the approval chain decides, before the call runs or the denial is recorded
before_compactiondefinitionsImmediately before a compaction. Can veto it
after_compactiondefinitionsAfter a successful compaction
tool_response_transformmatchersBetween a tool run and the record of its response. Can rewrite the output
tool_input_transformmatchersBefore every tool call, ahead of approval. Can patch the arguments
tool_guardmatchersAfter the input transform and before approval. No safety mode bypasses it
before_agent_runrouting definitionsOnce per agent activation. Can route to another agent
after_agent_completerouting definitionsAfter an agent completes. Can route to another agent
worktree_createdefinitionsOnce, after --worktree creates a worktree

A hook definition comes from HookDefinition.

KeyTypeDefaultRequiredMeaning
typecommand, builtin, model, evaluatornoneyesWhat runs: a shell command, a named in-process function, a model, or an evaluator
commandstringnonenoThe shell command or the builtin name
argsarray of stringsnonenoArguments for the handler
namestringnonenoA name for logs and events
timeoutinteger60noSeconds before the hook is cut off
envmap of stringsnonenoEnvironment for this hook only
working_dirstringnonenoWorking directory of this hook
on_errorwarn, ignore, blockwarnnoWhat an error, timeout, or bad output does. pre_tool_use and tool_guard always fail closed
strict_outputbooleanfalsenoRequire one JSON object and reject unknown fields
modelstringnonenoThe provider/model of a model hook
promptstringnonenoThe Go template a model hook renders
schemastringnonenopre_tool_use_decision turns the model reply into a verdict
system_promptstringnonenoA literal system message for a model hook
evaluatorstringnonenoThe top-level evaluator of an evaluator hook
evaluator_policyEvaluatorPolicy: decisions, min_probability, fallback (all required)nonenoHow an evaluator verdict maps to a guard decision
routing_policyRoutingPolicy: routes, min_probability (both required)nonenoHow an evaluator choice maps to an agent

The type description names 17 builtins. They are add_context, add_date, add_environment_info, add_prompt_files, add_git_status, add_git_diff, add_directory_listing, add_user_info, add_recent_commits, max_iterations, redact_secrets, transform_json, limit_large_tool_results, safer_shell, http_post, snapshot, and unload.

Keys under runtime, budget, metadata, and evaluators

BlockKeyTypeDefaultRequiredMeaning
runtimesandboxbooleannonenoRun in a sandbox by default, as --sandbox does
runtimenetwork_allowlistarray of stringsnonenoHosts added to the sandbox allowlist, host or host:port
runtimesafetyone of four modesnonenoDefault safety mode of the file, below a per-agent safety
budgetmax_costnumbernonenoMaximum USD per run, counting only priced responses
budgetmax_tokensintegernonenoMaximum input plus output tokens over the run
budgetmax_timestringnonenoMaximum sum of turn durations, as a Go duration
metadataauthor, license, readme, description, version, tagsstrings, tags an arraynonenoDescriptive fields. version is used for OCI publishing
evaluatorsprovider, model, type, instructionsstrings, type one of boolean, choice, scorenoneyesA named assessment on the typesafe or openai Decisions backend
evaluatorsbase_url, endpoint, token_key, bypass_models_gateway, choices, levels, timeout, costmixedtimeout 10s in the descriptionnoEndpoint, credential, and output shape of the evaluator

The docs pages configuration/budget and configuration/flavors explain budget and flavors with examples.

Docker Sandboxes (sbx) and Docker Agent (docker-agent) sbx 0.47.0, docker-agent 1.149.0 · bf4169c · 2026-10-07 · Edition 2026.10