The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Sandbox VM harness for Claude Code and Codex
AgentBox creates isolated boxes for agent-led work, then launches tools like Claude Code and Codex inside them. It handles local Docker and several cloud backends, and gives you attachable sessions, browser access, checkpoints, and workspace sync.
Builders who want their coding agents to run in isolated VMs with shared project setup and reusable state.
You can run several agents in parallel without mixing their work with your host machine.
What it does
Create and launch boxes
`agentbox create` starts a new sandboxed box, and `agentbox claude` launches Claude Code in a detachable tmux session.
Local and cloud backends
It supports local Docker plus providers like Hetzner, Daytona, Vercel, E2B, DigitalOcean, and remote Docker hosts.
Session access and control
You can attach, open a shell, view logs, check status, and manage lifecycle actions like start, stop, pause, and destroy.
Browser, screen, and editor access
It can open a box URL, VNC screen, or VS Code/Cursor connection so you can work inside the sandbox visually.
Checkpoints and persistence
It can capture checkpoints, start new boxes from them quickly, and preserve upper volumes across stops.
Provider plugin support
The provider surface is extensible through plugins built on `@madarco/agentbox-provider-sdk`.
How to get it
- 1Run
npm -g install @madarco/agentbox
README
AgentBoxΒ
Run multiple agents in parallel, with a single command, on your PC, self-hosted, or in the cloud
Works with iterm2 - cmux - tmux - Herdr

How it works
agentbox claude # launch a new VM with claude and your project inside
- π¦ Teleport - Move your project to a dedicated VM, local or in the cloud, with a single command.
- π€ Automatic - Bring all your skills, plugins, and settings for Claude Code, Codex, Open Code
- π A full Computer β Dedicated browser, screen sharing, persistent shells and warmed up VS Code / Cursor IDE, with each box.
- πΎ Checkpoints β Sub <1s startup of new boxes from a previous checkpoint, auto pause to save cost/resources when not in use.
- π Safe - Your git credentials are kept on your local machine, with permission requests to push to the remote repository.
Full Documentation
Complete setup:
npm -g install @madarco/agentbox
agentbox install
# Launch a new VM with claude, copy all your settings and workspace
agentbox claude
# Also install required project libraries and launch your dev server
> Run setup wizard? -> Yes
# Also use a cloud:
agentbox hetzner claude # or vercel, daytona
# Ctrl+aΒ d to detach, claude keep going, to reconnect later:
agentbox attach 1
# To open a persistent shell inside the box:
agentbox shell 1
# Create a second box:
agentbox claude
agentbox attach 2
agentbox shell 2
# Open your web project on a .local url tunnel on your pc
agentbox url 2
# Or the in-box browser via webVNC:
agentbox screen 2
# Or connect to vscode/cursor inside the box:
agentbox code 2
# See status and quickly switch between agents:
agentbox dashboard
Demo

