Get up and running with Docker Agent in under 5 minutes. Pick whichever path suits you best.
Option A: Run the Default Agent
The fastest way to try Docker Agent — no config file needed:
# Launch the default agent with the interactive TUI
$ docker agent runThis starts a general-purpose assistant with sensible defaults. Just start chatting.
メモThis needs a model: a cloud provider API key, or a local model pulled through Docker Model Runner. Set Up a Model walks through both paths.
Option B: Run an Agent from a Registry
Run an agent shared through any OCI-compatible registry — no local YAML needed:
$ docker agent run myorg/agent:tagOption C: Generate a Config Interactively
Use the docker agent new command to scaffold a config file through prompts:
# Interactive wizard
$ docker agent new
# Or specify options directly
$ docker agent new --model openai/gpt-5
# Override iteration limits
$ docker agent new --model dmr/ai/gemma3-qat:12B --max-iterations 15The builder chooses a filename based on the agent's purpose. Run the file it creates; for example, if it creates agent.yaml:
$ docker agent run agent.yamlOption D: Write Your Own Config
Create an agent.yaml by hand for full control. Here's a minimal example:
agents:
root:
model: anthropic/claude-sonnet-4-5
description: A helpful coding assistant
instruction: |
You are an expert software developer. Help users write
clean, efficient code. Explain your reasoning.
toolsets:
- type: filesystem
- type: shell
- type: thinkThis gives your agent:
- Claude Sonnet 4.5 as the underlying model
- Filesystem access to read and write files
- Shell access to run commands
- Think tool for step-by-step reasoning
This config needs ANTHROPIC_API_KEY set. See Set Up a Model
for where to put it, or use a local dmr/... model that needs no key.
# Launch the interactive terminal UI
$ docker agent run agent.yaml情報Prefer HCL?
You can write the same config as
agent.hclusing labeled blocks and heredocs. See HCL Configuration .
Try It Out
Once your agent is running, try asking it to:
- "List the files in the current directory"
- "Create a Python script that fetches weather data"
- "Explain what the code in main.go does"
情報Add
--yoloto auto-approve all tool calls:docker agent run agent.yaml --yolo
Take the Interactive Tour
Prefer to learn by doing? Run:
$ docker agent getting-startedThis launches a short, scripted tour inside the chat UI: sending messages, approving tool calls, the command palette, and slash commands. It's skippable at any point with Esc, and you can replay it later with the same command or the /getting-started slash command.
Non-Interactive Mode
Use docker agent run --exec for one-shot tasks:
# Ask a single question
$ docker agent run --exec agent.yaml "Create a Dockerfile for a Node.js app"
# Pipe input
$ cat error.log | docker agent run --exec agent.yaml "What's wrong in this log?"Add More Power
Give your agent persistent memory and web search:
agents:
root:
model: anthropic/claude-sonnet-4-5
description: Research assistant with memory
instruction: |
You are a research assistant. Search the web for information,
remember important findings, and provide thorough analysis.
toolsets:
- type: think
- type: memory
path: ./research.db
- type: mcp
ref: docker:duckduckgoメモDocker MCP Tools
The
ref: docker:duckduckgosyntax runs the DuckDuckGo MCP server in a Docker container. This is the recommended way to use MCP tools — secure, isolated, and easy to configure. Requires Docker Desktop.
What's Next?
- Understand Agents — learn how agents work and what you can configure.
- Multi-Agent Systems — build teams of collaborating agents.
- Configuration Reference — full reference for all YAML and HCL options.
- Troubleshooting — something not working? Debug tips and common fixes.