Hub (Web UI)

A local dashboard for your boxes — served by the host relay at https://agentbox.localhost

The hub is a local Web UI for your boxes: a dashboard, box detail views, and a live approvals inbox, served by the host relay. It's the same @agentbox/relay core you already run, with a Next.js UI delegated onto its port — one process, no extra port opened.

agentbox hub

That starts the hub (if it isn't already running) and opens it in your browser at https://agentbox.localhost/?token=<secret>. Start it with the command, not by typing the URL — the token is what unlocks the hub, and without it the page just answers 401 AgentBox hub is locked. The first tokened visit stores the secret in a cookie (30 days) and strips it from the address, so from then on a plain https://agentbox.localhost gets you in.

Where the friendly URL comes from

https://agentbox.localhost is registered by Portless, the same proxy AgentBox uses for box web apps. Without it — on OrbStack, when Portless isn't installed, with portless.enabled: false, or whenever its proxy isn't running — the hub reports the loopback URL http://127.0.0.1:8787 instead, which works exactly the same way. The hub only ever shows the .localhost URL when a proxy is actually live, so the address it prints is one you can open. Run agentbox install portless to have that proxy start at boot.

The hub dashboard: today's figures, each box's day, live boxes and recent activity, then the box table.

What's in it

  • Dashboard — the day at a glance, then every box on this machine. Four figures head it: boxes working now (with the last 12 hours' load), agent-hours today, commits and merged pull requests today, and tokens today. Your day draws one lane per box over the last 12 hours: running and paused stretches, pushes and merged pull requests. Live now lists the running boxes, Recent activity the newest pushes, pull requests and box events, Shipped this week the commits per day, and Needs a hand the boxes in error and the subscriptions at their limit. The box table under it filters by text, status and project, and shows the boxes in one list or grouped by project. Each row has a menu with pause / resume / stop / rename / destroy, and shows what the agent is on: the session's title (when it differs from the box's task, which defaults to it), a working-on line (the tool call or step it is running, shown only while the agent is working, waiting on a permission or asking a question) and the session's tokens, with a context-fill bar; hover the figure for the input / output / cache / reasoning breakdown, and the cost when the agent records one (opencode, pi). The hub derives these from the transcripts it already collects, so they can be up to a minute behind the agent.

  • Box detail — a box's task, agent, branch, host, and timestamps, an Agent session card with each agent's working-on line and tokens (and its session title, when that is not already the heading), plus common box operations: Access (open the box's web / VNC URL, and, on a local hub running on macOS, an Apps row that opens the box in a host app — Claude, Codex, VS Code / Cursor, cmux, Herdr, iTerm2, or Finder; the same as agentbox open --in. Every button is always shown — ones that can't work right now (app not installed, sshfs missing for Finder, not supported for the box's provider, box paused) are disabled with the reason as a hover tooltip), Bot (back up the box — workspace plus the agent's state dir, identity included, shown only for an agent that has one to keep — and clone it, which deliberately does the opposite and gives the new box a fresh identity), Git (pull, push, push to the host repo only, change branch, create a new agentbox/* branch — the whole card is hidden on a box whose workspace is not a git repo, where every one of those would fail) and Services (live state of the box's agentbox.yaml services, with restart-one and restart-all). The same operations are on the REST API and the CLI (agentbox git, agentbox services, agentbox open).

  • Create box — the same form for both starting points. When the chosen project holds a bot backup, a Start from row offers it: pick one and the form drops the rows the bundle decides for you (base branch, agent, the setup wizard) and the button becomes Restore. It belongs here because a restore is the same decision as a create — which project, which provider, what to call it — with a different starting point.

  • Project detail — the project's boxes, its seed/custody status, and Bot backups: every bot this project holds a backup of, with Restore… opening that same Create box form already pointed at the backup. Only backups that captured an identity are offered; a workspace-only one would start a fresh bot, which is what clone already does.

  • Approvals — the host-action requests a box is blocked on (a destructive git push, cp, download, gh writes, host-tool calls). Approve unblocks the box; Deny returns an error to it. This is the same gate the relay prompts for in an attached terminal — surfaced in the browser so you can answer from anywhere on your machine.

  • Live updates — box states and approvals stream in over SSE; no manual refresh. A pending approval appears the moment a box requests it.

  • Create boxes — register a project folder and start a box (with a provider, an agent, and an optional task) straight from the dashboard; the live build log streams into a panel and the box appears as creating → running. Pick agent Empty — just create the box to build a box without starting an agent (like agentbox create); attach later with agentbox shell. The Provider picker offers docker plus any cloud provider set up on this host — providers you haven't configured yet show up disabled (set them up under Settings → Sandbox providers, below). The Provider and Agent pickers open on whatever that project's last box was created with — from here, the tray, or the CLI — falling back to Docker and Claude, and to Docker again when the remembered provider isn't set up on this host. Pick a Base branch to fork the box from a ref other than the project's current HEAD (like --from-branch). Under Advanced, pick a Size to give the box more CPU and RAM than the provider's default — the choices come from the provider itself (cx43 on Hetzner, 4 vCPU on Vercel, 4-8-10 on Daytona; there is no common grammar), with a Custom… option where the backend accepts free-form values. Docker has no Size row: it sizes with box.memory / box.cpus. On Daytona and E2B the size is fixed when the base image is baked, so choosing a different one rebuilds the base first — the form says so before you commit. Providers with datacenters (Hetzner, DigitalOcean, Daytona) also get a Location row. It defaults to Automatic: the configured or provider-default location, where Hetzner may move the box to another EU location when one is out of capacity. Picking a location pins the box there, and the Size list switches to the sizes that location offers (Hetzner's cx types are EU-only, so ash, hil and sin list their cpx types, the first being the location's default). The form then asks the provider's live catalog whether the chosen size (or the default one) exists in that location, and says so before you create: Hetzner's cx types are EU-only, and a Daytona base exists only in the region it was baked in. When a project has no agentbox.yaml and no default snapshot, a Run setup wizard toggle (on by default) seeds the agent's first turn to explore the repo and propose an agentbox.yaml.

  • Manage projects — register a folder as a project (a folder picker browses your machine), or create a new one from the same dialog: pick the parent folder, type a name and the hub makes the empty folder for you (optionally git init with an initial commit). That is the path for a project with no workspace yet — hosting an OpenClaw bot, say — whose files are born inside the box. Remove an empty project (0 boxes) with the Delete button on its dashboard/detail header. Deleting only unregisters the folder from the hub — its files, git repo, and checkpoints are untouched.

  • Sandbox providers (Settings) — set up a cloud provider without a terminal: paste its credentials (an API key/token — validated and saved to ~/.agentbox/secrets.env) and Bake its base image, with the build log streaming live just like a box create. Once baked, the provider flips to ready and becomes selectable in the create dialog. Docker needs no credentials (its base self-heals); the rest is the same login + prepare the CLI does, driven from the browser. Provider install

    • bake run on the host that owns Docker/SSH, so they need the local or full-host hub (not the serverless plane).

Driving it programmatically

Everything the UI does is also available over HTTP — see the REST API for launching and managing boxes from an IDE, a script, or a remote hub.

Commands

agentbox hub              # start + open in the browser (default)
agentbox hub --no-open    # start without opening a browser, just print the URL
agentbox hub start --local  # start the hub HERE even with a control box configured
agentbox hub status       # is it running? (add --json)
agentbox hub stop         # stop the hub process
agentbox hub restart      # stop then start
agentbox hub adopt <box>  # make a control-box-created box usable from this laptop
agentbox hub pull <box>   # download only its SSH keys (adopt does this too)

With a control box configured, agentbox hub opens that hub rather than starting one here — it is the hub the CLI already talks to and the one holding your boxes. Nothing on this machine is lost: local commands that need the hub here start it themselves, agentbox hub start --local forces it, and hub stop/hub restart still act on the local process. An exposed machine (agentbox hub expose) is its own control box, so agentbox hub still starts it.

hub adopt and hub pull both need a configured control box. hub adopt writes the local box record and downloads the box's SSH keys, so agentbox attach / cp / url / screen work exactly as for a box you created here — you rarely need to run it by hand, because referring to a control-box box by name adopts it automatically. hub pull is the keys-only half, writing ~/.agentbox/boxes/<sandboxId>/ssh/.

How it relates to the relay

The hub is a superset of the host relay — it embeds the relay and adds the UI, on the same port (8787, or whatever relay.port is set to — one key moves both). The two are mutually exclusive there, so:

  • agentbox hub takes over from a bare agentbox relay if one is already running.
  • Once the hub is up, ordinary box commands (agentbox create, claude, …) reuse it — they don't spawn a second relay.

So you can run agentbox hub once and leave it; everything else keeps working through it. Stopping the hub (agentbox hub stop) frees the port, and the next box command brings a lean relay back automatically.

Auth

On localhost the hub binds loopback (127.0.0.1) and gates access with a per-machine token — there's no login screen. agentbox hub generates a secret at ~/.agentbox/hub/token (mode 0600) and hands it to you in the URL; the hub stores it in an httpOnly cookie and redirects to the clean URL. Direct access without the token is refused (401). This protects the loopback bind from other local processes and DNS-rebinding. AGENTBOX_HUB_AUTH=off disables the gate.

That same ?token= handshake is what makes the (VNC) link in agentbox ls clickable: the link points at the hub's /boxes/{id}/vnc redirect, which mints a fresh viewer URL and 302s to it. A terminal click carries no Authorization header, so the token rides the query string, is swapped for the cookie, and the clean URL is what the box's desktop sees (the redirect also sends Referrer-Policy: no-referrer so the token is never forwarded on). On a password-profile hub — a deployed control box — page routes require a real login instead, so the first such click of a session lands on /signin.

The sidebar holds Boxes, Approvals, Usage and Benchmarks, then Settings, which opens to its sub-pages: General (providers, remote docker hosts, git access and the commit identity for new boxes), Subscriptions, Skills, Files, Devices and System. Under them are your projects, with + to add one. ⌘B (Ctrl+B) collapses the sidebar to icons, ⌘K (Ctrl+K) opens a search over boxes, pages and projects, and the top bar's sun/moon button switches between light and dark. The menu under your name at the bottom of the sidebar picks Light, Dark or System (follow the OS, the default). The browser remembers both the sidebar and the theme.

The Settings → Subscriptions page (/settings/subscriptions) lists the machine's named LLM accounts (logins, setup tokens, API keys per agent) as cards grouped by Anthropic, OpenAI Codex and API keys. Each card shows the plan tier, the account's email, how many boxes run on it, whether it is at its limit, and its tokens over the last 7 days, which link to the Usage page's token view filtered to that subscription. A box that borrows another agent's login (--model-auth) counts under the lender's card.

Under each plan, one meter per limit window the account actually has: a 5-hour and a weekly window, weekly only, or a separate weekly window for one model, depending on the plan. A Claude login's limits are read from Anthropic's usage endpoint with the stored login, at most every 5 minutes and only while a box on it runs, so they appear once a box is running; a Codex login's come from the last session transcript on it. Each card says how old its figures are, and marks them stale when no newer read has come in for 10 minutes. An API key has no plan limits. At the limit, the card turns amber and names its boxes.

The top bar's quota meter shows the two subscriptions in use that are closest to a limit, one thin bar per window. Hover or click it for every in-use subscription's windows, their resets and a Manage link; it reads Quota when no box uses one. The sidebar's Subscriptions item says how many are at their limit.

Add a setup token or an API key there, remove an account, or Make default to have new boxes use it (a Default badge marks the current one, the global <agent>.account); a login runs on the machine with agentbox credentials add <agent>/<name> --login. The create dialog offers an Account picker for an agent that has named accounts, and the box table shows the account a box runs on. On the box page, the agent's account row is a selector: pick another account and Switch, and the agent resumes its conversation there; the box's recent switches are listed under it. Settings → General sets what happens when an account hits its limit: ask (an approval offering the next account) or switch on its own. See several accounts per agent.

Settings → General → Git shows how this hub reaches GitHub. On the hub on your own computer, boxes hold no git credential: each push or pull request waits for your approval, then runs on that machine with your own git and gh login, so there is nothing to set up. On a control box the card names the account its GitHub token pushes as (or says GitHub rejected the token), or, with hub.gitAuth app, the GitHub App and the accounts it is installed on.

The Usage page shows what your agents did side by side and what they shipped: agent-hours against wall-clock hours (the speed-up over one agent; an hour counts while at least one agent is busy in a turn, never while it waits for your next prompt, see how hours are counted), the most boxes running at once, merged pull requests, commits, lines and files, a Gantt of the busiest days, the biggest sessions, the last 30 days as an activity grid (one square per day, a sprint at a glance), the pull requests merged lately (named by their GitHub title, or their branch when no workspace timeline saw the PR), when your agents work, the providers they ran on and the top boxes and projects. Pick a window with 7 days, 30 days (the default, the window the tray's header pill shows), This month, 90 days or Year; days are in your browser's time zone. The Subscription selector narrows the page to one subscription. Both stay in the URL (/usage?range=90d&subscription=claude/personal), so a link keeps the view it shows. Export CSV downloads one row per day of the window (hours, peak, tokens, commits, PRs, lines, files, and agent-hours per agent and per provider). The page reads the same numbers as agentbox usage.

The header's Work / AI usage switch flips between that view and the token view; the choice is in the URL too, so a reload or a link keeps it. AI usage (/usage?view=tokens) is the token breakdown: totals for a window (24 hours to all time), tokens per day stacked by agent, and breakdowns by agent, model, subscription, project, box, PC and session. Clicking a row filters the page to it. It reads the same numbers as agentbox usage tokens.

Benchmarks

The Benchmarks page (/benchmarks) shows how your boxes perform, measured on this hub only, with every figure's sample count beside it (percentiles need 5 samples):

  • Ranking: the same chart as agent-box.sh/bench, from this hub's own boxes. One bar per provider, the best first, for Boot time (median successful create), CPU speed (median work score per box), I/O speed (median disk write with fsync, the O_DIRECT read on hover) or Cost (list price per hour of the provider's busiest size). A metric with no samples yet says so instead of drawing bars. The window buttons apply to it too.
  • Boot time and failures: boot time per provider, size and location (the bar is the median, the tick the 90th percentile), the create failure rate per provider with its causes, and start, stop, pause, resume and checkpoint times. Show as table lists every create step's timings.
  • Agent throughput and model API errors: tokens per second and API errors per agent, model and placement, then, for one model, tokens/s and errors per 100 turns per hour, one line per provider and location. If one placement is slower or errors more at the same hour, the model vendor may be throttling its egress IP. Plan usage limits are counted apart.
  • Box resources: one box's last hour, 6 hours or day, minute by minute: the CPU it used, steal and I/O wait, cgroup throttling, pressure stalls, memory and disk. A band above the charts shows what the box was doing (running its boot tasks, a failed task, the agent working, idle), so a building box never reads as a slow one, and minutes with CPU steal, throttling, an I/O stall or memory pressure are shaded. The work score (a fixed sha256 kernel, higher is faster) compares CPUs across machines. /benchmarks?box=<id> opens a given box.

The page reads the same numbers as agentbox perf and the /api/v1/perf routes.

Share anonymous data, in the page header, shows whether this hub sends its anonymous benchmark to agent-box.sh/bench (off by default). It opens a dialog that says what is sent and what is not, shows the exact JSON the next run would post, and turns sending on or off in the hub machine's global config (bench.share). Turning it off can also delete what was already sent.

Sharing your usage on agent-box.sh

A usage share is a public page at agent-box.sh/s/<id> that renders the same Usage layout from a snapshot of your numbers, with a link preview image built from them. The id is random (24 letters and digits), so a share is reached only by its link. /s/example shows one made from sample data.

To share, click Share in the Usage page's header. The dialog shows the link the page will get (the site picks its random id when it is published, so the id appears after Share), a preview of exactly what will be sent (the window and subscription the page shows) as Page, drawn by the same layout, or as JSON, the payload itself, and an optional Name to show. Share posts that same object, unchanged, and shows the public URL with a Copy link button. Below, the dialog lists the shares this hub made, each with Delete. From a terminal, agentbox usage share does the same. The hub itself posts to agent-box.sh: your browser and the CLI only talk to the hub. To test against another deployment, set share.endpoint on the hub's machine.

  • What is sent: numbers, dates, and agent and provider ids (claude, hetzner, …): agents at once, agent-hours and wall hours (the card's hours saved is one minus the other), PRs merged, commits, lines and files changed, the daily chart, the activity grid, the three Gantt days and the biggest sessions, each labeled only "claude on hetzner". The only text is the name to show, if you type one (lowercase letters, digits and -, up to 39 characters), and the IANA time zone the days are counted in (Europe/Rome).
  • What is not sent: project, repo, box, branch, pull request and session names, prompts, transcripts, and the subscription view. agent-box.sh accepts only that schema (at most 64 KB, unknown fields refused) and stores the parsed numbers, never the request as sent. It keeps a salted hash of your IP for rate limiting, not the address.
  • The name to show is plain text on the page ("shared by marco"). It is not an account: it is not in the URL, not unique and not reserved, so it says nothing about who posted the share.
  • Deleting: the site answers each share with a delete secret. The hub keeps it in ~/.agentbox/hub/share.json (readable only by you) and never hands it to the browser, the CLI or a log. Delete in the dialog, or agentbox usage share rm <id>, sends it to the site; the page then answers 404. Without that file a share can't be deleted, so back it up. A share can't be edited after it is posted.

A password-profile hub also has a Settings → Devices page (/settings/devices): the computers enrolled with agentbox hub login, each with its own token, plus the codes waiting for your approval. A local hub needs no login and shows none. See Using the hub from another computer.

Requirements

AgentBox, the hub included, needs Node ≥ 22.12. On an older Node, agentbox stops with a message saying which version to install.

Running it for a team

agentbox hub is the single-user, on-your-machine UI. For a shared, multi-user deployment with password login and a cross-machine box registry — so cloud boxes keep working with your laptop off — deploy the same app as the hosted control plane (Vercel or a VPS, backed by Postgres).

On this page