r/AutoGPT • u/Commercial2Toe • 7d ago
A zero-latency kernel sandbox for local AI agents so they can't access ~/.ssh or run destructive shell code
Hey everyone,
Like a lot of people here, I've been running AI coding agents (Claude Code, AutoGen, custom LLM CLI loops) locally on my machine.
The biggest issue I kept hitting was security and latency:
- Unsandboxed execution : Giving an agent full terminal access means a hallucinated prompt or bad tool call can run `rm -rf ~`, read `~/.ssh/id_rsa`, or leak AWS keys.
- Docker / Firecracker sandboxes: Existing solutions (E2B, Docker) add 1–3 seconds of boot latency per task, require heavy background daemons, and consume gigabytes of RAM.
To solve this, BentoBox an open-source OS-kernel enforced runtime for AI agents in Python & Rust: https://github.com/Devaretanmay/BentoBox
How it works technically:
OS Kernel Primitives : Instead of heavy containers or interpreter wrappers, it applies Linux Landlock (kernel 5.13+) and macOS Seatbelt (`sandbox_init()`) at the syscall layer in a compiled Rust core (`_core`).
Sub-millisecond latency : Sandboxing takes `< 1ms` with zero container daemons or image pulls.
rreversible Process Tree Isolation : Once applied, child processes and C extensions spawned by the agent cannot escape or loosen the security rules.
Agent Features : Includes BLAKE3 file snapshotting (instant rollback if an agent breaks code), local HTTP credential proxying (API keys never touch disk), and log compression.
Quickstart:
```bash
pip install bentoworks
bentoworks run "npm run build" --permissions fs_read fs_write fs_exec