
bash, read, write, and edit tools, and a workspace decides where those tools run.
The boxd workspace runs them on an isolated boxd machine. The actor, its event log, and its model calls stay on your Bun host, and so does your API key. It ships in tardie 0.56.0 and later.
Set up
1
Create an agent project
@boxd-sh/sdk is an optional peer dependency of tardie, so add it yourself. In an existing project, run bun add tardie @boxd-sh/sdk.2
Create an API key
.dev.vars, which bun run dev loads:3
Mount the boxd workspace
In
server.ts, replace localWorkspace with boxdWorkspace:server.ts
boxdWorkspaceName(coordinate) names a machine after the actor, instance, and thread, so each thread gets its own machine. The name is tardie- followed by 16 hex digits. Start the host with bun run dev.Check the workspace without a model
This script gives the workspace a name, runs commands on the machine, and writes a file, with no model or host involved:check.ts
org is only needed when the key can reach more than one organization.
Lifecycle
The first command creates the machine, or adopts the machine that already has the name. A restarted host adopts the same machine with its files. Withoutregion, adoption looks in every region, and it fails when two regions hold the name or when a region doesn’t answer. A hibernated or suspended machine wakes on the next command, and a stopped machine is started first.
release decides what happens to the machine when the workspace layer is released:
Release covers a machine from the moment it is created, so a first command interrupted during startup leaves nothing behind under
destroy.
A command that runs past policy.commandTimeoutMs, 30 seconds by default, is cancelled, and its process on the machine is stopped.
Network
network becomes the machine’s egress allowlist when the machine is created. It defaults to none.
The policy is fixed at creation. Adopting a machine whose allowlist differs from the requested policy fails, with both lists in the error.
Options
What each machine gets
- Isolation: every machine is created isolated, and the workspace refuses to adopt one that isn’t. Code the agent runs holds no boxd credentials and can’t reach your other machines.
- Commands as the
boxduser in/home/boxd/workspace, through boxd’s exec and file APIs. - The default image: Ubuntu 24.04. For your own tools, start from a snapshot with
snapshot. - A machine per thread: with
boxdWorkspaceName(coordinate), two threads never share files or processes.