不要对你的文件系统为所欲为。
Go hard on agents, not on your filesystem

原始链接: https://jai.scs.stanford.edu/

## Jai:轻量级 AI 沙箱 AI 工具越来越多地访问用户系统,导致报告的文件丢失和安全漏洞。**Jai** 提供了一个简单的解决方案:一个轻量级沙箱,以限制不受信任的 AI 代理可能造成的损害。 通过单个命令 (`jai your-agent`),Jai 创建一个隔离的环境,无需 Docker 或 VM 的复杂性。您当前的工作目录仍然完全可访问,而您的主目录通过写时复制叠加(或完全隐藏)受到保护,防止对原始文件的修改。 Jai 提供三种隔离模式——休闲、严格和精简——在易用性和安全性之间取得平衡。它专为快速任务而设计,例如编码辅助或运行不熟悉的脚本,从而显著降低潜在有害 AI 操作的“爆炸半径”。 Jai 由斯坦福研究人员开发,是一款免费软件,旨在使 AI 使用更安全,*不* 替代用于高安全需求时的强大容器化技术。它朝着更安全的 AI 交互迈出的实用一步,优先考虑易用性并降低日常工作流程的风险。

相关文章

原文

This is not hypothetical.

People are already reporting lost files, emptied working trees, and wiped home directories after giving AI tools ordinary machine access.

There's a gap between giving an agent your real account and stopping everything to build a container or VM. jai fills that gap. One command, no images, no Dockerfiles — just a light-weight boundary for the workflows you're already running: quick coding help, one-off local tasks, running installer scripts you didn't write.

Your files, your rules

Use AI agents without handing over your whole account. jai gives your working directory full access and keeps the rest of your home behind a copy-on-write overlay — or hidden entirely.

Stop trusting blindly

One-line installer scripts, AI-generated shell commands, unfamiliar CLIs — stop running them against your real home directory. Drop jai in front and the worst case gets a lot smaller.

Containment shouldn't be hard

No images to build, no Dockerfiles to maintain, no 40-flag bwrap invocations. Just jai your-agent. If containment isn't easier than YOLO mode, nobody will bother.

How it works

One command. No setup required.

1

Prefix your command
jai codex, jai claude, or just jai for a shell.

2

CWD stays writable
Your working directory keeps full read/write access inside the jail.

3

Home is an overlay
Changes to your home directory are captured copy-on-write. Originals are untouched.

4

Rest is locked down
/tmp and /var/tmp are private. All other files are read-only.

Three modes

Pick the level of isolation that fits your workflow.

CasualStrictBare
Home directoryCopy-on-write overlayEmpty private homeEmpty private home
Process runs asYour userUnprivileged jai userYour user
ConfidentialityWeak — most files readableStrong — separate UIDMedium — your UID, but home hidden
IntegrityOverlay protects originalsFull isolationFull isolation
NFS home supportYesNoYes

Free software, not a funnel

jai is free software, brought to you by the Stanford Secure Computer Systems research group and the Future of Digital Currency Initiative. The goal is to get people using AI more safely.

Versus the alternatives

jai is not trying to replace containers. It fills a different niche.

Docker

Great for reproducible, image-based environments. Heavier to set up for ad-hoc sandboxing of host tools. No overlay-on-home workflow.

bubblewrap

Powerful namespace sandbox. Requires explicitly assembling the filesystem view — often turns into a long wrapper script, which is the friction jai removes.

chroot

Not a security mechanism. No mount isolation, no PID namespace, no credential separation. Linux documents it as not intended for sandboxing.

jai is not a promise of perfect safety.

jai is a casual sandbox — it reduces the blast radius, but does not eliminate all the ways AI agents can harm you or your system. Casual mode does not protect confidentiality. Even strict mode is not equivalent to a hardened container runtime or VM. When you need strong multi-tenant isolation or defense against a determined adversary, use a proper container or virtual machine. Read the full security model →

联系我们 contact @ memedata.com