Pi Durable: A Runtime for Crash-Proof, Long-Running, Multiplayer Agents
Melvin Vivas · X video post · 2026-10-05 · 2:58 · 302 views · Open on X
Topics: AI Agents, Tool Use & MCP, LLMOps, Deployment & Monitoring, AI System Design & Architecture · Level: advanced
Summary
This video introduces Pi Durable, an experimental runtime released with Pi 1.0 (the transcript says "Arendil", which is most likely Earendil). Pi on its own is a coding agent that one person drives from a terminal. Pi Durable is a harness for agents that run in Slack, on servers or in the cloud. The video explains how it uses checkpointed tasks, pluggable storage, forked conversations and multi-client streaming so agents can survive crashes and be steered by many people at once.
Key points
- Pi Durable is a 'harness': storage plus the machinery to run many model conversations in parallel. Conversations call tools, tools run in execution environments, and everything the harness does (model calls, tool runs) is a task.
- Storage is pluggable. Memory, SQLite and JSONL backends come built in, and the interface is small enough to build on Postgres, a key-value store or a Cloudflare Durable Object. Only the working set stays in memory; everything else stays on disk.
- Each step of a run is a task that saves a checkpoint before it moves on. If the process crashes, a new process opens the same storage and resumes each task from its last checkpoint.
- Tools marked ReplaySafe simply rerun after a crash. Tools with side effects, such as a deploy, are never repeated. The model is told it was interrupted, and a request ID makes every submission happen exactly once.
- Forks branch from any point in a transcript without copying history, like a Slack thread spun off a channel. Sub-agents are just conversations owned by the tool call that started them.
- Extensions bundle prompt sections, tools, hooks and tasks. App state (to-do lists, plans) lives in typed JSON documents committed atomically with the transcript. Compaction runs in the background, and you can hot-swap extension code while agents keep running.
- Multiplayer: any number of clients can attach to a conversation. Each gets the current view, then streams only what changes, so people can join late, reconnect or steer the agent mid-run.
- It is MIT-licensed, about 15,000 lines of TypeScript, and installed from npm. It is experimental, so the API may change.
Resources mentioned
- Pi Durable · tool · github.com · free
An experimental, MIT-licensed TypeScript runtime for building long-running, crash-proof, multiplayer agents with checkpointed tasks and pluggable storage.
Also in: Durable AI Agents with Pi Durable and Cloudflare Durable Objects (Melvin Vivas on X · notes) - Pi · tool · x.com · free
A customizable coding agent that can be extended through its Extensions API and connected to several model providers.
Also in: 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090 (Melvin Vivas on X · notes), Pi Agent: A Highly Customizable Agent with Durable Sessions (Melvin Vivas on X · notes), Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress (Melvin Vivas on X · notes), Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model (Melvin Vivas on X · notes) and 54 more - Earendil · other · earendil.com · free
The company that released Pi Durable alongside Pi 1.0 (transcribed as 'Arendil'). - SQLite · tool · sqlite.org · free
A small SQL database that runs inside your program as a single file, with no server to set up.
Also in: Why Plan Mode Still Matters in AI Coding Agents (Codex, Claude, Cursor) (Melvin Vivas on X · notes), Running Qwen3.8-27B EXL3 Locally on an RTX 3090 with 220K+ Context (Melvin Vivas on X · notes), One-Shotting a Slack Clone with Fable 5 (Melvin Vivas on X · notes), Google Antigravity 2.0: Multi-Agent Desktop App Walkthrough (Subagents, Scheduled Tasks) (Melvin Vivas on X · notes) and 1 more - PostgreSQL · tool · postgresql.org · free · recommended by both Bashiri Smith & Melvin Vivas
An open-source relational database; with the pgvector extension it also stores and searches embeddings.
Also in: Prompt Claude to Plan 3 Production-Grade AI Portfolio Projects (Bashiri Smith on Facebook · notes), Why Plan Mode Still Matters in AI Coding Agents (Codex, Claude, Cursor) (Melvin Vivas on X · notes) - Cloudflare Durable Objects · tool · developers.cloudflare.com · check price
Cloudflare's stateful serverless primitive, mentioned as a possible storage backend for Pi Durable.
Also in: Durable AI Agents with Pi Durable and Cloudflare Durable Objects (Melvin Vivas on X · notes)
Try this
- Install Pi Durable from npm and start building durable agents.
- Read the Pi Durable source; it is small enough (about 15k lines of TypeScript) for you or your agent to read.
- Build a Slack-based agent on Pi Durable that survives process crashes and lets several team members steer it at the same time.
- Write a custom Pi Durable storage backend on Postgres, a key-value store or a Cloudflare Durable Object.
More in AI Agents, Tool Use & MCP
- Grok Bot Business Ideas Template: Daily Market Scan Agent
- Grok Bot Template Ideas: Credits Finder, Email, LinkedIn
- Coworker v0.7.2: Open-Source Desktop AI Assistant
- Email Assist Grok Bot template for inbox summaries
- X Researcher: a research bot the creator built on Grok
- Coworker: an open-source desktop AI assistant with scheduled jobs