Simon Willison 介绍编码智能体外部沙箱模式:智能体在 Mac 上运行,代码在沙箱中执行
AI 导读
外部沙箱模式让编码智能体在本地 Mac 上运行,但智能体生成的代码在 WebAssembly、QEMU 或 Apple Container 沙箱中执行。Simon Willison 在推文中介绍这一模式,并链接到 Prime Radiant 博客的详细文章,文章为 Claude Code、Codex 和 Pi 提供了演示。架构图中,智能体把命令发到本机 localhost:8686 沙箱服务器内的 Linux 虚拟机(由 v86、Apple container 或 QEMU 运行),挂载目录(只读或读写)与用户可控的白名单代理是虚拟机仅有的对外通道,对外请求经代理放行到允许的主机。
正文 · 原文
I've been exploring new ways to sandbox code written by coding agents - here's a description of the external sandbox pattern, where agents run on your Mac but execute code in a WebAssembly or QEMU or Apple Container sandbox - with demos for Claude Code, Codex and Pi https://blog.primeradiant.com/external-sandboxes-for-coding-agents/