Sandbox mode runs the entire agent inside a Docker container instead of directly on the host system. All tool operations — shell commands, file reads and writes, network access — happen inside the container, limiting the potential impact of unintended or malicious actions.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.
Sandbox mode requires Docker to be installed and running on the host system.
Enabling sandbox mode
Pass the--sandbox flag when running an agent:
Write your agent config
A normal agent config. No special configuration is needed to support sandboxing:
agent.yaml
How it works
Workspace mount
The current working directory is mounted into the container, giving the agent access to your project files.
Isolated execution
All tool operations (shell commands, file edits, network requests) execute inside the container, not on the host.
Shebang shorthand
Add a shebang line to your config file to make it directly executable with sandbox mode:sandbox_agent.yaml