Agent sandbox
An isolated environment where an AI agent runs code and commands without access to your network, secrets or real files.
An agent sandbox is an isolated environment where an AI agent runs code and commands without access to your network, secrets or real files. If the agent makes a mistake or follows an injected instruction, the damage stays inside a throwaway copy.
Coding agents and data-analysis agents execute what the model writes. In a sandbox (a container, a micro-VM or a hosted code interpreter) a wrong or injected command can only damage a throwaway copy. Good sandboxes also block outbound network traffic by default, which removes the way out from the lethal trifecta, and pass in only the files and credentials the task needs. Containers share the host’s kernel; micro-VMs isolate more strongly at some cost in startup time.
A sandbox limits what a command can touch. It does not limit what the agent may do through the tools you give it: an agent holding a production API key inside a sandbox can still delete production data, which is excessive agency. Pair the sandbox with narrow credentials from secrets management and with human in the loop approval for actions outside it. Ask any coding agent vendor where the code runs and what it can reach.
Related terms
- Lethal trifecta: An AI agent that has private data, reads untrusted content and can send data out can be tricked into leaking that data.
- Coding agent: An agent that reads a repository, edits files, runs commands and tests, and opens pull requests.
- Excessive agency: An AI agent with more tools, permissions or autonomy than its task needs, so a mistake or an injected instruction can do real damage.
- Secrets management (leaked API keys): Keeping API keys, passwords and tokens out of code and chats, in a store with access control, rotation and audit.
- Background coding agent: A coding agent that runs in the cloud on its own, takes an issue or a task and comes back later with a pull request for review.
- Computer use agent (browser agent): An AI agent that operates a browser or desktop by looking at screenshots and clicking and typing like a person.
- Human in the loop: A person approves, edits or rejects the agent’s action before it takes effect.
- Agent permission modes (YOLO mode): Settings that decide what a coding agent may do without asking, from approving every command to skipping all checks, known as YOLO mode.
- Data classification gate for agents: A check that keeps secrets, personal data and other restricted data out of what a coding agent can read, send to a model or write to logs.
- Digital twin (service virtualization): A behavioral copy of an external service, such as a payment or identity API, that agents and tests can call safely, repeatedly and at any volume.
