Sandboxed
Bash
Execution
// Secure sandbox for AI agents.
// Execute shell commands safely.
// Multiple backends available.
[INFO] Setting up isolation...
[SUCCESS] Session 'demo' created
println!("Hello, world!");
}
[EXIT] Session terminated. Clean exit.
./Why_You_Need_A_Sandbox
# Let AI agents execute shell commands safely.
# Isolate untrusted code from your system.
echo "Give your AI agent safe access to the shell." >> manifesto.txt
01_Filesystem
> Mount local directories
> Control access paths
> Read-only or read-write
02_Isolation
> Run untrusted scripts
> Test in isolation
> No host system access
03_Tooling
> Access standard CLI tools
> git, npm, pip
> Full shell capabilities
ROOT_ACCESS_CONTROL
// Robust runtime environment designed for unpredictability.
// Architecture Diagram follows:
Secure Isolation
Every session runs in a sandboxed environment.
Choose from multiple backends: WASM, Firecracker.
Host isolation: ENABLED.
Dir Mounting
> Expose only needed dirs
> Mount at specific paths
> Everything else blocked
Sessions
> Persistent config
> Multi-step workflows
> State preserved
Full Debuggability
The entire execution path remains visible.
See commands, file access, and output. No black boxes.
./Usage
# Simple CLI for AI agents to run one-shot commands and persistent sessions.
bolt 01_One-Shot_Execution
# Run a single command in an isolated sandbox.
# Basic command
bashlet exec "echo hello world"
# With mounted directory
bashlet exec --mount ./src:/workspace "ls /workspace"
# With environment variables
bashlet exec --env MESSAGE="Hello" "echo \$MESSAGE"
history 02_Session_Management
# Create persistent sandbox sessions that maintain configuration.
# Create a session
bashlet create --name my-session --mount ./src:/workspace
# Run commands in the session
bashlet run my-session "ls /workspace"
bashlet run my-session "cat /workspace/README.md"
# Or create and run in one step (idempotent)
bashlet run dev -C --mount ./src:/workspace "ls /workspace"
# List active sessions
bashlet list
# Terminate when done
bashlet terminate my-session
$ Command_Reference
| Command | Description |
|---|---|
| bashlet exec "cmd" | One-shot command execution in sandbox |
| bashlet create | Create a new persistent session |
| bashlet run SESSION "cmd" | Run command in an existing session |
| bashlet run SESSION -C "cmd" | Run command, creating session if missing |
| bashlet list | List all active sessions |
| bashlet terminate SESSION | Terminate a session |