hiw3c 日报精选
Simon Willison 网页快照

编码智能体外部沙箱

原文标题 · External sandboxes for coding agents

编码智能体外部沙箱:我一直在探索用于沙箱化由智能体执行的代码的新方法,重点在于使尝试本地模型变得更加安全,无需担心错误或提示注入攻击会导致它们在机器上采取破坏性操作。我与Prime Radiant合作完成了该项目,Prime Radiant是Superpowers及其他项目背后的AI研究实验室。我在Prime Radiant博客上的文章介绍了外部沙箱模式,即由智能体执行的代码在专用沙箱中运行,而智

来源:Simon Willison · simonwillison.net

正文为英文,可一键机器翻译(仅首次需要等待)

Simon Willison’s Weblog

External sandboxes for coding agents . I've been exploring new ways to sandbox code that is executed by agents, with a focus on making it safer to try out local models without worrying that a mistake or prompt injection attack might cause them to take damaging actions on a machine.

I worked on this project with Prime Radiant , the AI research lab behind Superpowers and other projects .

My post on the Prime Radiant blog introduces the external sandbox pattern, where code executed by the agent runs inside a dedicated sandbox while the agent itself lives outside of that sandbox.

To demonstrate this pattern we've released three sandbox server implementations:

external-sandbox-v86 runs a Node.js server which then uses v86 to run Alpine Linux inside WebAssembly.

external-sandbox-container is a Python web server which runs the sandbox in Alpine Linux inside an Apple Containers instance.

external-sandbox-quicksand is another Python web server, this time using Microsoft's Quicksand sandboxing library, which bundles QEMU and Alpine Linux in a Python package!

Each of these implementations offers the same localhost API. You can then configure Pi, Claude Code, or Codex to send API calls to that sandbox any time they want to execute code.

The sandboxes also include an optional HTTP/HTTPS allow-list proxy, so you can control exactly which hosts your agent's code is allowed to communicate with - plus a credential replacement mechanism to make authenticated API calls without sharing a secret with the agent. Here's the UI you can use to reconfigure that proxy while the sandbox is still running:

I continue to be fascinated by the challenge of safely running untrusted code. This external sandbox pattern provides a neat way to experiment with different approaches.

Recent articles

Running the full server-side Datasette Python app in the browser with service workers and Pyodide - 17th November 2026

Locating the source of a mysterious beep with Claude - 9th November 2026

Hide your slop PR descriptions behind <details><summary> - 9th November 2026

Qwen 3.8 27B on my laptop can interpret model weights, too - 3rd November 2026

This is a link post by Simon Willison, posted on 17th November 2026 .

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.