Pi Durable on Cloudflare: building hibernation-ready multiplayer chat agents on Durable Objects
ritakozlov · x · 2026-10-16
Earendil Engineering published a hands-on walkthrough for Pi Durable, their harness for long-running agents, on Cloudflare Durable Objects — building a multiplayer chat agent.
Key technical points:
- Architecture: React client → PartySocket → Worker routes by session ID → SQLite-backed Durable Object → model provider
- One Pi session maps to one Durable Object; embedded SQLite persists conversations and tasks
- Hibernatable WebSockets let the object shut down when idle and wake on requests, WebSocket messages, or alarms — avoiding always-on machines for idle agents
- Each session manages multiple conversations, with a subagent for cross-conversation search
- App-defined presence updates and conversation events share the same WebSockets for multiplayer sessions
The motivation: most agents sit idle for long periods after responding, wasting compute. Durable Objects' hibernate/wake model fits this workload. A downloadable multiplayer demo is included.
More from coding & agent
- Confirmed: AI assistant Instinct fetches web pages via Exa, with signed Web Bot Auth requests — gaganghotra_ · 2026-10-17
- Four Gemini 4 Argon agents beat Minecraft in 27 hours, writing 2,783 programs — GoogleDeepMind · 2026-10-17
- Dev prompts agent to add traces everywhere and self-diagnose his slow CLI — DanielLockyer · 2026-10-17
- Solo dev open-sources chrome-controlla, a Chrome-focused computer use MCP — Swimming_Ask3859 · 2026-10-17
- OpenCode makes Claude Opus 4.5's 'typing really fast' free for all developers — andrew_n_carr · 2026-10-17
- open-science: open-source local-first AI research workbench hits 5k GitHub stars — rohanpaul_ai · 2026-10-17