An AI agent sandbox creates a containment boundary around code execution and tool use. It can restrict filesystem paths, network destinations, process capabilities, secrets, resource consumption, and persistent state so a mistaken or adversarial action has a limited blast radius.
A sandbox is only effective when its boundary is stronger than the agent's available escape paths. It should use defense in depth, deny unnecessary capabilities, validate inputs and outputs, isolate credentials, record activity, and fail closed when enforcement or monitoring is unavailable.
ELI5
An agent sandbox is an isolated place where an AI agent can run tools or code with limited access. It restricts which files, networks, credentials, processes, and computing resources the agent can reach, reducing the damage a mistake or malicious instruction could cause.
For example, a sandbox might let an agent edit only one project folder and block access to private keys and unrelated websites. The boundary must be enforced outside the agent itself, logged, and designed to fail safely if a required control stops working.









