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
settings 03_Presets
# Define reusable environment configurations in ~/.config/bashlet/config.toml
# Define a preset with mounts and env vars
[presets.kubectl]
mounts = [
["/usr/local/bin/kubectl", "/usr/local/bin/kubectl", true],
["~/.kube", "/home/.kube", true]
]
env_vars = [["KUBECONFIG", "/home/.kube/config"]]
setup_commands = ["kubectl version --client"]
# Use a preset
bashlet create --name k8s --preset kubectl
bashlet exec --preset kubectl "kubectl get pods"
$ Command_Reference
| Command | Description |
|---|---|
| bashlet exec "cmd" | One-shot command execution in sandbox |
| bashlet exec --preset NAME "cmd" | One-shot with preset configuration |
| bashlet create | Create a new persistent session |
| bashlet create --preset NAME | Create session with preset |
| 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 |
./SDKs
# Integrate bashlet with your AI agents using our SDKs.
# Support for multiple AI frameworks included.