Ably AI Transport x Vercel AI SDK
Every dropped connection, device switch, or handoff breaks the AI experience.
Vercel AI SDK handles the interface. AI Transport handles the session. Drop it into your existing Next.js app - no rewrites, no new infrastructure - and your sessions survive everything your users throw at them.

Better Together
What Vercel AI SDK was built to do - and where AI Transport steps in
HTTP streaming is the right default for most early builds. But as session requirements grow, the stateless model starts to fail. The ChatTransport interface exists for exactly this moment: swap the transport layer to Ably AI Transport without touching your application code.
| Capability | ||
|---|---|---|
| useChat hooks | Vercel + HTTP streaming Yes
| Vercel + Ably AI Transport Yes
|
| streamText calls | Vercel + HTTP streaming Yes
| Vercel + Ably AI Transport Yes
|
| Tool calling | Vercel + HTTP streaming Yes
| Vercel + Ably AI Transport Yes
|
| Streaming protocol | Vercel + HTTP streaming SSE over HTTP | Vercel + Ably AI Transport Yes
|
| Enterprise proxies | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Tab switch/reconnect | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Retry behavior | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Multi-device | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Mobile / React native | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Message persistence | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Barge-in/cancel | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Agent health | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Human takeover from agent | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Observability | Vercel + HTTP streaming No
| Vercel + Ably AI Transport Yes
|
| Certifications | Vercel + HTTP streaming Vercel platform - varies by plan | Vercel + Ably AI Transport Yes
|
AI UX Capabilities
The session layer your AI app needs in production
Add Ably AI Transport to your Vercel AI SDK stack and these capabilities become available in production across every device, connection type, and session length.

Multi-device sessions
useChat() ties the conversation to the tab. AI Transport makes it follow the user instead — same session, any device, instantly.

Reconnection and recovery
SSE drops the stream when the connection breaks. AI Transport resumes from the exact token, with nothing lost.

Interruption and barge-in
streamText() locks input until it's done. AI Transport gives users the controls: redirect mid-stream, context intact, no restart.

Agent presence and visibility
Tool calls run server-side, out of sight. AI Transport makes every step visible - streamed to the client as it happens.

Multi-agent coordination
streamText() has no concept of other agents. AI Transport adds the coordination layer — agents see each other's presence, handoffs carry full context, and no two agents step on the same response.

Human handover
The agent's context lives in the stream. AI Transport makes it persistent. The operator joins with full history, mid-stream if needed. No cold start.
Integration
Three lines. That's the integration.
Vercel AI SDK's ChatTransport interface was designed for exactly this. AI Transport implements it. Swap the transport, the rest of your application code stays the same.
1
2
3
4
5
6
7
// Before: default HTTP transport
const { messages } = useChat()
// After: Ably transport (everything else stays the same)
const transport = useClientTransport({ channelName: chatId })
const chatTransport = useChatTransport(transport)
const { messages } = useChat({ transport: chatTransport })Architecture
Where Ably sits in your stack
- Vercel AI SDK: implements ChatTransport directly. One line to wire up
- LLM-agnostic: OpenAI, Anthropic, Google, local models
- Also works with: LangGraph, ag-ui
- Languages: TypeScript, JavaScript, React
- Future-proof: Switch models without touching your UX layer
- Drop-in: Works alongside your existing Vercel APIs and tools

“Ably makes realtime just work. When we needed to get Breeze (our AI assistant) working in production, Ably was an obvious choice for us. It's reliable, efficient and our collaboration with the Ably team helps the engineering team build that much faster.”
Whitney Sorenson
Chief Architect, HubSpot Next
Performance
Performance isn’t an aspiration. It’s engineered into every layer of our platform, from protocol optimizations to global edge acceleration.
<6.5ms
message delivery latency
30B+
connections opened monthly
Integrity
Ably guarantees data integrity, so you don’t have to reinvent resilience in your own code. Your data arrives exactly how and when it should.
5+ years
since last outage
99.999999%
message survivability
Reliability
Service interruptions cost money and trust. That’s why Ably is fault-tolerant at every level - regionally and globally.
2B+
connected devices per month
2T+
API operations per month
Availability
Ably elastically scales with demand. Our platform is globally distributed and designed to maintain high availability under peak loads.
700+
points of presence
11
globally distributed regions
Start building with Ably today

