# Hermitbox: Sandboxes for your agents, on your machines

> Source: <https://hermitbox.dev/>
> Published: 2026-12-06 07:49:47+00:00

**Key takeaway:** Hermitbox lets each agent run in a process or a Firecracker VM via the same call, with idle boxes waking in 220 ms and snapshots forkable per attempt.

# Sandboxes for your agents, on **your** machines

Give every agent its own computer to run code, open a browser and keep files in. Hermitbox runs them on your laptop, your server or a fleet, installed with one command.

`$curl -fsSL https://hbx.sh | sh`
Install Hermitbox and set it up for me

## Everything a **computer** does

The box your agent works in is a box you can step into: open its shell, its preview URL or its desktop.

### Coding agents

Run Codex or another coding agent inside a box instead of on your laptop. It takes the strongest isolation the host offers.

`hermitbox create codex`
### Code interpreter

A Python kernel that stays warm between calls: 1+1 in 5 ms, a chart in 156 ms.

`box.python()`
### Browser and desktop

A browser your agent drives over CDP, or a full desktop you can watch.

`hb.sandbox({ template: 'desktop' })`
### Dev environment from any repo

Point it at a Git repository and get a box with its stack ready: Node, Python, Go, Ruby, PHP, Rust, Java, .NET, a devcontainer or a Dockerfile.

`hermitbox template from <repo>`
### Previews

Publish a port and get a URL for it, to share an app while you’re building it.

`box.expose(port)`
### Code you didn’t write

A pull request, a customer’s script, an agent’s output: run it in a box isolated up to a VM with its own kernel.

`--isolation vm`
Plus streaming output, files, Git, SSH, bucket mounts, signed webhooks and idle policy, all from the SDK.

## Made for agents that **come and go**

Agents work in bursts. Hermitbox isolates each one, sleeps it between bursts and copies it when you want to try again.

### Choose the isolation

A confined process when you want speed, a Firecracker VM with its own kernel when you want a wall. Same call either way. If the host can’t give what you asked for, Hermitbox refuses and says what’s missing.

### Sleeps when idle, wakes on demand

A quiet box sleeps and keeps its files. The next command, connection or API call wakes it. A VM can keep its memory too: the same process carries on, back in 220 ms.

### Snapshot, fork, try again

Save a box at a good point, then fork independent copies from it: one per attempt, per test run or per branch.

## Your first **box**

### Install

Run `curl -fsSL https://hbx.sh | sh` as your own user. It asks no questions and needs no root.

### Ask for a box

From TypeScript (`npm install hermitbox`), Python (` pip install hermitbox`) or Rust, the CLI, the HTTP API, or your agent over MCP.

### Run, fork, throw away

Write files, run code, fork a snapshot and delete the box when you’re done.

``` js
import { Hermitbox } from 'hermitbox'

const hb = new Hermitbox()
const box = await hb.sandbox()

await box.write('solve.py', 'print(sum(range(101)))')
const { stdout } = await box.run('python3 ./solve.py')
console.log(stdout.trim()) // 5050

const snapshot = await box.snapshot()
const copy = await snapshot.fork()

await copy.delete()
await box.delete()
python
from hermitbox import Hermitbox

with Hermitbox() as hb:
    box = hb.sandbox()

    box.write('solve.py', 'print(sum(range(101)))')
    result = box.run('python3 ./solve.py')
    print(result.stdout.strip())  # 5050

    snapshot = box.snapshot()
    copy = snapshot.fork()

    copy.delete()
    box.delete()
```

## Every box in one window

For Linux, macOS and Windows. Watch every sandbox live, start new ones, open a shell or a preview, and connect your agent.

Download it from [dl.hbx.sh](https://dl.hbx.sh), with each file’s SHA-512. On a server, follow [the docs](https://docs.hermitbox.dev/).

## Your laptop today, a fleet tomorrow

Start on the machine in front of you: one command, as your own user. Give it Docker or Podman and it adds containers; give it KVM and it adds virtual machines. Add more machines and they join as one fleet. `hermitbox doctor` shows what’s on and what would turn the rest on.

Open source. The server is AGPL-3.0-only; the SDKs and integrations your code links are Apache-2.0. [Code on GitHub](https://github.com/hermitbox/hermitbox), newest release [v0.3.2](https://github.com/hermitbox/hermitbox/releases/tag/v0.3.2).

## Six verbs, **one box**

Every state change is one SDK call. Click a verb to watch it.

- `start()` Start it.
- `stop()` Stop it, keep its files.
- `sleep()` Pause it while it’s idle, keep its files.
- `wake()` Pick up where it left off.
- `rest()` Archive it and free the machine.
- `snapshot()` Save a point to fork from.

## Give your agent **a computer**

Paste one line yourself, or hand the prompt to your agent and it installs and connects itself.

`$curl -fsSL https://hbx.sh | sh`
Install Hermitbox and set it up for me
