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.

Trusted by brands serious about realtime
View customer stories

Three production gaps Temporal doesn't cover

When the workflow replays, your user gets the message again

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

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

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 durabilityTemporal

Yes

  • Survives crashes and restarts
Temporal + Ably AI Transport

Yes

  • Survives crashes and restarts
Automatic retries and replayTemporal

Yes

  • Activities retry automatically on failure
Temporal + Ably AI Transport

Yes

  • Activities retry automatically on failure
Delivering workflow output to a live clientTemporal

No

  • No built-in path to a frontend
Temporal + Ably AI Transport

Yes

  • Output is streamed as the workflow progresses
Session survives tab close / reconnectTemporal

No

  • Client has no way to resume
Temporal + Ably AI Transport

Yes

  • Client resumes from last position on reconnect
Multi-device continuityTemporal

No

  • Each device must poll independently
Temporal + Ably AI Transport

Yes

  • Any device joins the same session and catches up
User visibility into long-running workflowTemporal

No

  • Users see nothing until the workflow completes
Temporal + Ably AI Transport

Yes

  • Agent state and progress stream to clients in real time
Human-in-the-loop signal (approve, redirect, cancel)Temporal

No

  • Signals work backend-to-backend but don't reach the user
Temporal + Ably AI Transport

Yes

  • Signals travel both ways over the durable session
Multi-worker fan-in to one user sessionTemporal

No

  • Each worker runs independently with no shared user session
Temporal + Ably AI Transport

Yes

  • Multiple workers publish to one session, user sees one stream
Enterprise proxy traversal for deliveryTemporal

No

  • Temporal has no transport layer for browser delivery
Temporal + Ably AI Transport

Yes

  • Automatically falls back to HTTP streaming if WebSocket is blocked
Session diagnostics for user-facing sideTemporal

No

  • Execution history only; nothing for the frontend session
Temporal + Ably AI Transport

Yes

  • Connection state, presence, and delivery events surfaced in real time
Replay-safe message deliveryTemporal

No

  • Workflow code outside activities fires again on every replay
Temporal + Ably AI Transport

Yes

  • Step IDs with AI Transport deduplicate delivery across retries and replays

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

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

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

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

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

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

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 owns the workflow. AI Transport owns the session.
  • 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
Where Ably sits next to Temporal image

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.

JavaScript

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

Light style