Docker の検索・質問

Quick Start

Get up and running with Docker Agent in under 5 minutes. Pick whichever path suits you best.

マークダウン参照

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 run

This 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:tag

Option 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 15

The 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.yaml

Option 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: think

This 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.hcl using 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 --yolo to auto-approve all tool calls: docker agent run agent.yaml --yolo

Take the Interactive Tour

Prefer to learn by doing? Run:

$ docker agent getting-started

This 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:duckduckgo syntax 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?