Sandbox
An isolated execution environment where AI-generated code or agent actions can run without affecting the host system.
In plain English
A sandbox is a contained environment — usually a short-lived Docker container or VM — where an AI model can run code, browse the web, or execute commands without touching the user's actual machine or sensitive systems. It's the safety primitive that makes coding agents and computer-use agents deployable.
What sandboxes protect against:
- Destructive commands —
rm -rf /only deletes the sandbox - Data exfiltration — outbound network limited or proxied
- Resource exhaustion — CPU, memory, disk capped
- Persistence — sandbox dies after the session
Common providers:
- E2B, Modal, Daytona, Browserbase — managed sandboxes-as-a-service
- OpenAI Code Interpreter — built-in sandbox for ChatGPT
- Anthropic Claude analysis tool — built-in sandbox for Claude
- Local options — Docker, Firecracker microVMs, Bubblewrap
What still leaks: Even sandboxed agents can be social-engineered into emailing data out, posting credentials to chat, or persisting state in third-party services. Sandboxes are a strong primitive but not a complete defence.