Skip to content
Updated Nov 26, 2026

Term · Agents and automation

Sandbox

A closed space where a program or an AI agent can work without touching the rest of the computer or going online without permission.

Also called
sandboxes · isolated environment
Category
Agents and automation

What it is

The word comes from the children's sandbox: a place to play without making a mess outside it. In computing, it's an isolated environment with its own rules: which files it can see, which websites it can connect to and what it can install.

In practice

It helps you give a GlossaryCoding agentAn AI agent that writes code: it reads a project's code, changes it, runs tests and commands, and proposes or applies the changes.More about Coding agent →, such as GlossaryClaudeAnthropic’s AI assistant and the family of models of the same name. It can chat, write, analyze documents and create artifacts, and it can take on long tasks with your files and apps.More about Claude → or GlossaryCodexOpenAI's coding agent: it writes, reviews and runs code from instructions in plain language. It's used from the terminal, the editor or ChatGPT.More about Codex →, more autonomy with less risk: if it makes a mistake or someone tricks it with a GlossaryPrompt injectionAn attack that hides instructions in a text, a web page or a document so the AI reading it obeys them and ignores its user’s orders: revealing data, changing its answer or taking actions nobody asked for.More about Prompt injection →, the damage is limited to what you let it touch. Docker Sandboxes, for example, runs each agent in a lightweight GlossaryVirtual machineA computer simulated by software inside another computer, with its own operating system and isolated from the machine that runs it.More about Virtual machine → with its own kernel.

Watch out for…

A sandbox only protects as much as its rules allow. If you open up the whole network or hand it your keys, the agent can still get data out. Start with everything locked down and open only what's needed.

Learn more at docs.docker.com (opens in a new tab)

Appears in

Actions