Install
npm -g install @madarco/agentbox
Want to help test what's coming? npm -g install @madarco/agentbox@nightly puts you on the
nightly channel β pre-release builds, with stable releases still
reaching you automatically. agentbox self-update --channel stable opts back out.
Requirements: macOS (arm64 or Intel) or Linux, Docker (Docker Desktop or OrbStack), Node >=20.10. The first agentbox create / agentbox claude builds the agentbox/box:dev image (~1 GB, one-time).
Uses portless to give box web apps the same URL from inside the box and on the host.
Cloud Providers
| local docker | remote docker | hetzner | daytona | vercel | e2b | |
|---|---|---|---|---|---|---|
| Support | β | β | β | β οΈ Partial | β | β |
| Base image | Dockerfile | Dockerfile (on the remote) | Setup script (Ubuntu) | Dockerfile | Setup script | Dockerfile (Template.build) |
| Live snapshots | β | β
(docker commit) | β | π§ͺ Experimental | β | β |
| Private preview URLs | β (portless or OrbStack) | β (portless over SSH) | β (portless) | β (native) | β (native) | β (native) |
Cloud setup (optional β skip for local Docker)
agentbox installβ interactive setup wizard to choose which providers to use and configure them.agentbox vercel loginβ interactive Vercel Sandbox token setup, saved to~/.agentbox/secrets.envagentbox hetzner loginβ interactive Hetzner Cloud token setup, saved to~/.agentbox/secrets.envagentbox daytona loginβ interactive Daytona API key setup, saved to~/.agentbox/secrets.envagentbox e2b loginβ interactive E2B API key setup, saved to~/.agentbox/secrets.envagentbox digitalocean loginβ interactive DigitalOcean Personal Access Token setup, saved to~/.agentbox/secrets.envagentbox remote-docker doctor <host>β run boxes on a machine you already own, over SSH. No login and no token: it connects as you, using your own~/.ssh/config. Thenagentbox docker:<host> claude.agentbox prepare [--provider daytona|hetzner|vercel|e2b|digitalocean|docker:<host>]β build the image and initial snapshot (e2b builds from a Dockerfile viaTemplate.build())agentbox hetzner claude,agentbox hetzner codex,agentbox hetzner create, etc.
How to use
<box> is optional almost everywhere β it defaults to the box for the current project, or use its short index (1, 2, β¦), name, or id prefix.
Create & run
agentbox createβ Create and start a new agent box (Docker container with FUSE overlay)agentbox claudeβ Create a sandboxed box and launch Claude Code in a detachable tmux session
Access
agentbox urlβ Open a box's web app URL in the browser (even with noexpose:service)agentbox screenβ Open a box's VNC (noVNC) viewer in the browseragentbox codeβ Open a box in VS Code or Cursor via the Dev Containers extensionagentbox shellβ Open an interactive bash shell in a boxagentbox openβ Open a box's merged workspace in Finderagentbox logsβ Print recent log lines from a box service;-fto streamagentbox dashboardβ Box list + the selected box's live agent session
Inspect
agentbox list(ls) β List boxes in current project or-gfor allagentbox statusβ Show service + task status from a box'sagentbox-ctldaemonagentbox topβ Live resource monitor (cpu/mem/pids/disk) for a box, project, or all boxes
Lifecycle
agentbox startβ Start a stopped box (docker start + re-mount the FUSE overlay)agentbox stopβ Stop a box (preserves the upper volume,node_modulesincluded)agentbox destroy(rm) β Destroy a box and discard its upper volumeagentbox pause/agentbox unpauseβ Freeze / resume a box (sub-second)
Sync & state
agentbox downloadβ Download a box's/workspaceback into your host workspace (gitignore-aware)agentbox cp <src> [dst]β Copy individual files between host and box (likedocker cp; direction picked byname:prefix)agentbox checkpoint(aliascheckpoints) β List and manage project checkpoints (warm box state to start new boxes from); bare command lists,checkpoint createcaptures
Advanced
agentbox waitβ Block until the box reports all autostart units readyagentbox pruneβ Clean up orphan state records (and with--all, orphan docker resources)agentbox self-updateβ Update agentbox, wipe the box image so it rebuilds, reload the relayagentbox configβ Read / write layered config (global, per-project, workspacedefaults:)agentbox relayβ Manage the host relay process (status/stop/start/restart)agentbox appβ Control the macOS menu-bar app process (status/start/stop/restart); install it withagentbox install app
Run agentbox <command> --help for command-specific options.
Documentation
Full documentation lives at agent-box.sh/docs:
- Quickstart and Core concepts
- Teleport a project, Run an agent, Access your box
- Configuration, Services & tasks, Sync & git
- Cloud providers: Hetzner, Daytona, Vercel, E2B, DigitalOcean
- Full CLI reference
Development
git clone https://github.com/madarco/agentbox && cd agentbox
pnpm install && pnpm build
node apps/cli/dist/index.js --help
The full development workflow, stack, end-to-end smoke tests, and teardown live in docs/development.md.
Menu-bar tray app (dev)
The macOS tray app lives in the sibling repo ../agentbox-tray. When you have it checked out next to this repo, these scripts build and run your local dev build (ad-hoc signed, at ../agentbox-tray/AgentBoxTray.app) β separate from the notarized copy agentbox install app puts in /Applications:
pnpm tray:dev # rebuild the dev .app and relaunch it (the one you'll use most)
pnpm tray:build # just rebuild (scripts/make-app.sh)
pnpm tray:start # launch the dev build
pnpm tray:stop # quit any running instance
pnpm tray:restart # quit + relaunch the dev build
Note:
agentbox app start|restarttargets the installed/Applicationscopy, not this dev build. Use thepnpm tray:*scripts while iterating on the tray here; runagentbox install appto refresh/Applicationsfrom the current CLI build.
Custom providers (plugins)
AgentBox's provider surface is open β you can run agents on your own cloud/infra by shipping a provider plugin (its own npm package built on @madarco/agentbox-provider-sdk), with no changes to AgentBox. Build and test against the bundled example provider locally:
# build the SDK, then build + register the example provider
pnpm --filter @madarco/agentbox-provider-sdk build
cd examples/agentbox-provider-example && npm install && npm run build
node ../../apps/cli/dist/index.js plugin add . # register it
node ../../apps/cli/dist/index.js doctor # shows the provider's group
# verify the SDK artifact in isolation (packs + installs the tarball, asserts exports)
pnpm --filter @madarco/agentbox-provider-sdk pack:test
Full guide: Build a provider (and the authoring reference docs/provider-plugins.md). Reference packages: examples/agentbox-provider-sample (stub) and examples/agentbox-provider-example (a real, Vercel-backed provider).
Contributing
Bug reports, docs fixes, and provider work are welcome β see CONTRIBUTING.md. First-time contributors sign a one-line CLA on their first pull request. Security issues go through SECURITY.md, not a public issue.
Author
Marco D'Alia - @madarco - Linkedin
License
MIT. See LICENSE.
Files in the repo
- .agents
- .claude
- .claude-plugin
- .github
- apps
- docs
- examples
- packages
- plugins
- scripts
- skills
- .dockerignore
- .gitignore
- .mailmap
- .npmrc
- .prettierignore
- .prettierrc.json
- .vercelignore
- agentbox.yaml
- AGENTS.md
- build.sh
- CLAUDE.md
- CONTRIBUTING.md
- eslint.config.js
- herdr-plugin.toml
- LICENSE
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- README.md
- SECURITY.md
- tsconfig.base.json
- turbo.json
- vitest.workspace.ts
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More harnesses
from vibe coding to agentic engineering - practice makes claude perfect
π The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
Git. Ship. Done - Core

The most RAM efficient harness