@jiangkoumo_: Pi officially published a tutorial on building a multi-user Agent on Cloudflare Durable Objects. A single Durable Object corresponds to one session, with state stored in the built-in SQLite. Multiple users can share the same link to join the same session and chat collaboratively…
Summary
Pi officially published a tutorial on building a multi-user Agent on Cloudflare Durable Objects: a single Durable Object maps to one session, state is stored in built-in SQLite, and it supports multiple users sharing a link to chat collaboratively, as well as scheduled wake-up tasks. The tutorial also demonstrates an isolated design for session retrieval, idempotent request handling, and a mechanism for sharing a single alarm across multiple tasks.
View Cached Full Text
Cached at: 10/17/26, 06:51 AM
Pi has published an official tutorial on building multiplayer agents on Cloudflare Durable Objects. A single Durable Object corresponds to one session, with state stored in the built-in SQLite. Multiple users can share the same link to join the same session and collaborate in chat. The tutorial also demonstrates waking up two minutes later to check the weather after the browser tab is closed.
The session retrieval in the tutorial uses an isolated design. The main conversation dispatches the search-history task to a subagent, which only receives a plain-text substring search tool. It only searches top-level user and assistant messages within the same session, explicitly excluding itself and messages generated by previous retrievals — preventing retrieved results from becoming evidence for subsequent retrievals.
The raw match records and intermediate tool calls from retrieval stay in the sub-conversation; the main conversation only receives a brief conclusion with a conversation ID. The prompt explicitly instructs the agent to reply “not found” directly when nothing matches.
When a Durable Object is evicted or the retrieval tool is replayed, the code recovers the original sub-conversation by task ID and continues execution. When creating a conversation, the request ID’s acknowledgment is committed to storage alongside the new conversation, so resending the same request after a disconnect won’t create duplicates — concurrent submissions are queued in a durable inbox.
Expiry times for multiple tasks are projected onto a single underlying alarm. The official tutorial notes that alarms may fire more than once, so task-handling logic must be idempotent; external calls cannot inherently guarantee exactly-once execution.
This architecture is a useful reference for anyone building cross-conversation in-session retrieval or scheduled-task agents. The official demo deliberately omits authentication; we only reviewed the official tutorial and did not deploy or run it locally.
Similar Articles
@realfxw: Running Multi-Agent systems in a distributed architecture, the biggest fear isn't slow model inference — it's "state loss" and "coordination deadlocks". Recently, many Agent teams have been discussing migrating orchestration logic to the edge. Paired with Cloudflare Durable Objects (…
The article introduces an edge-based multi-agent orchestration approach using Pi Durable Objects on Cloudflare: each session is mapped to a stateful Durable Object, enabling state persistence, sleep/wake cycles, and parallel sub-agent scheduling — eliminating the traditional heavy backend architecture built on Redis and message queues.
@xiaomovps: I deployed PI Durable directly to CloudFlare, achieving one-click deployment, and fully utilizing free resources Becaus…
作者将 PI Durable 项目直接部署到 Cloudflare,利用 Workers、Durable Objects、SQLite 存储等免费资源实现一键部署与开源的个人 Agent 方案,支持自定义 API 端点与任务唤醒。
@omarsar0: Own your personal agent, folks. Just built my own little personal agent with @pidotdev's Pi Durable. I wanted to see ho…
A developer showcases building a personal agent with Pi Durable, highlighting checkpointed durable execution, persistent memory across sessions, scheduled jobs with durable approvals, and a full Linux desktop environment each agent 'Space' can control, with model routing via OpenRouter and plans to open-source the setup.
@JoshARosen: https://x.com/JoshARosen/status/2107840212915077350
一篇架构对比文章,分析 Pi Durable 与 OpenCode 的设计差异:Pi Durable 将模型生成、工具调用等序列化为可调度的持久任务,使工作不再绑定于单个进程,而传统会话式 harness(如 OpenCode、Claude Code、Codex)仍依赖进程内的活动 agent 循环。
@NFTCPS: After trying it out, flipping through sessions and switching branches in the terminal is a real pain. The pi coding agent released a web version, pi-web, where you can do these things directly in the browser: view session list, grouped by working directory, chat with the agent in real-time, switch models mid-conversation, fork from any message, or rollback…
The pi coding agent has launched a web version, pi-web, offering session management, real-time conversation, branch navigation, and more, which can be quickly run via npx.