Pi Durable | Earendil
Short summary
Earendil shipped Pi Durable, a framework for building durable AI agents that can run for long periods, survive crashes, and handle multiple conversations simultaneously across different machines. It's designed as a separate harness layer that complements the core Pi coding agent rather than replacing it.
- Pi Durable stores agent state in checkpoints (SQLite, JSONL, or custom backends) so agents resume exactly where they left off after crashes, with aborted model requests resent and tool calls either rerun or reported as interrupted depending on safety.
- The framework runs multiple conversations concurrently without blocking each other, and conversations can fork at any point in their transcript to create branches that share parent history without copying it.
- Extensions bundle system prompts, tools, hooks, and tasks as pluggable units; conversations select which extensions to use, and system prompt changes are picked up on the next request and recorded in the transcript so restarts see exactly what the model saw.
Full summary
Earendil shipped Pi 1.0 alongside a new experimental framework called Pi Durable, designed to run AI agents in production environments. Pi 1.0 itself stays focused on what it does well—a coding agent that runs in your terminal, driven by one person, and restarts when it crashes. Pi Durable is different. It's a general-purpose harness for building any agentic application that needs to run long-term, survive failures, handle multiple concurrent conversations, and work anywhere there's a JavaScript runtime. The core distinction matters: Pi Durable doesn't replace the coding agent; it's infrastructure that lets multiple people steer the same agent, keep conversations alive indefinitely, and run across different machines.
The technical design centers on three core capabilities. First, it's built lean—about 15,000 lines of source code, or roughly 150,000 tokens in GPT's encoding. Storage is pluggable (memory, SQLite, JSONL, or your own backend), and the framework only keeps active transcripts and tasks in memory while archiving older conversation history to disk. Execution environments are similarly abstraction-friendly, so tools can run locally on Node or remotely on other machines. Second, fault tolerance is baked in through checkpoints at every step. If a process dies mid-task, the next process reopens the same storage, finds unfinished work, and resumes from the last checkpoint. Model requests that got cut off are retried; tool calls either rerun safely or the model gets told they were interrupted. Third, it handles concurrent conversations natively without blocking, and conversations can fork from any point in another conversation's transcript, sharing history without copying it.
The framework shares Pi's design philosophy—minimalism and malleability—which means agents can understand and work with the entire codebase. Earendil is treating Pi Durable as a testing ground for agentic patterns; lessons learned building applications on it flow back into the core Pi agent. The code examples show straightforward setup: define your models, register tools, pick a storage backend and execution environment, open a harness, and start conversations. The architecture assumes a single process owns storage at any given time, while other clients attach to it, which keeps consistency guarantees simple without requiring distributed consensus.