Skip to content
AI Learning Ground Start learning

News ·

External sandboxes for coding agents

Simon Willison and Prime Radiant released three open sandbox server implementations that let coding agents execute code in isolated environments, reducing risk from mistakes or prompt injection attacks.

External sandboxes for coding agents
Image: Simon Willison

Simon Willison, working with Prime Radiant (the AI research lab behind Superpowers), published a post introducing the external sandbox pattern: code an agent runs executes inside a dedicated sandbox, while the agent itself lives outside it. The goal is to make it safer to try local models without worrying that a mistake or prompt injection attack could damage the host machine.

Three sandbox server implementations were released, all exposing the same localhost API. external-sandbox-v86 uses v86 to run Alpine Linux inside WebAssembly from a Node.js server. external-sandbox-container is a Python web server running Alpine Linux in an Apple Containers instance. external-sandbox-quicksand is a Python web server using Microsoft's Quicksand library, which bundles QEMU and Alpine Linux in a Python package. Pi, Claude Code, or Codex can be configured to send code execution calls to any of them.

The sandboxes include an optional HTTP/HTTPS allow-list proxy so developers control exactly which hosts the agent's code can reach, plus a credential replacement mechanism that makes authenticated API calls without exposing secrets to the agent. A UI allows reconfiguring the proxy while the sandbox is running. For anyone building with AI agents, this offers a practical way to isolate untrusted code execution and experiment with different sandboxing approaches while keeping model-driven damage contained.

References

Read the full story at Simon Willison ↗Like, save or discuss on Buzz

#tooling #prompting