Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/madarco/agentbox/claude-mdgit clone --depth 1 https://github.com/madarco/agentboxWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.05711 | $0.05711 |
| Opus 5 | $0.02856 | $0.02856 |
| Sonnet 5 | $0.01142 | $0.01142 |
| Haiku 4.5 | $0.00571 | $0.00571 |
Grade B, and why
agentbox CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **vercel** (cloud): one Vercel Sandbox (Firecracker microVM, Amazon Linux 2023) per box. Workspace seeded the same way (git bundle + stash + untracked tar). Boots from a Vercel snapshot baked once by `agentbox prepare Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- For hetzner-cloud work: the base-snapshot id is recorded at `~/.agentbox/hetzner-prepared.json` (written by `agentbox prepare --provider hetzner`); per-box SSH keys live under `~/.agentbox/boxes/<sandboxId>/ssh/` (priv How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentBox — context for Claude Code
agentbox is an npm CLI that spins up isolated sandboxes ("boxes") for coding agents (Claude Code, Codex, others) to work in, so they can't touch the host. Seven backends share one provider abstraction: Docker (the default — one local container per box, isolated by per-box git branch in an in-container worktree against the bind-mounted host .git/), Daytona Cloud (--provider daytona — a managed remote sandbox seeded from a host git bundle + per-agent credential volumes, reached via SSH-token attach and an in-sandbox bridge relay), Hetzner Cloud (--provider hetzner — a bare VPS per box, pure OpenSSH ControlMaster comms, locked-down Hetzner Cloud Firewall, baked from a one-time agentbox prepare --provider hetzner snapshot), Vercel Sandbox (--provider vercel — a Firecracker microVM per box, persistent snapshots, public HTTPS preview URLs; nested containers (in-box docker) now supported and baked in, no SSH, baked from a one-time agentbox prepare --provider vercel snapshot), E2B Sandbox (--provider e2b — a Firecracker microVM per box, SDK-only comms, public HTTPS preview URLs, persistent pause/resume; uniquely among the cloud providers, E2B builds its base template directly from a Dockerfile via Template.build() — agentbox prepare --provider e2b runs the build), and Remote Docker (--provider remote-docker, spelled agentbox docker:<host> … — one container per box on a machine the user already owns, reached over an OpenSSH ControlMaster and driving that machine's docker engine. Cloud-shaped despite being docker: a bind mount can't cross a network, so the workspace is synced (git clone + carried-over stash/untracked) exactly as for the clouds, while the image (Dockerfile), checkpoints (docker commit) and DinD stay docker-shaped. No credential — it connects as you, over your own ~/.ssh/config).
Architecture overview
- Boxes — one isolated sandbox per agent run. The shape differs by provider but the abstraction is one
Providerinterface (packages/core/src/provider.ts):- docker: container
agentbox-<id|name>;/workspaceis the in-container git worktree on branchagentbox/<box-name>; host's.git/is bind-mounted RW so commits land on the host immediately. Boxes pause/unpause for cheap context switching and survive stop/start;destroywipes the container + per-box volumes. The base image (agentbox/box:dev) is pulled from GHCR on first use (tagged by build-context fingerprint, seepullOrBuild/registryRefForShainimage.ts) and only built locally on a pull miss;--build/box.imageRegistry=""force a local build. Seedocs/development.md→ "Image: pull vs rebuild". - daytona (cloud): Daytona sandbox with
/workspaceseeded from a hostgit bundle create(incl. stash + untracked carry-over for the user's local state). Lifecycle goes through the Daytona SDK; agent credentials (~/.claude,~/.codex,~/.config/opencode) live in shared per-org volumes seeded from the host. Host↔box comms go through a per-box bridge URL (CloudFront preview) that the host relay'sCloudBoxPollerlong-polls. - hetzner (cloud): one Hetzner VPS per box (default
cx23/nbg1). Workspace seeded the same way (git bundle + stash + untracked tar). Per-box ed25519 SSH key minted on the host into~/.agentbox/boxes/<sandboxId>/ssh/and injected via cloud-init. Per-box Hetzner Cloud Firewall auto-locked to the host's egress IP (multi-probe fail-loud). All comms (exec, scp, port forwards, attach) flow over one persistentssh -fNT -MControlMaster per box;previewUrl(port)mintsssh -O forwardon demand. No agent credentials volume — credentials pushed via scp at create time (Hetzner has no shared-volume primitive).agentbox prepare --provider hetznerbakes a one-time base snapshot since Hetzner can't build images from a Dockerfile. - vercel (cloud): one Vercel Sandbox (Firecracker microVM, Amazon Linux 2023) per box. Workspace seeded the same way (git bundle + stash + untracked tar). Boots from a Vercel snapshot baked once by
agentbox prepare --provider vercel(no Dockerfile build). Persistent sandboxes auto-snapshot on stop and auto-resume onSandbox.get({ resume: true })→ pause/resume for free. Comms via the SDK:execruns asvscode(root →sudo -u vscode);previewUrl(port)returns the publicsandbox.domain(port)(HTTPS, no token), so the host relay'sCloudBoxPollerreaches the in-box bridge directly. In-box docker (DinD) is baked into the base snapshot anddockerdis auto-started on create/resume (launchDockerd:true, via the sharedagentbox-dockerd-start) — Vercel Sandbox now supports nested containers. No SSH (attach is a customattach-helper.jstmux bridge over the SDK). Max 4 exposed ports, regioniad1only. - e2b (cloud): one E2B Sandbox (Firecracker microVM, Debian 12) per box. Workspace seeded the same way (git bundle + stash + untracked tar). Key differentiator from Vercel/Hetzner: E2B builds its base image directly from a Dockerfile via the SDK's
Template.build()—agentbox prepare --provider e2bdrives the build and pins the resulting template id tobox.imageE2b.Sandbox.pause/Sandbox.connect(auto-resume) gives free pause/resume;Sandbox.createSnapshotis the reusable, id-addressed checkpoint primitive (same shape as Vercel). Comms via the SDK:execruns asvscode;previewUrl(port)returns the public{port}-{sandboxId}.e2b.appURL (HTTPS, no token; constructed locally so it doesn't wake a paused sandbox). In-box docker (DinD) is baked into the base template anddockerdauto-starts on create/resume (launchDockerd:true) — E2B microVMs support nested containers (full root + cap_sys_admin, verified 2026-06-23), contrary to the original "same as Vercel" assumption. No SSH — attach is a customattach-helper.cjsSDK-streaming PTY bridge overpty.create. 1-hour platform session cap on the Hobby tier (the attach helper caps at 55 minutes for headroom).
- docker: container
- In-box supervisor (
@agentbox/ctl) — reads/workspace/agentbox.yamland runs the declared tasks/services under a DAG scheduler. Ships asagentbox-ctlinside every box (docker, daytona, hetzner, vercel, e2b). - Host relay (
@agentbox/relay) — a host node process boxes call for things they have no credentials for (git push, checkpoint capture,cp/download) and to push status events. Keeps SSH keys out of the box. The cloud path drives the same relay viaCloudBoxPoller+executeCloudAction. - Checkpoints —
docker commit(+ periodicFROM scratchflatten) for docker; Daytona snapshots (sb._experimental_createSnapshot) for daytona; Hetznercreate_imagesnapshots (no-pause default — matchesdocker commit) for hetzner; Vercelsb.snapshot()(id-addressed; stores the snapshot id in the cloud-checkpoint manifest) for vercel; E2BSandbox.createSnapshot(id-addressed template, same shape as Vercel) for e2b. All flow throughprovider.checkpoint.create.box.defaultCheckpointis the cross-provider fallback;box.defaultCheckpointDocker/box.defaultCheckpointDaytona/box.defaultCheckpointHetzner/box.defaultCheckpointVercel/box.defaultCheckpointE2boverride per provider. - The full design — file-handling rationale, the checkpoint model, pause/resume strategy, what we explicitly rejected — lives in
docs/architecture.mdanddocs/create-and-checkpoints.md. Each cloud provider's shape and its known caveats live indocs/cloud-providers.md. Read them before making non-trivial changes to the lifecycle code.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 129 lines · 5,711 tokens per session scan B c1a9b667be9c
agentbox CLAUDE.md is an instructions file published in the GitHub repository madarco/agentbox (378 stars, last pushed 3d ago), licensed MIT. It adds 5,711 tokens to every session, about $0.0286 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
microsandbox AGENTS.md
AGENTS.md instructions for superradcompany/microsandbox, covering agents.md, scope, project map, design principles and backward compatibility review.
sandboxd AGENTS.md
Instructions for tastyeffectco/sandboxd, covering agents.md — operating sandboxd, what this is, prerequisites, install and core api.
MultiGen CLAUDE.md
Instructions for lingyuanli/MultiGen, covering claude.md, architecture, development commands, full stack (docker) and api (local).
docker-nixuser AGENTS.md
Instructions for grigio/docker-nixuser, covering development guide, ci publishing (critical), multi-platform ci builds, flake auto-update and docker image.
agent-box AGENTS.md
Instructions for 0xferrous/agent-box, covering pre commit, image, returns: /nix/store/ -source, wrappers and portal adr.
anvil AGENTS.md
AGENTS.md instructions for tools-for-agents/anvil, covering agents.md — anvil, setup, the rules this repo is built on, tests and ci.