Pi Durable ♥ Actors: One Agent, One Owner, Any Worker A developer test of Pi Durable, a harness that stores an agent's conversations, tasks and recovery checkpoints, ran scripted agents inside Rivet Actors across two worker nodes and killed one node to observe where the work went, finding that some work did not recover on its own. The post argues agents map onto Carl Hewitt's actor model — private state, a mailbox, subagents as created actors and crashed runs as crashed actors — and cites Anthropic's "Building always-on agents" guidance that "An inbox should only have one active worker at a time." The author frames the durable harness as the piece older actor frameworks lacked, because a model's behavior can take four minutes, cost money and cannot be replayed for free. Pi Durable ♥ Actors: One Agent, One Owner, Any Worker I have always thought of agents as actors with, well, agency. Pi Durable's one-owner rule makes that almost literal: give each agent its own harness and it is an actor. I spread scripted agents over two worker nodes, killed one, and watched where the work went. 1. 1. Managing Context Windows with pi /tree: Branches, Summaries, and Subagent-like Workflows https://stacktoheap.com/blog/2026/02/26/pi-tree-context-window-management 2. 2. Pi Durable: A Look at the Future of Agent Harnesses https://stacktoheap.com/blog/2026/10/05/pi-durable 3. 3. Code Mode That Survives a Crash: Durable Scripts in Pi Durable https://stacktoheap.com/blog/2026/10/26/durable-code-mode-in-pi 4. 4. Two Harnesses Walk into a Claude Subscription https://stacktoheap.com/blog/2026/10/30/claude-subscriptions-two-harnesses 5. 5. DeepSeek Harness on a Claude Subscription in 120 Lines https://stacktoheap.com/blog/2026/11/09/claude-subscription-deepseek-harness 6. 6. Pi Durable ♥ Actors: One Agent, One Owner, Any Worker I have a habit when I read about a new agent framework. I read “actor” wherever it says “agent” and check whether the page still makes sense. It nearly always does. If the framework is any good, that is. The actor model has been around since the seventies. The one thing that is new is the behavior in the middle: a model deciding what to do next, where there used to be a function I wrote. Agents are actors with, well, agency. Pi Durable https://stacktoheap.com/blog/2026/10/05/pi-durable , a harness that stores an agent’s conversations, tasks, and recovery checkpoints, made me think this more, not less. Then I came across Rivet https://rivet.dev , which runs a Pi Durable harness inside each of its Actors. That gave me a way to try the idea: many agents, several worker processes, and no code of mine deciding who runs where. This post covers why the two fit, the small cluster I ran, agents calling each other across nodes, a durable reminder, and what happened when I killed a node, including the part that did not recover by itself. Why agents look like actors Carl Hewitt’s actor model fits in a sentence. An actor receives a message, and in response it can send messages to actors it knows, create new actors, and decide how it will handle the next message. Its state is its own, and it handles one message at a time. Erlang added the part that made it practical: let it crash, and have a supervisor start it again. Orleans added the virtual actor, which always exists as far as a caller is concerned. You address it by a key, and the runtime wakes it somewhere when a message arrives and puts it away when it is idle. Cloudflare’s Durable Objects are the same idea with storage attached. A long-lived agent wants all of it. Its conversation is private state. User inputs, follow-ups, and steering are a mailbox. A subagent is an actor it created. A crashed run is a crashed actor. And the support agent for customer 42 is a virtual actor addressed by a key. I am not the only one describing agents this way. Anthropic’s Building always-on agents https://claude.com/resources/articles/building-always-on-agents came out last week and lays out five primitives: an event inbox, timers, memory, permissions, and an outbox. Its agent “spends most of its time asleep, waking up periodically to do work.” One of its rules reads: “An inbox should only have one active worker at a time.” The article never says “actor”, but the pieces are all there. A durable inbox with one worker is a mailbox. Memory that outlives the worker is private state. A timer that puts an event in the inbox is how a sleeping actor gets woken. Here is that agent with the names this post uses: What the old actor frameworks did not have to deal with is a behavior that takes four minutes, costs money, and cannot be replayed for free. That is the job of a durable harness. When I wrote about Pi Durable’s building blocks https://stacktoheap.com/blog/2026/10/05/pi-durable , the table of things the host still has to do had this row: Storage ownership: Enforce one process per storage; the harness supplies no cross-process ownership lock. I read that as a gap back then. Now it reads like the definition of an actor: state that exactly one process may touch. If each agent gets its own harness and its own storage, almost everything else in Pi Durable has an actor counterpart too: | Actor | Pi Durable | |---|---| | Private state | The harness’s storage: transcript entries, documents, task records | | Mailbox | Submissions: admitted inputs that queue while a run is busy | | A message is not delivered twice | A requestId that is admitted once, however often it is sent | | One message at a time | One process owns a storage | | Creating actors | Child conversations and background tasks | | Let it crash, restart | Reopen the storage and resume from the saved checkpoints | | Waiting without a thread | sleepUntil : a task that holds no process while it sleeps | Pi Durable gives you one very good actor. What it does not give you is the system around the actor: something that decides which machine an agent lives on, routes a call to it, wakes it when a timer is due, and moves it when the machine dies. My own use of Pi Durable sidesteps all of that. It is a personal assistant app, a prototype along the lines of Grok’s bots: a small team of AI teammates with their own conversations and routines. It runs one harness in one process on one SQLite file, and it runs well that way. What I have been thinking about is heavier work. Several teammates on long tasks at the same time, routines that fire while I am away, tools that take minutes, and none of it stopping because one machine restarted. That is the point where one process stops being enough and you start to want workers, and something that decides which worker each agent runs on. That missing system is what an actor runtime is. What Rivet adds Rivet describes itself as infrastructure for agents. The part I care about has three layers: - The engine is the control plane. It decides which worker node each actor runs on, routes calls to it, puts idle actors to sleep, wakes them for a call or a schedule, and notices when a node has gone. - RivetKit is the TypeScript library. You define actors with typed actions, register them, and call them from a typed client. Each actor gets its own SQLite database. The data lives with the engine and not on the worker: my worker processes had no data directory at all, and the protocol a worker speaks to the engine has messages for fetching a database’s pages and committing them. - @rivet-dev/pi https://rivet.dev/agents/docs/pi/ puts a Pi Durable harness inside an actor. That last package was announced on October 7, six days after Pi Durable itself shipped. The announcement https://x.com/rivet dev/status/2107840906141335935 lists, in its own words, multiplayer streaming, about 1.3 MB per agent, “survives crashes, exactly-once input”, “harness outside the sandbox”, “vanilla Pi”, and schedules, JWT, and sandboxes. I tried the crash claim, on @rivet-dev/pi 0.5.6, rivetkit 3.1.1 and Pi Durable 1.5.2. I did not try streaming, sandboxes, auth or cron schedules, and I did not measure the memory. The engine is open source and self-hostable, and there is a cloud. I ran everything locally. One agent, one actor Here is the whole actor. The tools and the task it installs are plain Pi Durable definitions, shown in the sections below, with nothing Rivet-specific in them. js import { createRegistry, defineExtension } from "@earendil-works/pi-durable"; import { pi } from "@rivet-dev/pi"; import { setup } from "rivetkit"; const extensions = createRegistry ; extensions.install defineExtension { name: "spike", tools: wait, askAgent, remind , tasks: Reminder , } , ; export const agent = pi { registry: extensions, models: scriptedModels , model: "faux/scripted", } ; export const registry = setup { use: { agent } } ; Starting a worker node is one more line: registry.start . With no engine configured, it starts an engine inside the same process, which is the whole development setup. With RIVET ENDPOINT set, the process becomes a worker of that engine. The client is typed from the registry and never names a node: python import { createClient } from "rivetkit/client"; import type { registry } from "./agent.ts"; const client = createClient