Ably AI Transport v0.4.0 shipped this week with database hydration, a mechanism for reconciling persisted conversation history with live session state so both the agent and the client can rebuild their views from the same two sources without redundant re-fetching.
AI agent sessions often need to survive page reloads, device switches, and server restarts. Previous versions of Ably AI Transport handled realtime streaming and bidirectional control between clients and agents but left persistence entirely to the application. The v0.4.0 release, documented by Ably, defines a symmetric hydration pattern: as each run completes, the agent writes its immutable messages to an external database; on load, both the agent and the client read stored history and call loadUntil to fetch only messages newer than the latest stored entry, stitching the two halves together without gaps or duplicates.
Ably AI Transport exposes run.messages to capture a completed run as a single immutable array, including any suspend-and-resume cycles. React developers get a useMessagesWithSeed hook; Vercel AI SDK users get a useMessageSync wrapper that runs the same reconciliation, keeping hydration compatible with useChat. The use-chat-db reference implementation is available in the GitHub repository.
The practical effect is that stateful AI applications, including chat histories, multi-step agent workflows, and analytics layers, can now place a standard database underneath an Ably AI Transport session without custom reconciliation logic. The package is available via npm (npm install @ably/ai-transport), and an Ably free-tier account covers the API key needed to run a session.
Ably AI Transport sits in a small category of libraries targeting the transport and session layer for AI agents, alongside Anthropic's Model Context Protocol and various pub/sub adapters. Where MCP focuses on tool connectivity, Ably AI Transport handles the realtime channel between agent and client, including resumable streaming and multi-device continuity. Database hydration addresses the concrete gap of what happens to a long-running session when the page reloads.













