---
title: "Pi Durable"
description: "Pi Durable is an experimental TypeScript harness, shipped alongside Pi 1.0, for long-running agents that survive crashes, run many conversations concurrently, and run wherever a JavaScript runtime exists."
url: "https://swe.quest/articles/pi-durable-d581499965d178c8"
canonical: "https://earendil.com/posts/pi-durable/"
source: "Earendil"
published: "2026-10-01"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 20
tags: ["ai-agents","resilience","typescript","llms"]
---

# Pi Durable

A post on [Earendil](https://swe.quest/sources/earendil.md), published 2026-10-01, 20 min read, Announcement. Original: [https://earendil.com/posts/pi-durable/](https://earendil.com/posts/pi-durable/)

## Summary

Pi Durable is an experimental TypeScript harness, shipped alongside Pi 1.0, for long-running agents that survive crashes, run many conversations concurrently, and run wherever a JavaScript runtime exists. Every model call and tool call is a checkpointed task over a pluggable storage backend (memory, SQLite, JSONL). After a restart, interrupted model requests are resent, and tools rerun only if marked replay-safe; otherwise the model is told the call was interrupted. requestIds make submissions exactly-once, conversations can fork without copying history, and extensions bundle prompt sections, tools, wraps and hooks, so subagents take only a few lines of code.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM agents and tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- TypeScript async programming ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))

## Keywords

Pi Durable, Pi, pi-ai, Earendil, SQLite, Cloudflare Durable Objects

## Related posts

- [Pi Durable on Cloudflare](https://swe.quest/articles/pi-durable-on-cloudflare-1b649cdf3e489964.md): Earendil · 2026-10-16 · Medium · 8 min read · AI agents, Serverless, SQLite, Real-time systems, TypeScript
  A multiplayer chat agent built on Pi Durable maps each agent session to one SQLite-backed Cloudflare Durable Object, so idle agents hibernate instead of holding a running machine.
- [Scaling Managed Agents with stable interfaces](https://swe.quest/articles/scaling-managed-agents-with-stable-interfaces-06b4cb4f85923c79.md): Anthropic Engineering · 2026-04-08 · Medium · 9 min read · AI agents, System design, Sandboxing & isolation, Resilience, LLMs
  Claude Managed Agents splits a long-running agent into three virtualized interfaces: an append-only session log, a stateless harness that calls Claude and routes tool calls, and sandboxes reached through a generic \`execute(name, input) → string\` tool call.
- [Resilience testing your agents on Amazon Bedrock AgentCore](https://swe.quest/articles/resilience-testing-your-agents-on-amazon-bedrock-agentcore-76ec5d1f5931c6f8.md): AWS Architecture Blog · 2026-11-18 · Medium · 11 min read · Chaos engineering, AI agents, Resilience, Observability, Cloud platforms
  AWS Fault Injection Service can drive tool-level faults inside a Strands agent running on Amazon Bedrock AgentCore, using an SSM Automation action that toggles chaos parameters in Parameter Store.
- [From model to agent: Equipping the Responses API with a computer environment](https://swe.quest/articles/from-model-to-agent-equipping-the-responses-api-with-a-computer-environment-102e043c05e5f9e2.md): OpenAI · 2026-03-11 · Medium · 10 min read · AI agents, LLMs, Sandboxing & isolation, System design
  OpenAI's Responses API now pairs with a shell tool and hosted container workspace so models can run multi-step agent workflows.
- [Deterministic AI Testing with Session Recording in cagent](https://swe.quest/articles/deterministic-ai-testing-with-session-recording-in-cagent-aad4a70e828b2b3b.md): Docker · 2026-01-06 · Medium · 2 min read · AI agents, Testing, CI/CD
  cagent's session recording applies the VCR pattern to AI agents.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
