BVisor – An Embedded Bash Sandbox, 2ms Boot, Written in Zig
gVisor-inspired—2ms userspace sandbox beats containers for ephemeral agent tasks.
Sandboxed bash for agents. Track changes on every command.
Returns exact filesystem diffs per command, solving the silent-failure problem in agent loops.
AI agent developers and LLM infrastructure engineers
E2B · Daytona · Google Sandbox
I ended up building this TypeScript-based sandboxed Bash. If we compare it to other alternatives, it is divided into two layers:
- The core, with all the Bash commands and the operator logic.
- The runtime, a pluggable part that manages code execution in the sandbox. There's a Wasm runtime available based on a Rust runtime I launched a few months ago. [1]
In practice, the core calls the runtime to execute code and get back structured information from the sandbox, including exact filesystem changes (what was created, modified or deleted) and direct feedback in stdout.
I added commonly used commands, including `python3 -c` and `node -e`, but if you find an edge case where the current commands aren't enough, let me know.
GitHub: https://github.com/capsulerun/bash
--
gVisor-inspired—2ms userspace sandbox beats containers for ephemeral agent tasks.
Roll back any agent run like a Git commit with a single command.
Cap-std sandboxing with no-bash design is a coherent security story for agents.
Kernel-enforced agent sandboxing that blocks .env access without container overhead.
Domain-allowlist network sandbox for any process—no VM, native Landlock and overlayfs.
End-to-end TypeScript typing for agents when Vercel AI SDK already handles this well.