Your metal. Machines on demand.
VM sandboxes for your AI agents, on hardware you own. Each agent gets its own kernel, only the network you grant it, and secrets it can use but never read. Idle ones sleep and wake on the next request. Linux or macOS (Apple Silicon), open source.
curl -fsSL bhatti.sh/install | sudo bash Real machines. Zero waste.
Real VMs. Locked down by default.
Every machine runs its own Linux kernel, with its own filesystem and process space. It starts with no network at all: you grant each one the internet, a list of hosts, or nothing. A secret grant gives an agent a placeholder, never the key.
Snapshot everything. Fork anything.
Memory snapshots capture RAM, running processes, the root disk, attached-volume copies and network policy. Filesystem snapshots save only the root disk. Fork a running machine into an independent copy in about 150 ms, or export a snapshot and import it on another box.
Idle machines cost almost nothing.
Idle machines pause after 30 seconds and power off after 30 minutes, freeing their memory and keeping their disk. The next request or command wakes them, and the machine's init command brings its services back. Long agent sessions can stay hot.
| Operation | p50 |
|---|---|
| Create a machine | 160ms |
| Fork a running machine | 150ms |
| Snapshot / resume | 98ms / 49ms |
| Cold start + first command | 167ms |
| Wake on request (cold) | 380ms |
| First command after pause (warm) | 18ms |
| Run a command | 13ms |
| Destroy a machine | 66ms |
| Memory per idle 512MB machine | ~58MB |
agni-02 (Intel i9-9900K, Linux KVM), bhatti v2.5.0, p50 over the local unix socket.
Reproduce: bench/load. Release notes.
How it works
Click any component to explore.
What people use it for
One sandbox per AI agent
The original use case for bhatti. Each agent gets its own Linux VM with no network until you grant one: here, just its model API, with the key swapped in on the way out so the agent never holds it. Snapshot at any tool call so you can branch from that exact moment if the run goes sideways.
# Reaches its model API, nothing else
$ bhatti create --name agent \
--allow-host api.openai.com \
--secret-grant OPENAI_KEY@api.openai.com
sandbox/agent created (1 vCPU, 1024 MB)
# Snapshot before a risky tool call
$ bhatti snapshot create agent --name pre
checkpoint "pre" created (1024MB)
# Run goes sideways? Branch from there:
$ bhatti snapshot resume pre --name retry
# Or fork the live one:
$ bhatti create --name try-2 --from agent Preview environments per PR, free when idle
One sandbox per pull request. `bhatti publish` puts it on your domain with TLS. Idle previews pause after thirty seconds and power off after thirty minutes, keeping their disk; the next request boots them and `--init` brings the server back, about 380 ms on our test box. No rented infrastructure.
# CI spins up a preview from your image
$ bhatti create --name pr-247 --net \
--image base --init "npm start"
$ bhatti exec pr-247 -- ./deploy.sh
$ bhatti publish pr-247 -p 3000 -a pr-247
Published: https://pr-247.bhatti.sh
# Days later: powered off, no memory used
# Reviewer opens the URL: it boots
$ curl -s https://pr-247.bhatti.sh
{"build":"ok"} # wake + serve Anything you can rootfs is yours
OCI pull, Docker import, or save a running sandbox. Whatever you put in a rootfs becomes a Linux VM that snapshots, forks, and idles for almost nothing. Postgres, browser automation, full desktops — it all just works.
# Pull an OCI image as a rootfs
$ bhatti image pull ghcr.io/org/dev
pulling ghcr.io/org/dev as "dev" (task: …)
done
# Or import a local Docker image
$ bhatti image import my-app
imported "my-app" (640MB)
# Or save a running sandbox as a base
$ bhatti image save dev --name stack
saved "stack" (1024MB)
# Either way: a VM you can snapshot
$ bhatti create --name web --image stack
$ bhatti snapshot create web --name ready
checkpoint "ready" created (1024MB) Every command
Single binary. bhatti serve starts the daemon, everything else talks to its API.
Run it on your hardware.
One command. Any Linux machine with KVM, or an Apple Silicon Mac. Downloads one runtime bundle — daemon, VMM, network gateway, guest agent, kernel — and an Ubuntu 24.04 rootfs. No Docker, no containers, no orchestration layer.
Requirements
- Linux (x86_64 or ARM64) with /dev/kvm, or macOS on Apple Silicon
- Root for the installer (service + socket group)
- A domain if agents connect from elsewhere (TLS)
Runs on a Raspberry Pi 5, a Hetzner dedicated box, a cloud VM with nested virtualization, or the Mac on your desk. Built for one owner and their agents, not for renting sandboxes to strangers.
# Install on a Linux box with KVM, or a Mac
$ curl -fsSL bhatti.sh/install | sudo bash
==> Installing bhatti (server, minimal tier)
✓ bhatti, bhatti-vmm, bhatti-netd, kernel, rootfs
✓ API on a local unix socket, no open port
✓ admin API key in ~/.bhatti/config.yaml
✓ service started (systemd or launchd)
# Create a sandbox — no setup step needed
$ bhatti create --name dev
sandbox/dev created (1 vCPU, 1024 MB)
Net: none (create with --net for internet access)
Shell: bhatti shell dev
# One API key per agent, each with its own limits
$ sudo bhatti user create --name agent-1
API key: bht_3f9c...
# The agent, elsewhere, over your domain's TLS:
$ bhatti setup --url https://box.example.com \
--token bht_3f9c...
✓ authenticated (0 sandboxes) Documentation
Quickstart
Install, create your first sandbox, run something in it
→Self-Hosting
Linux or Mac, the local socket, remote access over TLS
→Run an Agent
A key per agent, scoped egress, secret grants, forks
→Network & Egress
No network by default; grant hosts, CIDRs, or the internet
→Credentials for Agents
Secrets an agent can use but never read
→Fork & Branch
Copy a running sandbox, memory and all
→CLI Reference
Every command, global flags, environment variables
→API Reference
HTTP endpoints over the unix socket or your domain
→Architecture
Daemon, VMM, gateway and guest agent: what runs where
→