pi-durable-disk and pi-transport: the agent is the workspace
An agent's conversation and its files live together in one directory on a disk. Mount the disk on any Linux host or container, release it, and mount it somewhere else: the agent carries on where the last host released it. Its tool calls go to Daytona and Modal sandboxes, and Jev places each one on the sandbox that fits it. They can also run as serverless calls on an Archil disk.
pi-durable-disk: mount it, release it, mount it again
A run is one directory, runs/<id> on an Archil disk. It holds pi's SQLite store with the conversation and every task, the agent's workspace, and run.json with the run's status, generation and holder.
Mount itOn an Archil disk, opening a run mounts its directory (runs/<id> of the disk) and takes an exclusive claim on it. One holder at a time: a second claim is refused, and a holder that lost the claim cannot write any more.Unmount itrelease() seals the run, gives up the claim and unmounts.Mount it somewhere elseThe next process or host to open it is the next generation, and pi-durable carries on with the conversation and its tasks from the last commit.Any Linux host or containerA Linux host or a container can mount an Archil disk, and the supervisor starts the agent on systemd units, Docker containers or Daytona sandboxes. On a plain directory of this machine there is no mount and no key: the directory is the claim, on one machine. The app code is the same.A waiting run lets goA run whose work only waits, in a retry or a long poll past the park threshold (60 s with the local and Docker drivers), is released and started again at its deadline.Hand it on, or fork itHand a run to another host at a step boundary, or fork a sealed run into many, each continuing on its own.Read a run from outsideIts record is a file: readLocalRunStatus(dir) on a directory, readRunStatus(control, id) on a disk.
Archil is the one disk in this release. The package needs an exclusive claim and a fence from the disk, and Archil gives both.
It does not sandbox an agent. Commands run as the run user, so run an agent you do not trust in your own sandbox. Linux is supported, and macOS is for development.
pi-transport: tool calls go to a sandbox
Experimental: the API changes without notice between releases.
The session, its store and its model calls stay with the host. Only the tool calls go to the box.
One Box interfacea box on this machine for development and tests, a Docker container, a Daytona sandbox, a Modal sandbox (gVisor, or a VM), or a directory of the agent's Archil work disk, where each command is one serverless call.boxEnv(box)pi's ExecutionEnv over a box: the agent's read, write, edit and bash run in it.Where tools run is a line of configtransport(config, host) runs each conversation's tools in the environment the config names. The transport makes a box at the first tool call, so a run that calls no tool makes none.Jev places each callGive each environment a one-line purpose. Jev reads the step and those lines and says where it should run, and the host points its tools there.Archil serverless callsarchilExecBoxes makes a box of a directory on the agent's Archil work disk and runs each command as one serverless call: a fresh container with the disk mounted, one request that answers when the command ends. Use it for tools: no program keeps running between calls, and a call has a 300 s limit. Each call runs in its own VM, but every box on a disk can read and write that whole disk, so give each agent its own work disk.Every box has a lifetimeThe provider ends the box when its lifetime passes, with no call from the host, so a host that dies leaves no boxes behind.A receipt for each priced boxWhen a box the host gives rates to ends, it gets a receipt: the provider, the kind of box, its start and end, and its cost at those rates. A box with no rate gets none, and the package holds no price table.
MCP servers, code mode and model calls stay with the Harness.
Try it
pick-up-a-run and the local box need no key.
pick-up-a-runpi-durable-disk's keyless example. It starts one script three times, one after another, on one directory. Each opens the run, answers one question of the same chat with pi-ai's scripted faux model, and releases it. The last still knows the first question.A box on this machinepi-transport's keyless example: the box is a directory on this machine, with no isolation and no Docker.A boxa box in a Docker container: create it, run a command in it, destroy it.planned-movethe unmount and mount on real machines: a run moves from this machine to a Daytona sandbox at a step boundary. It is released and sealed, then opened at the next generation, and the agent is told. It needs a Linux machine with systemd, the archil client and passwordless sudo, an Archil disk and key, and a Daytona key (Tier 3 or 4 organisation).
git clone https://github.com/Parcha-ai/agentrun && cd agentrun
npm ci --ignore-scripts && npm run build
cd packages/pi-durable-disk && node examples/pick-up-a-run/main.tsInstall
npm install @parcha/pi-durable-disk@0.1.0-beta.33 @earendil-works/pi-durable@1.3.0 @earendil-works/pi-ai@1.3.0 @earendil-works/chord@1.3.0
npm install @parcha/pi-transport@0.1.0-beta.33pi-durable and chord are peer dependencies, from 1.0.4 to below 1.4: Pi 1.4 is not supported yet, so the line pins 1.3.0, and a later release widens the range. Archil serverless calls take your own Archil SDK, the disk package. Node 22.19 or later. Apache-2.0.