Pi Durable is a fresh experimental package from Earendil, the firm behind the coding agent Pi, which has also released Pi 1.0. It is pitched as a framework for constructing agents capable of sustained operation, surviving crashes, and functioning across multiple machines.
What Pi Durable Does
Pi Durable does not step into the role of Pi the coding agent. It functions as a framework for constructing any form of agentic application, with coding agents among those possibilities. The team has stated that it carries over code and principles from Pi the coding agent, with minimalism and malleability serving as shared touchstones.
This package was constructed with agents in mind that can endure indefinite conversations, weather catastrophic internal and external failures, and accommodate multiple humans guiding the same agent at once. The design aims for agents that are durable, adaptable, and capable of running anywhere.
The Harness Concept
A harness is defined by the team as the combination of storage and the necessary machinery for running conversations with large language models in parallel. It delivers both the tools those models call upon and the execution environments in which those tools operate.
A transcript captures a back-and-forth exchange involving a person and an agent. The agent consists of the model plus its settings, including the thinking level and the tools it calls upon. These tools carry out their tasks within execution environments, which might be a laptop, a remote VM, or an in-memory sandbox.
The selection of tools and the execution environment for an agent rests with each conversation. Every action carried out by the harness, whether it involves calling the model or running a tool, counts as a task.
Why Pi Durable Is Built This Way
The Pi Durable system is built to operate wherever a JavaScript runtime exists. It connects to a storage backend and includes memory, SQLite, and JSONL storage among its components. The package also contains a conformance suite and benchmarks aimed at custom backends.
No Node APIs are used in the SQLite and JSONL storage code, which means it runs on Bun or inside a Cloudflare Durable Object with a small adapter. The storage interface itself is small and easy to build on top of existing systems such as a key-value store or Postgres.
A single process controls storage at any given moment, with other clients connecting to it. The harness retains only the current working set in memory on SQLite: active transcripts, live tasks, and pending submissions. When older messages approach the limit of the model’s context window, they get compressed.
Running Tools Remotely
When a tool needs a file or a shell, it draws on an execution environment for those resources. Pi Durable provides a Node execution environment, which supplies tools with access to local files.
Because the execution environment interface stays simple and straightforward to build, remote execution environments can be opened up to the tools. That arrangement permits the harness to operate on one machine while its tools work on a separate one.
Every conversation operates in its own location, since the env function constructs the setting for each tool call from that particular conversation’s working directory.
The Codebase
The full source code for Pi Durable, excluding tests, runs roughly 15,000 lines long. Translated into tokens, that comes to around 150,000 with GPT, and around 250,000, which the team considers the upper limit, with Claude.
An agent rarely requires the full extent of Pi Durable to function. Of its components, the storage backends amount to just 3,000 lines, which most agents can safely omit.
How It Picks Up After Crashes
Each stage of a run in Pi Durable creates a record before the next step begins. So an agent can endure when its process ends, whether the computer goes to sleep, the container gets redeployed, or the machine runs out of memory, and resume right where it stopped.
A single root conversation gets made the very first time it is used and continues to be the same one through every restart afterward. This is what a plain setup amounts to.
“`javascript
import { BACKGROUND_CONTEXT } from “@earendil-works/chord/context”;
import { createModels } from “@earendil-works/pi-ai/models”;
import { openaiProvider } from “@earendil-works/pi-ai/providers/openai”;
import { createRegistry, Harness } from “@earendil-works/pi-durable”;
import { NodeExecutionEnv } from “@earendil-works/pi-durable/env/node”;
import { openNodeSqliteStorage } from “@earendil-works/pi-durable/storage/sqlite/node”;
import { CodingTools } from “@earendil-works/pi-durable/tools”;
A storage created from a SQLite database is opened with the path “./agent.sqlite”, and then a harness is built around it. That harness carries with it a collection of models set up through an OpenAI provider, along with a registry that has been installed with CodingTools — a package that covers reading, writing, editing, and shell work. The entire operation runs within an execution environment derived from Node.js, which can be directed at any working directory supplied to it, defaulting to the current process’s working directory if none is given.
const root = await harness.root(context, {
agent: {
model: { provider: “openai”, modelId: “gpt-6.1-sol” },
cwd: “/work/repo”,
},
});
“`
Key Facts Box
- Pi Durable ships memory, SQLite, and JSONL storage.
- The SQLite and JSONL code uses no Node APIs.
- The entire codebase is about 15,000 lines without tests.
- Storage backends are 3,000 lines most agents can skip.
- Checkpoints store every step before a run moves on.
The team describes the project as experimental and says they need assistance turning it into the strongest harness possible.
Source material: “Pi Durable,” earendil.com.
Get the Notebook.
The day's best stories and every fresh verdict, in plain English, in your inbox by seven. One email a day, no more.

