Tools

Tools give agents the ability to interact with the world — read files, run commands, search the web, query databases, and more.

How Tools Work

When an agent needs to perform an action, it makes a tool call. The docker-agent runtime executes the tool and returns the result to the agent, which can then use it to continue its work.

  1. Agent receives a user message
  2. Agent decides it needs to use a tool (e.g., read a file)
  3. docker-agent executes the tool and returns the result
  4. Agent incorporates the result and responds
ℹ️ Tool Confirmation

By default, docker-agent asks for user confirmation before executing tools that have side effects (shell commands, file writes). Use --yolo to auto-approve all tool calls.

Built-in Tools

docker-agent ships with several built-in tools that require no external dependencies. Each is enabled by adding its type to the agent’s toolsets list:

Tool Description
Filesystem Read, write, list, search, and navigate files and directories
Shell Execute synchronous and background shell commands
Think Step-by-step reasoning scratchpad for planning and decision-making
Todo Task list management for complex multi-step workflows
Tasks Persistent task database shared across sessions
Memory Persistent key-value storage backed by SQLite
Fetch Read content from HTTP/HTTPS URLs (GET only)
Script Define custom shell scripts as named tools
LSP Connect to Language Server Protocol servers for code intelligence
API Create custom tools that call HTTP APIs without writing code
OpenAPI Generate tools from an OpenAPI 3.x document
RAG Retrieval-augmented generation over indexed sources
Model Picker Let the agent pick between several models per turn
User Prompt Ask users questions and collect interactive input
Transfer Task Delegate tasks to sub-agents (auto-enabled with sub_agents)
Background Agents Dispatch work to sub-agents concurrently
Handoff Hand the conversation off to another local agent in the same config (auto-enabled with handoffs:)
A2A Connect to remote agents via the Agent-to-Agent protocol

MCP Tools

docker-agent supports the Model Context Protocol (MCP) for extending agents with external tools. There are three ways to connect MCP tools:

toolsets:
  - type: mcp
    ref: docker:duckduckgo

See Tool Config for full MCP configuration reference.

💡 See also

For full configuration reference, see Tool Config. For RAG (document retrieval), see RAG.