agents-sandbox:按项目把编程智能体放进独立 microVM
开源启动器 agents-sandbox(GPL-3.0)为每个项目与智能体准备独立 microVM,由主机侧控制文件、网络与密钥可见范围,支持 Claude Code、opencode、pi 等。
把编程智能体直接跑在宿主机上,等于把读取密钥、改写系统文件与访问内网的能力一并交给模型会话。agents-sandbox(GitHub:inoio/agents-sandbox,GPL-3.0)用启动器方式,为每个项目与智能体构建或复用一台 microsandbox microVM,在尽量保留现有智能体工作流的前提下,由主机决定哪些目录、网络出口与密钥对客户机可见。
公开说明列出:内置 opencode、opencode2、pi、Claude Code 等配置档;通过类似 env.secret 的机制让真实密钥留在主机,客户机只看到占位符;工作区既可用当前项目目录,也可在支持的智能体上使用虚拟机内部 worktree。文档中的对比表,把直接宿主机执行、Bubblewrap/Seatbelt、普通容器与 microVM 方案,在隔离边界、密钥代理、文件系统与网络策略上做了并排对照。
平台说明覆盖带 KVM 的 Linux 与 Apple Silicon macOS。它并不替代应用内权限设计或代码评审,而是补上「执行环境隔离」这一层,尤其适合并行跑多个智能体、或处理含客户数据的仓库。安装步骤、硬件要求与支持矩阵以仓库 README 为准;本稿未在本机启动虚拟机实测。整理自公开帖与仓库页面。
agents-sandbox isolates coding agents in microVMs
Letting a coding agent loose on your whole machine is a trade-off you can avoid.
agents-sandbox is a launcher for running supported AI coding agents in an isolated microVM for each project and agent.
It helps you keep your existing agent workflow while deciding which host files, network access, and secrets are available to the agent.
Key features:
• Per-project microVMs – builds or reuses a dedicated microsandbox VM for each project and agent
• Built-in agent profiles – supports opencode, opencode2, pi, and Claude Code
• Host-controlled access – configure what parts of the host machine and network environment an agent can use
• Secret handling – env.secret files keep the real value on the host while the guest receives a placeholder
• Workspace options – use the current project directory or, for supported agents, an isolated VM-internal worktree session
It’s open-source (GPL-3.0 license).
Link in the reply 👇