docker-agent is configured with a YAML file. You can define one or more agents, the models they use, the tools available to them, and optional features like permissions, hooks, and structured output.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/docker/docker-agent/llms.txt
Use this file to discover all available pages before exploring further.
Config file structure
A docker-agent YAML config has these top-level sections:agent.yaml
Minimal config
The simplest possible configuration — a single agent with an inline model reference:agent.yaml
version, no models section — just an agent. docker-agent fills in sensible defaults.
Inline vs named models
Models can be referenced inline or defined in themodels section.
- Inline
- Named
Use
provider/model-name directly on the agent. Quick and concise.Config versioning
docker-agent configs are versioned. The current version is7. Add it at the top of your config to ensure consistent behavior:
0 through 7.
Validation
docker-agent validates your configuration at startup:- All
sub_agentsmust reference agents defined in the config - Named model references must exist in the
modelssection - Provider names must be valid (
openai,anthropic,google,amazon-bedrock,dmr, etc.) - Required API key environment variables must be set
- Tool-specific fields are validated (e.g.,
pathis only valid for thememorytoolset)
Environment variables
API keys are read from environment variables — never store secrets in config files.| Variable | Provider |
|---|---|
OPENAI_API_KEY | OpenAI |
ANTHROPIC_API_KEY | Anthropic |
GOOGLE_API_KEY | Google Gemini |
MISTRAL_API_KEY | Mistral |
XAI_API_KEY | xAI |
NEBIUS_API_KEY | Nebius |
| Variable | Description |
|---|---|
DOCKER_AGENT_AUTO_INSTALL | Set to false to disable automatic tool installation |
DOCKER_AGENT_TOOLS_DIR | Override the base directory for installed tools (default: ~/.cagent/tools/) |
JSON schema
For editor autocompletion and inline validation, add this to the top of your YAML file:Metadata section
Optional metadata for agent distribution via OCI registries:| Field | Description |
|---|---|
author | Author or organization name |
license | License identifier (e.g., Apache-2.0, MIT) |
description | Short description for the agent |
readme | Longer Markdown description shown in registries |
version | Semantic version string |
Custom providers section
Define reusable provider configurations for custom or self-hosted endpoints:| Field | Description |
|---|---|
api_type | API schema: openai_chatcompletions (default) or openai_responses |
base_url | Base URL for the API endpoint (required) |
token_key | Environment variable name containing the API token |
Configuration reference
Agents
All agent fields: model, instruction, toolsets, sub-agents, hooks, and more.
Models
Provider setup, parameters, thinking budget, and routing.
Tools
Built-in tools, MCP tools, Docker MCP, and tool filtering.
Hooks
Run shell commands at lifecycle events.
Permissions
Control which tools auto-approve, require confirmation, or are blocked.
Routing
Route requests to different models based on message content.
Sandbox
Run agents in an isolated Docker container.
Structured output
Constrain agent responses to a JSON schema.