AI Briefing
KOSign in

Earendil Releases Pi 1.0 and Experimental Pi Durable Harness for Durable AI Agents

·2026.10.01 09:00

Key point

Pi Durable provides a lightweight, crash-resistant harness for long-running AI agents with built-in checkpointing, concurrent conversation handling, and flexible storage backends.

Details

Earendil Engineering has released Pi 1.0, a coding agent optimized for single-user remote terminal environments, alongside Pi Durable, an experimental harness framework designed for durable and malleable AI agents. While Pi 1.0 focuses on manual restarts upon process termination, Pi Durable aims to provide a robust infrastructure for agents that must survive crashes and run for extended periods.

Core Architecture and Storage

The Pi Durable harness is built around the concept of a Conversation (a transcript of interactions) and Tools (actions executed in environments like notebooks or VMs). All operations, including model calls and tool executions, are treated as Tasks.

  • Lightweight Codebase: The source code is approximately 15,000 lines (excluding tests), with the storage backend comprising about 3,000 lines.
  • Storage Backends: Supports Memory, SQLite, and JSONL out of the box. The interface is small enough to allow implementations for Key-value stores or Postgres.
  • Runtime Flexibility: Currently supports JavaScript runtimes. SQLite/JSONL backends avoid Node APIs, enabling execution in Bun and Cloudflare Durable Objects via adapters.
  • Concurrency Control: Each process owns one storage instance; other clients connect to that process.

Durability and Crash Recovery

Pi Durable ensures agents can resume operations after failures through checkpointing:

  • Checkpointing: Every execution step saves progress before proceeding. If a process dies, a new process opens the same storage, finds incomplete tasks, and resumes from the last checkpoint.
  • Task Resumption: Interrupted model requests are resent. Interrupted tool calls are either rerun (if safe) or reported to the model.
  • Exactly-Once Submission: Uses requestId to ensure submissions are processed exactly once, returning the original submission on retry.
  • Memory Management: Active transcripts are limited by the model's context window and summarized via compaction, allowing conversations with tens of thousands of messages to fit in memory.

Concurrency and Extensions

The framework supports multiple concurrent conversations without blocking and offers a flexible extension system:

  • Concurrent Conversations: A single harness can run multiple conversations. Conversations can be forked from any point in history without copying parent history.
  • Extensions: Bundles of system prompts, tools, hooks, and tasks. Extensions can override tools and modify system prompts dynamically.
  • Hooks: Allow intervention in model requests, tool calls, and compaction. Hooks like beforeTool, afterTool, and onYield enable rewriting arguments, blocking calls, or maintaining execution.
  • Compaction: Automatically summarizes context when limits are approached. Configurable via reserveTokens and backgroundTokens to manage context windows efficiently.

Malleability and Multiplayer Support

Pi Durable allows for dynamic updates and collaborative interaction:

  • Malleable Agents: Running agent code can be changed. Installing a replacement extension with the same name updates the agent for subsequent calls, while existing tool calls complete with the old code.
  • Multiplayer: Multiple clients can attach to the same conversation. Clients receive the current view and subsequent changes, supporting late joins and reconnections.
  • Application State: State like todos or plans is stored as documents, committed atomically with transcripts for consistency.

Availability

Pi Durable is currently experimental and subject to API changes. It is available via npm packages @earendil-works/pi-durable, @earendil-works/pi-ai, and @earendil-works/chord. The project is written in TypeScript for ease of bootstrapping, with potential future ports to Rust or assembler not excluded.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.