Sandbox
Definition
An isolated environment that limits what an agent or its code can read, write or reach on the network, so any mistakes stay contained.
In more detail
Sandboxes range from operating-system restrictions on a command to containers and disposable virtual machines. Running agents in a sandbox means a mistake or an injection does less damage.
For coding agents the common options are the agent's own sandbox mode, a dev container or Docker container with the project mounted, and a disposable cloud VM. A good sandbox limits the file system to the project, restricts network access to an allow list and keeps long-lived credentials out. Some tools, such as MCP scanners, start the servers they inspect, which is another reason to run them inside one.
Related terms
Computer use
A model controlling a computer or browser by looking at screenshots and issuing mouse and keyboard actions, step by step, like a person would.
Least privilege
Granting an agent or tool only the permissions and data access its task requires, and nothing more, so a mistake does less damage.
Programmatic tool calling
A model using tools by writing a short program that makes several calls and filters the results, instead of one call per turn.
Dev container
A container defined by a devcontainer.json file that gives a project a reproducible environment, often used to sandbox agents.
Git worktree
An extra working directory attached to the same Git repository, with its own branch checked out, created with `git worktree add`.
Permission mode
A setting in a coding agent that decides which actions it may take on its own, such as edits or shell commands, and which need approval.
Read more about Sandbox
- AI security
Defending against prompt injection, data leakage and over-permissioned agents.
- Dev container
A container defined by a devcontainer.json file that gives a project a reproducible environment, often used to sandbox agents.
- Permission mode
A setting in a coding agent that decides which actions it may take on its own, such as edits or shell commands, and which need approval.
- E2B
Open-source cloud sandboxes for code that agents run.