Pi Durable on Cloudflare
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. The harness reopens in the object constructor under blockConcurrencyWhile, restores per-WebSocket event streams after hibernation, and makes conversation creation and message submission idempotent with request-ID receipts stored in the same commit. Pi's many task deadlines are collapsed onto the single Durable Object alarm, which is recomputed idempotently on each wake, with short recovery alarms for interrupted work. A replay-safe search_history tool delegates cross-conversation retrieval to a task-owned subagent conversation, and only the final answer returns to the parent.
Related posts
- chDB Durable Layer for agent memory
ClickHouse mediumAdept
chDB Durable Layer wraps the embedded chDB (ClickHouse) OLAP engine so a local MergeTree working copy can be published to object storage you own (S3, GCS, Azure) and recovered on another host. Writes stay local until an explicit flush(), checkpoint() folds the statement WAL into a new base snapshot, and a head.json record updated with conditional writes provides a single-writer lease with fencing. It targets agent memory, keeping recall as an in-process query (local was 58x faster than remote in their benchmark) while making state survive ephemeral sandboxes and CI. Recommended practices include append-only versioned memory tables, ZSTD-compressed cold evidence with blobs stored outside the table, flushing at task boundaries, and moving to a server database when multiple writers are needed.
- Building Agents that Don't Break Themselves
Fly.io mediumAdeptSeparate where an agent lives from where it executes code: keep the agent loop on a durable host and send every shell command to a disposable Sprite sandbox. SpriteDoc, an internal multi-user troubleshooting agent built on Pi, creates one Sprite per session on first filesystem use and tears it down when idle. It injects each user's flyctl token only for the duration of a single command, so no credential ever rests in the sandbox. Kyle's Hermes Agent backend instead keeps one persistent Sprite per task and skips dangerous-command approval prompts because the sandbox is the security boundary. Copy-on-write checkpoints let an agent that deletes its own work and toolchain be restored in about nine seconds.
- The Missing Abstraction for AI Agents: The Agent Filesystem
Turso mediumAdeptAgentFS is an SDK that stores all of an AI agent's state in a single SQLite (Turso) database file: a POSIX-like virtual filesystem, a key-value store, and an append-only tool call audit log. The filesystem side uses separate inode and dentry tables, mirroring kernel design. Key-value entries are JSON-serialized values in a single table, and tool call rows are never mutated, which keeps the history auditable. Keeping everything in one file makes agent runs snapshottable by copying it, debuggable with SQL, and portable across sandboxes. TypeScript and Rust SDKs are available, along with a Mastra-based research assistant example and later FUSE support for mounting the filesystem on Linux.
- Building AI Agent Databases: A Complete Guide to Database-per-Agent Architecture
Turso mediumAdeptGiving each AI agent its own SQLite-style database, instead of sharing tables keyed by tenant_id or using schema-per-tenant, makes isolation, debugging and cleanup trivial: deleting an agent is a single API call. Four patterns are shown on Turso: a cloud database per agent, embedded on-device databases, embedded databases synced to the cloud via push/pull, and hub-and-spoke with a shared coordination database, plus native F32_BLOB vectors with cosine-distance search for per-agent semantic memory. Per-request billing means idle or nearly idle agent databases cost little beyond storage. The main tradeoffs are cross-agent analytics, which need fan-out queries or a separate aggregate store, and the lack of ACID guarantees across agents, so the pattern suits many agents with independent state rather than a few with heavy cross-agent queries.
- chDB as the Agent's Local Data Engine
ClickHouse mediumAdept
Embedding chDB, the in-process ClickHouse engine, inside an agent keeps hot data local, so tool-call latency is bounded by CPU instead of network round trips, jitter and retries. Agent memory is modeled as an append-only MergeTree table with version and soft-delete columns, which supports semantic recall via cosineDistance, full history and point-in-time queries, plus an optional ReplacingMergeTree materialized view for current state. chDB also acts as a federation hub that joins S3, Postgres, remote ClickHouse and Pandas in one query. The central argument is that over N sequential calls failures compound as (1−p)^N, and each failed call triggers full-context retries and detours, so localizing data cuts token spend as well as latency; the piece closes by pairing chDB with AWS Lambda MicroVMs.