|
| 1 | +--- |
| 2 | +title: Tenki |
| 3 | +description: Run your agents in Tenki Firecracker microVMs — a community AgentBox provider plugin with in-box Docker, public preview URLs, and free pause/resume |
| 4 | +--- |
| 5 | + |
| 6 | +Run your agents in a [Tenki](https://tenki.cloud) sandbox — a Firecracker microVM with its own |
| 7 | +kernel — using the same `agentbox` commands as a local box. **tenki is a community provider** — a |
| 8 | +[plugin](/docs/build-a-provider) published as its own package |
| 9 | +(`@tenkicloud/agentbox-provider`), not bundled into the CLI. You get in-box Docker, a public |
| 10 | +HTTPS preview URL per port, free pause/resume, and id-addressed checkpoints, with no local Docker |
| 11 | +needed. |
| 12 | + |
| 13 | +Switch per box with `--provider tenki`, or pin it project-wide with `box.provider: tenki` in |
| 14 | +[`agentbox.yaml`](/docs/agentbox-yaml). Comparing options? See the built-ins |
| 15 | +[local-docker](/docs/local-docker), [hetzner](/docs/hetzner), [daytona](/docs/daytona), |
| 16 | +[vercel](/docs/vercel), and [e2b](/docs/e2b). |
| 17 | + |
| 18 | +<Callout type="info" title="Community provider"> |
| 19 | + Maintained outside the AgentBox core, at |
| 20 | + [`LuxorLabs/tenki-agentbox-provider`](https://github.com/LuxorLabs/tenki-agentbox-provider) |
| 21 | + ([npm](https://www.npmjs.com/package/@tenkicloud/agentbox-provider)). Built only on |
| 22 | + [`@madarco/agentbox-provider-sdk`](https://www.npmjs.com/package/@madarco/agentbox-provider-sdk) |
| 23 | + and the official [`@tenkicloud/sandbox`](https://www.npmjs.com/package/@tenkicloud/sandbox) SDK. |
| 24 | + Report bugs at the [issue tracker](https://github.com/LuxorLabs/tenki-agentbox-provider/issues). |
| 25 | +</Callout> |
| 26 | + |
| 27 | +## Install |
| 28 | + |
| 29 | +Install the plugin, then register it so `--provider tenki` resolves: |
| 30 | + |
| 31 | +```bash |
| 32 | +npm i -g @tenkicloud/agentbox-provider |
| 33 | +agentbox plugin add @tenkicloud/agentbox-provider |
| 34 | +agentbox plugin list # → tenki … (SDK v2) |
| 35 | +``` |
| 36 | + |
| 37 | +A plugin runs in-process with full host and credential access, so `plugin add` is the trust |
| 38 | +boundary — see [build-a-provider](/docs/build-a-provider). |
| 39 | + |
| 40 | +## Credentials |
| 41 | + |
| 42 | +Create a workspace auth token in your [Tenki dashboard](https://tenki.cloud) and expose it as |
| 43 | +`TENKI_AUTH_TOKEN`. On a terminal the first `create` prompts for it and saves it for you: |
| 44 | + |
| 45 | +```bash |
| 46 | +export TENKI_AUTH_TOKEN=tk_... # or add TENKI_AUTH_TOKEN=… to ~/.agentbox/secrets.env |
| 47 | +agentbox doctor # shows the `tenki:` group |
| 48 | +``` |
| 49 | + |
| 50 | +`TENKI_API_TOKEN` is accepted as an alias. Credentials persist to `~/.agentbox/secrets.env`; |
| 51 | +project `.env` files are never harvested. See [environment](/docs/environment). |
| 52 | + |
| 53 | +## Base image |
| 54 | + |
| 55 | +Like every AgentBox cloud provider, a box needs the AgentBox runtime (`agentbox-ctl`, node, the |
| 56 | +agents) present in the image. Tenki boots from a snapshot, so the plugin bakes one: |
| 57 | + |
| 58 | +```bash |
| 59 | +agentbox prepare --provider tenki |
| 60 | +``` |
| 61 | + |
| 62 | +`prepare` boots a throwaway builder sandbox from Tenki's base image, installs the runtime, tmux, |
| 63 | +Docker and the coding agents, snapshots it, and pins the snapshot id to |
| 64 | +`~/.agentbox/tenki-prepared.json`. Every `create` then boots from that snapshot, so new boxes are |
| 65 | +ready in seconds. A repeat `prepare` reuses the pinned snapshot unless you pass `--force`, and |
| 66 | +re-bakes by itself if the snapshot has been deleted from the workspace. |
| 67 | + |
| 68 | +`prepare` also bakes your host's **static** agent configuration into the image — settings, MCP |
| 69 | +servers, plugin registries — so boxes start with your own setup. Credentials are deliberately not |
| 70 | +baked; AgentBox seeds them per box at create time. |
| 71 | + |
| 72 | +## Use it |
| 73 | + |
| 74 | +```bash |
| 75 | +agentbox create --provider tenki |
| 76 | +agentbox tenki claude # sugar for `claude --provider tenki` |
| 77 | +``` |
| 78 | + |
| 79 | +The workspace is seeded from a host git clone plus your stash and untracked files (see |
| 80 | +[teleport-a-project](/docs/teleport-a-project)), checked out on branch `agentbox/<box-name>`. From |
| 81 | +there, [run an agent](/docs/run-an-agent) and [access your box](/docs/access-your-box) as usual. |
| 82 | + |
| 83 | +## Pause / resume |
| 84 | + |
| 85 | +Tenki pause/resume is free and native, the same model as e2b and vercel. The host keepalive pushes |
| 86 | +the session deadline forward while the agent is working, so a long session is not reaped at the |
| 87 | +create-time limit. |
| 88 | + |
| 89 | +```bash |
| 90 | +agentbox pause <box> |
| 91 | +agentbox start <box> |
| 92 | +``` |
| 93 | + |
| 94 | +## Checkpoints |
| 95 | + |
| 96 | +Cloud checkpoints map to id-addressed Tenki snapshots (same shape as vercel and e2b). Boot from one |
| 97 | +with `--snapshot`, which restores `/workspace` intact and skips workspace seeding: |
| 98 | + |
| 99 | +```bash |
| 100 | +agentbox checkpoint create --name setup |
| 101 | +agentbox create --provider tenki --snapshot setup |
| 102 | +``` |
| 103 | + |
| 104 | +Pair that with `box.defaultCheckpoint` so repeat creates boot from your project-ready snapshot. |
| 105 | + |
| 106 | +## Specs |
| 107 | + |
| 108 | +| Spec | | |
| 109 | +| ---------------- | ------------------------------------------------------------------------------------- | |
| 110 | +| Box | One Firecracker microVM per box, with its own kernel | |
| 111 | +| Base image | Snapshot baked by `agentbox prepare --provider tenki` | |
| 112 | +| Comms | TypeScript SDK — ConnectRPC control plane + per-session data plane (`run`, file I/O) | |
| 113 | +| Docker-in-Docker | Enabled — overlay2 on cgroup v2, `docker build` and `docker run` work as the box user | |
| 114 | +| SSH | None for exec/files; interactive attach bridges host OpenSSH over the session channel | |
| 115 | +| Live snapshots | Free pause/resume, plus id-addressed snapshots for checkpoints | |
| 116 | +| Preview URL | Public HTTPS per exposed port; the WebProxy runs on 8080 | |
| 117 | + |
| 118 | +## Configuration |
| 119 | + |
| 120 | +AgentBox does not add per-provider config keys for plugin providers, so tenki reads the generic |
| 121 | +keys plus its own environment variables: |
| 122 | + |
| 123 | +| Setting | Where | Notes | |
| 124 | +| ------------------ | ----------------------------- | ---------------------------------------------------------- | |
| 125 | +| VM size | `--size` / `box.size` | `cpu-memory[-disk]` in GB, e.g. `4-8-20` | |
| 126 | +| Default checkpoint | `box.defaultCheckpoint` | Generic key; there is no per-provider variant | |
| 127 | +| Base image | `AGENTBOX_TENKI_BASE_IMAGE` | Tenki base image `prepare` layers onto (default `sandbox`) | |
| 128 | +| Workspace | `AGENTBOX_TENKI_WORKSPACE_ID` | Defaults to the token's own scope | |
| 129 | +| Session lifetime | `AGENTBOX_TENKI_TIMEOUT_MS` | Seeds the host keepalive loop (default 45 min) | |
| 130 | + |
| 131 | +## Caveats |
| 132 | + |
| 133 | +- **No live stats** — `agentbox top` / `dashboard` render `—` for cloud boxes, and `list` reports |
| 134 | + them optimistically from the last known state. |
| 135 | +- **`prune` does not cover tenki** — `agentbox prune --provider <name>` accepts built-in cloud |
| 136 | + providers only, so orphan sessions left by an interrupted `create` have to be cleaned up from the |
| 137 | + Tenki dashboard. |
| 138 | +- **Privileged ports** — the WebProxy runs on 8080 (not 80), matching the other microVM providers; |
| 139 | + `agentbox url` resolves the 8080 preview. |
| 140 | +- **Push through the relay** — use `agentbox-ctl git push` from a box; the relay holds the |
| 141 | + credentials. See [sync-and-git](/docs/sync-and-git). |
| 142 | + |
| 143 | +## Related |
| 144 | + |
| 145 | +- [core-concepts](/docs/core-concepts) — what a box, branch, and worktree are. |
| 146 | +- [teleport-a-project](/docs/teleport-a-project) — how `/workspace` is seeded. |
| 147 | +- [run-an-agent](/docs/run-an-agent) · [access-your-box](/docs/access-your-box) — work in a cloud box. |
| 148 | +- [web-apps-and-tunnels](/docs/web-apps-and-tunnels) — preview URLs, the 8080 WebProxy, `expose:` ports. |
| 149 | +- [checkpoints-and-pausing](/docs/checkpoints-and-pausing) — pause/resume and checkpoints. |
| 150 | +- [build-a-provider](/docs/build-a-provider) — how community provider plugins work. |
0 commit comments