Ably AI Transport x Temporal
Temporal handles the crash. Your users still lose the thread.
Temporal keeps your agent workflows running through crashes and retries. That's durable execution. Getting workflow output to every client, whether they stayed connected or not, requires durable sessions. Ably AI Transport drops into your stack as that layer - so the AI experience you ship holds up in production.

Three production gaps Temporal doesn't cover

When the workflow replays, your user gets the message again
Temporal's replay model is deterministic by design. Any send outside an activity fires again on replay. The workflow logs show one run - but the user gets the response twice.

The workflow survives the crash, but the token stream gets cut
When a worker crashes, Temporal keeps running. But the HTTP stream carrying tokens to your user's browser doesn't. That means a completed workflow still leaves the user staring at a blank screen or a half-finished reply.

The signal arrives, but the UI doesn’t know
A Temporal signal can resume a waiting workflow, but there’s no built-in way to tell the frontend it happened. The user clicks Approve, sees a spinner, and clicks again. Now there are two approvals in the workflow, and what happens next depends on whether you planned for that.
Where AI Transport comes in
Temporal handles execution. AI Transport handles everything after.
Both layers solve different problems, and together they cover what neither handles alone. Here's how the responsibilities divide and why they’re better together.
| Capability | ||
|---|---|---|
| Workflow durability | Temporal Yes
| Temporal + Ably AI Transport Yes
|
| Automatic retries and replay | Temporal Yes
| Temporal + Ably AI Transport Yes
|
| Delivering workflow output to a live client | Temporal No
| Temporal + Ably AI Transport Yes
|
| Session survives tab close / reconnect | Temporal No
| Temporal + Ably AI Transport Yes
|
| Multi-device continuity | Temporal No
| Temporal + Ably AI Transport Yes
|
| User visibility into long-running workflow | Temporal No
| Temporal + Ably AI Transport Yes
|
| Human-in-the-loop signal (approve, redirect, cancel) | Temporal No
| Temporal + Ably AI Transport Yes
|
| Multi-worker fan-in to one user session | Temporal No
| Temporal + Ably AI Transport Yes
|
| Enterprise proxy traversal for delivery | Temporal No
| Temporal + Ably AI Transport Yes
|
| Session diagnostics for user-facing side | Temporal No
| Temporal + Ably AI Transport Yes
|
| Replay-safe message delivery | Temporal No
| Temporal + Ably AI Transport Yes
|
“Ably gives us the reliable, low-latency AI transport we need for Messenger and Fin. No polling, no dropped messages, just a platform we can finally build next-generation AI experiences on. ”
Colin Kennedy
Principal Product Engineer
AI UX capabilities
What your Temporal workflow can do with AI Transport

Progress, as it happens
Without a session layer, the workflow runs silently. The user sees a spinner - or nothing. They don't know if it's working, stuck, or finished. AI Transport streams presence and progress events as the workflow executes, so the user sees where the agent is at every step, not just when it's done.

Reconnect without starting over
Let users drop and come back without losing anything. The session resumes from history the moment they reconnect. Without it, a dropped connection means a blank screen - the workflow keeps running, but the user has nothing to show for it.

Follow the user, not the tab
Make the result addressable from any device. A task kicked off on a laptop can complete on a phone. Without a session layer, the result sits on whichever tab the user started on - if they're still looking at it.

Approval that closes the loop
Accept approve, reject, or redirect signals from a real person and reflect them immediately in both directions - the agent resumes, the UI updates. Without it, the frontend has no way to know the signal landed.

One session, many workers
Let multiple workers and activities publish into the same user session without building fan-in logic yourself. Without it, multiple activities racing to reach the same user means ordering problems, duplicates, and logic you hand-roll and debug in production.

Send once, deliver once
Guarantee single delivery even when Temporal's replay model re-executes workflow code. Without it, a message send outside an activity fires again on replay - the workflow logs one run, the user gets it twice.
“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
Architecture
Where Ably sits next to Temporal
- Temporal: workflow orchestration, activities, signals, durable execution
- AI Transport: durable session layer between the workflow and the client
- Works with any Temporal SDK: Go, Java, TypeScript, Python, .NET
- Drop-in: doesn't touch your existing workflow or activity code
- Framework-agnostic on the client side: works with whatever you're using

See it in practice
How a Temporal activity becomes a durable delivery step
Each Temporal activity wraps one Step in AI Transport. The step ID is derived from the activity ID so when Temporal retries, the retry carries the same step ID and its output supersedes the failed attempt rather than duplicating it.
1
2
3
4
5
6
7
8
9
10
11
12
13
import { createAgentSession } from '@ably/ai-transport';
import { stepIdFor } from '@ably/ai-transport/temporal';
async function runInferenceStep({ runId, invocationId, triggerEventId }) {
const session = createAgentSession({ /* ... */ });
await session.connect();
const run = session.adoptRun({ runId, invocationId, triggerEventId });
await run.load();
const step = run.createStep({ stepId: stepIdFor(invocationId) });
await step.start();
await step.pipe(llmStream);
await step.end();
await session.detach();
}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

