Infra & cost

Sandbox

An isolated execution environment where AI-generated code or agent actions can run without affecting the host system.

01 ——

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 commandsrm -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.

02 ——

Related terms

Back to glossaryLast reviewed May 2026
Vol. 4 · Issue 19 · Last reviewed 2026-05-30

Sign up for our newsletter

Receive weekly updates so you can stay up-to-date with the world of AI