Container Orchestration

2026-05-07 13:08:36

How Long-Running AI Agents Outgrow HTTP: Ably's Durable Session Solution

HTTP fails for long-running AI agents requiring persistent sessions. Ably provides a durable session layer for real-time communication.

The Shift from Human Collaboration to AI Communication

In a recent episode of The New Stack Makers, Matthew O'Riordan, CEO and co-founder of Ably, discussed how a platform originally engineered for real-time human collaboration is now solving critical challenges for long-running AI agents. Ably handles trillions of transactions monthly for clients like HubSpot and Intercom. Its infrastructure, built to manage presence, message ordering, state synchronization, and reconnection for human users, has proven unexpectedly well-suited for the emerging needs of AI agents that operate over extended periods.

How Long-Running AI Agents Outgrow HTTP: Ably's Durable Session Solution
Source: thenewstack.io

"We're just very well suited to solving this communication layer between agents and humans," O'Riordan noted, explaining that the company's technology naturally extends to the agent-human interaction paradigm.

Why HTTP Becomes a Bottleneck for Persistent Agents

Most AI applications start with HTTP. It's the default transport for popular frameworks like LangGraph and works perfectly for simple, one-shot chatbot completions. However, as agents evolve into long-running processes that reason over multiple steps and call dozens of tools, HTTP's request-response model begins to fail.

The Problem with Stateless Communication

A long-running agent session may last hours. During that time, users might switch tabs, change devices, or interrupt the agent mid-stream. HTTP, being stateless and connectionless, cannot maintain a continuous session across these events. Connection drops, tab switches, or user interruptions all break the flow, forcing developers to build complex workarounds to preserve state and context.

"HTTP isn't the wrong transport tool," O'Riordan explained. "It is exactly what you need to get up and running." But expectations have shifted because users are accustomed to the seamless experience of products like ChatGPT and Claude. "What most people are doing is they click between tabs and they just expect the experience. You ask it something, it takes a while, you go away, you come back five minutes later to a different tab, and you expect everything to just be in sync."

The Emergence of Durable Sessions

Developers have started using the term "durable sessions" to describe the infrastructure layer required for persistent agent interactions. O'Riordan credits EMQX, the MQTT broker, with originating the term and ElectricSQL with popularizing it for AI contexts. He prefers "durable sessions" over "durable streams" because streams address only part of the requirement—a complete session also encompasses presence, shared state, and storage.

Key Components of Durable Sessions

  • Presence: Knowing who or what is connected and their status.
  • Ordering: Ensuring messages from agents and tools arrive in the correct sequence.
  • State Synchronization: Maintaining a consistent view of the session across all participants.
  • Reconnection: Gracefully restoring connectivity after drops or device changes.

Ably's Approach: Beyond Pub/Sub

Ably's platform has always provided these capabilities for human users, but the company now encourages developers to think beyond traditional pub/sub patterns. Instead, they should adopt a session-oriented model that treats the entire interaction as a durable, long-lived relationship. This means building around stateful connections that can survive network interruptions, device changes, and even user absence.

How Long-Running AI Agents Outgrow HTTP: Ably's Durable Session Solution
Source: thenewstack.io

"This is what we've been building for humans to communicate. And agents are becoming more human-like," O'Riordan said. "I'd love to say we had the vision, and that's why we built it all, but it's not. We're just very well suited to solving this communication layer between agents and humans."

How Durable Sessions Enable Next-Generation AI

With a durable session layer, developers can create AI agents that:

  • Maintain context across multiple tool calls and reasoning steps.
  • Allow users to interrupt, ask questions, or provide feedback mid-session.
  • Recover automatically from network outages or client switches.
  • Deliver real-time updates as agents process tasks, even when users are away.

This approach transforms the agent from a simple request-response bot into a collaborative partner that can persist through the natural workflow of human interaction.

Looking Ahead: The Infrastructure for AI Collaboration

As AI agents become more autonomous and longer-running, the limitations of HTTP will become more pronounced. The industry is converging on durable sessions as the foundational paradigm. Ably, with its decade of experience in real-time infrastructure, is well positioned to provide the communication layer that both humans and agents need.

For developers building next-generation AI applications, shifting from stateless HTTP to durable, session-based communication may be the key to creating the seamless, reliable experiences that users now expect. As O'Riordan concluded, the future belongs to platforms that can manage the complexity of long-running agent interactions without requiring developers to reinvent the wheel.