Why AI Transport

zknill1 pts0 comments

Ably Realtime | Why AI Transport

DocsDocumentationExamples

Ask AILoginStart free

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Platform

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Ably Pub/Sub

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Ably Chat

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold text-neutral-1300 dark:text-neutral-000" data-radix-collection-item="">Ably AI Transport<br>svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Overview<br>svg]:rotate-90 rounded-lg text-neutral-1300 dark:text-neutral-000 font-bold" data-radix-collection-item="">Why AI Transport<br>svg]:rotate-90 rounded-lg border-l dark:border-neutral-1000 hover:border-neutral-500 dark:hover:border-neutral-800 rounded-l-none text-neutral-1300 dark:text-neutral-000 font-bold border-orange-600 bg-orange-100 hover:bg-orange-100" data-radix-collection-item="">Overview<br>svg]:rotate-90 font-medium rounded-lg border-l border-neutral-300 dark:border-neutral-1000 hover:border-neutral-500 dark:hover:border-neutral-800 rounded-l-none" data-radix-collection-item="">HTTP streaming and AI

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Concepts

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Getting started

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Frameworks

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Features

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Going to production<br>svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">API reference

svg]:rotate-90 font-medium rounded-lg" data-radix-collection-item="">Internals

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Ably Spaces

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Ably LiveObjects

svg]:rotate-90 data-[state=open]:border-b data-[state=open]:sticky data-[state=open]:top-0 h-12 px-4 py-3 font-bold" data-radix-collection-item="">Ably LiveSync

Looking for machine-readable content?<br>View this page as Markdown<br>Browse all documentation pages (llms.txt)<br>Tip: Request pages with Accept: text/markdown header or use a recognized LLM user agent to receive markdown directly.

Why AI Transport<br>Direct HTTP streaming breaks down once an AI app is in production. AI Transport replaces a single HTTP connection with a durable session that any participant connects to.<br>Open in

Most AI frameworks connect a client to an agent over an HTTP request and streamed response. The pattern is simple and every framework supports it, and it works for one-off interactions and demos. It also limits everything that comes after that first interaction.

Streams die with the connection. Sessions cannot span devices. Clients have no mechanism to re-contact the agent once the original request is in flight. Each of these is a real production problem; together they bound the quality of AI experiences you build on direct HTTP streaming. See HTTP streaming and AI for the detail.

A durable session changes the model

These problems share a root cause. The transport is coupled to the interaction. The connection, the request, and the streamed response are ephemeral: they exist for one interaction, for one client and one agent. Once the HTTP connection is lost, so is the interaction between client and agent.

The shape that engineering teams are adopting is the durable session: a shared, persistent medium that any client or agent connects to, instead of a single HTTP request between one client and one agent.

A durable session provides three capabilities that direct HTTP streaming does not:

Resilient delivery. Streams survive connection drops, device switches, page refreshes, and process restarts. The client resumes from a known position. The agent continues publishing regardless of client connectivity. No events are lost and no events are duplicated.

Continuity across surfaces. The session follows the user, not the connection. Open a second tab, switch to a phone, come back hours later. Every surface sees the same session state. Any client with the session identifier attaches and hydrates the same conversation state.

Live control. Clients have a bi-directional stream to communicate with the agent and steer its processing while work is in progress. Cancel a generation from a different device. Steer an agent mid-response. Send a follow-up before the current response finishes.

This changes what is...

data state open rotate font radix

Related Articles