hermitbox

mcp
Security Audit
Warn
Health Warn
  • License — License: AGPL-3.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Sandboxes for agents and code on Linux hosts you own. One command to install, runs without root.

README.md

Hermitbox: sandboxes for your agents and your code, on Linux machines you own

Sandboxes for your agents, on your machines.

Website · Docs · Use with your agent · Isolation tiers · Licence

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. The box your agent works
in is a box you can step into: open its shell, its preview URL or its desktop.

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

Install

curl -fsSL https://hbx.sh | sh

Linux (x86_64 or aarch64), as your own user, with no root and no Docker. It installs Hermitbox,
starts it, and saves credentials for the CLI, hermitbox mcp and the SDKs. Try it:

~/.local/bin/hermitbox run -- echo hello

Connect your agent

Paste this into any agent that can run commands on your machine. It installs Hermitbox, connects
itself and proves it works:

Install Hermitbox on this machine and connect yourself to it.
Run `curl -fsSL https://hbx.sh | sh` as my ordinary user, never with sudo.
Then add `hermitbox mcp` to your MCP settings by its absolute path (~/.local/bin/hermitbox).
It reads the credentials the installer saved, so never copy a key into a config file or this chat.
For anything else, follow https://docs.hermitbox.dev/llms.txt.
Prove it works: create a sandbox, run `echo hello` in it, show me the output, then delete it.

Or add it to your agent:

Add to Claude Add to Cursor Add to VS Code Add to Codex

Quickstart

Create a sandbox, run a command in it and delete it. Install the TypeScript SDK from npm:

npm install hermitbox
import { Hermitbox } from 'hermitbox'

const hb = new Hermitbox()
const box = await hb.sandbox()
console.log((await box.run('echo hello')).stdout.trim())
await box.delete()

On the machine you installed on, new Hermitbox() connects by itself. Elsewhere, set
HERMITBOX_API_URL and HERMITBOX_API_KEY.

Python
pip install hermitbox
from hermitbox import Hermitbox

with Hermitbox() as hb:
    box = hb.sandbox()
    print(box.run('echo hello').stdout.strip())
    box.delete()
Rust
cargo add hermitbox tokio --features tokio/macros,tokio/rt-multi-thread
use hermitbox::Hermitbox;

#[tokio::main]
async fn main() -> hermitbox::Result<()> {
    let hb = Hermitbox::new()?;
    let sandbox = hb.sandbox().await?;
    println!("{}", sandbox.run("echo hello").await?.stdout.trim());
    sandbox.delete().await?;
    Ok(())
}

TypeScript SDK · Python SDK · Rust SDK

What runs in a box

  • Coding agents: run Codex or another coding agent inside a box instead of on your laptop,
    with the strongest isolation the host offers (hermitbox create codex).
  • Code interpreter: a Python kernel that stays warm between calls (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 (hermitbox template from <repo>).
  • Previews: publish a port and get a URL for it (box.expose(port)).
  • Code you didn't write: a pull request, a customer's script, an agent's output, isolated up to
    a VM with its own kernel (--isolation vm).

What a box can do

Run commands

// A string runs through sh -c.
await box.run('ls -la /data')

// An array runs the program directly.
const result = await box.run(['ls', '-la', '/data'])
console.log(result.code) // 0

Keep files

// Files under /data stay with the box.
await box.write('notes.txt', 'remember this')

const notes = await box.read('notes.txt')
console.log(notes) // remember this

Open a port

// Publish port 3000 and get a URL for it.
const url = await box.expose(3000)

Snapshot and fork

// Save the box as it is.
const snapshot = await box.snapshot()

// Start a copy from that point.
const copy = await snapshot.fork()

Browsers, desktops, Git and more

A box can also run a browser you drive over CDP and an X11 desktop you watch over noVNC. It has
Git, shells, webhooks and events too. See native tools and
the SDK reference.

Lifecycle

Every sandbox moves through six states. Sleep stops a box's compute and keeps its files; a
suspended wake measured 27.56 ms at p50 in the
budget checks.

Sandbox states: running, starting, sleeping, resting, stopped, failed

// Sleep: compute stops, the data stays.
await box.sleep()

// Wake it yourself, or let the next command or connection wake it.
await box.wake()

Isolation tiers

Tier Runs Needs
process Native commands as your user Linux with Landlock ABI 3 (6.2 or later)
wasm agentOS registry packages x86_64
container Images Docker or Podman
gvisor Images, under gVisor Docker with gVisor's runsc
vm amd64 images with their own kernel x86_64 with KVM

Ask for a tier and you get it, or a refusal that says what the host is missing. Process and
container sandboxes share the host's kernel; for a kernel of its own, ask for vm. See the
tier comparison and VM requirements.

A container needs Docker or Podman on the host, or a server install:

import { Hermitbox } from 'hermitbox'

const hb = new Hermitbox()

// Ask for a container from an image.
const box = await hb.sandbox({
  isolation: 'container',
  image: 'alpine:3.22',
})

// Run a command directly without a shell.
const result = await box.run(['cat', '/etc/alpine-release'])
console.log(result.stdout.trimEnd()) // 3.22.x

// Delete it when you're done.
await box.delete()

On a server

With root and a domain, the installer sets up a Linux server with an HTTPS address for its API.
Point the domain's DNS A record at the server and allow TCP 443; the installer gets a TLS
certificate for the API and renews it.

curl -fsSL https://hbx.sh | sudo HERMITBOX_DOMAIN=sandboxes.example.com sh

Installation covers presets and fleets. Operations covers
TLS, upgrades and recovery.

Documentation · Architecture ·
HTTP API · Contributing

Hermitbox is open source under AGPL-3.0-only. The SDKs, integrations, Action and
stack templates are Apache-2.0.
Protocol format history.

Earlier releases, published as pryx and blocklyd, keep the licences they shipped under.

Reviews (0)

No results found