NEW

Human approvals are GA

v2.4

Code that finishes

what it started.

Relay is a durable workflow engine for AI agents and long‑running jobs. Write steps in TypeScript or Python; Relay checkpoints each one, retries the flaky ones, waits days for a human when it has to, and traces all of it. When a worker dies at 3 a.m., the run doesn’t.

MIT-licensed SDKs · Cloud or self-hosted · No card to start

↑ A real run, compressed: one rate limit, one retry, one human, zero pages.

Approval wait fast‑forwarded · compute billed only while steps run

Approval wait fast‑forwarded · compute billed only while steps run

Running in production at teams who deleted their retry loops

01

/

Why steps

Your agent calls a model, the model calls a tool, the tool calls an API that times out on the fourth try — and somewhere in there, a deploy rolls your pods. Relay turns each of those calls into a step and saves it the moment it returns. The next attempt starts where the last one fell over, not at the top of the file.

— checkpoint after every step

— exactly-once results, at-least-once execution

— no DSL, no YAML

02

/

Principles

We can’t stop your code from failing.

We can make it not matter.

Three guarantees, each with the mechanism behind it. No magic, just a very stubborn state machine.

02

/

Principles

We can’t stop your code from failing.

We can make it not matter.

Three guarantees, each with the mechanism behind it. No magic, just a very stubborn state machine.

02

/

Principles

We can’t stop your code from failing.

We can make it not matter.

Three guarantees, each with the mechanism behind it. No magic, just a very stubborn state machine.

Durable

01

reindex-docs · 5 steps

completed · 0 steps repeated

ckpt 1

2

3

4

5

done

Without a checkpoint

crash at step 4 → start over at step 1

With Relay

crash at step 4 → resume at step 4; 1–3 come from the store

Every step is a save point.

Relay records a step’s result the moment it returns. Crashes, deploys and evicted pods resume from the last checkpoint, and completed steps hand back their stored output instead of running twice.

Durable

01

reindex-docs · 5 steps

completed · 0 steps repeated

ckpt 1

2

3

4

5

done

Without a checkpoint

crash at step 4 → start over at step 1

With Relay

crash at step 4 → resume at step 4; 1–3 come from the store

Every step is a save point.

Relay records a step’s result the moment it returns. Crashes, deploys and evicted pods resume from the last checkpoint, and completed steps hand back their stored output instead of running twice.

Observable

02

tail · all workflows

p95 1.9s · err 0.3%

  • 14:02:11.931

    run_K4tm

    step.completed embed

    2.61s

  • 14:02:12.604

    run_Wq7c

    step.started summarize

  • 14:02:13.188

    run_d2Hx

    step.completed classify

    0.41s

  • 14:02:13.772

    run_Pn8e

    step.failed fetch-page

    ETIMEDOUT

  • 14:02:14.315

    run_Pn8e

    step.retrying fetch-page

    in 4s

  • 14:02:15.047

    run_s9Lv

    run.completed onboard

    11.8s

  • 14:02:15.590

    run_8fK2

    approval.requested refund

    48h

  • 14:02:16.402

    run_Jm3a

    sleep.started drip-email

    3d

See the run, not just the logs.

Every run, step, retry and model call is a span — inputs, outputs and token counts included. It exports OpenTelemetry, so it lands in the dashboards you already stare at.

Observable

02

tail · all workflows

p95 1.9s · err 0.3%

  • 14:02:11.931

    step.completed embed

    2.61s

  • 14:02:12.604

    step.started summarize

  • 14:02:13.188

    step.completed classify

    0.41s

  • 14:02:13.772

    step.failed fetch-page

    ETIMEDOUT

  • 14:02:14.315

    step.retrying fetch-page

    in 4s

  • 14:02:15.047

    run.completed onboard

    11.8s

  • 14:02:15.590

    approval.requested refund

    48h

  • 14:02:16.402

    sleep.started drip-email

    3d

See the run, not just the logs.

Every run, step, retry and model call is a span — inputs, outputs and token counts included. It exports OpenTelemetry, so it lands in the dashboards you already stare at.

Human-in-the-loop

03

Pause for a human. For days, if that’s what it takes.

Call approval() and the run parks itself: no worker held, no compute billed. Approve from email, the CLI, the API or a signed webhook, and decide ahead of time what happens when nobody answers.

email

relay approve

REST

webhook

timeout → escalate

Approval requested

refund-agent · run_8fK2Lm

expires in 47:59:58

Refund €1,240.00 for order #88213?

Agent’s reasoning

Customer was charged twice on 12 Sep (txn …4471 and …4472). The ledger confirms the duplicate, and the amount is within policy for a first occurrence.

Approve refund

Reject

or relay approve run_8fK2Lm

classify

✓ 0.8s

check-ledger

✓ 1.1s

approval

waiting · 0 cpu

issue-refund

queued

email-customer

queued

Run parked. No worker is holding it.

Human-in-the-loop

03

Pause for a human. For days, if that’s what it takes.

Call approval() and the run parks itself: no worker held, no compute billed. Approve from email, the CLI, the API or a signed webhook, and decide ahead of time what happens when nobody answers.

email

relay approve

REST

webhook

timeout → escalate

Approval requested

refund-agent · run_8fK2Lm

expires in 47:59:58

Refund €1,240.00 for order #88213?

Agent’s reasoning

Customer was charged twice on 12 Sep (txn …4471 and …4472). The ledger confirms the duplicate, and the amount is within policy for a first occurrence.

Approve refund

Reject

or relay approve run_8fK2Lm

classify

✓ 0.8s

check-ledger

✓ 1.1s

approval

waiting · 0 cpu

issue-refund

queued

email-customer

queued

Run parked. No worker is holding it.

Human-in-the-loop

03

Pause for a human. For days, if that’s what it takes.

Call approval() and the run parks itself: no worker held, no compute billed. Approve from email, the CLI, the API or a signed webhook, and decide ahead of time what happens when nobody answers.

email

relay approve

REST

webhook

timeout → escalate

Approval requested

refund-agent · run_8fK2Lm

expires in 47:59:58

Refund €1,240.00 for order #88213?

Agent’s reasoning

Customer was charged twice on 12 Sep (txn …4471 and …4472). The ledger confirms the duplicate, and the amount is within policy for a first occurrence.

Approve refund

Reject

or relay approve run_8fK2Lm

classify

✓ 0.8s

check-ledger

✓ 1.1s

approval

waiting · 0 cpu

issue-refund

queued

email-customer

queued

Run parked. No worker is holding it.

03

/

The SDK

Workflows are functions. Steps are receipts.

No DSL, no YAML, no drag-and-drop canvas. Wrap anything that talks to the outside world in step() and Relay writes down what happened. On replay, it reads the receipt instead of calling the API again.

step

(id, fn)

Runs once, stores the result, retries on throw.

step

(id, fn)

Runs once, stores the result, retries on throw.

sleep

("7d")

Pause for seconds or months. The process exits; the run keeps its place.

sleep

("7d")

Pause for seconds or months. The process exits; the run keeps its place.

run.approval

(id)

Park until a human says yes, no, or nothing at all.

run.approval

(id)

Park until a human says yes, no, or nothing at all.

step.map

(id, xs, fn)

Fan out with concurrency limits and per-item retries.

step.map

(id, xs, fn)

Fan out with concurrency limits and per-item retries.

schedule

: cron

Cron with IANA time zones. DST included — see the changelog for our apology.

schedule

: cron

Cron with IANA time zones. DST included — see the changelog for our apology.

Read the SDK reference

TypeScript

Python

workflows/reconcile.ts

Copy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

import { workflow, step, sleep } from "@relay/sdk";
import { billing, reports } from "./lib";

export const reconcile = workflow({
id: "reconcile-invoices",
schedule: { cron: "0 3 * * *", tz: "Europe/Helsinki" },
timeout: "2h",
}, async ({ run }) => {
const unpaid = await step("list-unpaid", () =>
billing.invoices.list({ status: "unpaid" }));

const chased = await step.map("chase", unpaid, {
concurrency: 20,
retries: { max: 5, backoff: "exponential" },
}, (inv) => billing.remind(inv.id));

if (chased.failed.length > 0) {
await run.approval("escalate", {
notify: ["email:finance@acme.dev", "webhook:ops"],
payload: chased.failed,
timeout: "24h",
});
}

// Yes, a week. The process can exit; the run can't.
await sleep("7d");
return step("report", () => reports.weekly(chased));
});

npm i @relay/sdk · Node 20+, Bun, Deno

runs nightly at 03:00 Helsinki

04

/

Traces

Every step, attempt and token on one timeline.

Tracing is on by default and speaks OpenTelemetry. Click a span for inputs, outputs, retries and exactly what the model said, then replay the run on your laptop from that point, with recorded results instead of live calls.

04

/

Traces

Every step, attempt and token on one timeline.

Tracing is on by default and speaks OpenTelemetry. Click a span for inputs, outputs, retries and exactly what the model said, then replay the run on your laptop from that point, with recorded results instead of live calls.

04

/

Traces

Every step, attempt and token on one timeline.

Tracing is on by default and speaks OpenTelemetry. Click a span for inputs, outputs, retries and exactly what the model said, then replay the run on your laptop from that point, with recorded results instead of live calls.

Runs/research-agent/run_7Hk2Qp
Completed8.42s active · 4m 02s paused · 12 spans

05

/

Built for failure

Go on.

Kill the worker.

Workers die, deploys roll, spot instances vanish mid-sentence. Relay leases each run to one worker and checkpoints after every step. If the lease lapses, another worker picks up at the last checkpoint. No double charges, no duplicate emails, no 3 a.m. archaeology.

05

/

Built for failure

Go on.

Kill the worker.

Workers die, deploys roll, spot instances vanish mid-sentence. Relay leases each run to one worker and checkpoints after every step. If the lease lapses, another worker picks up at the last checkpoint. No double charges, no duplicate emails, no 3 a.m. archaeology.

05

/

Built for failure

Go on.

Kill the worker.

Workers die, deploys roll, spot instances vanish mid-sentence. Relay leases each run to one worker and checkpoints after every step. If the lease lapses, another worker picks up at the last checkpoint. No double charges, no duplicate emails, no 3 a.m. archaeology.

reindex-knowledge-baserun_9Qe4TzQueued0.0s
  1. 01a
    crawlqueued
  2. 02a
    chunkqueued
  3. 03a
    embedqueued
  4. 04a
    dedupequeued
  5. 05a
    upsertqueued
  6. 06a
    notifyqueued
worker-apool-eu-1 · pid 4412

standby · polling for work

steps run 0312 MB
Checkpoint storeno lease
  1. No checkpoints yet. Each finished step lands here.
worker-bpool-eu-2 · pid 9108

standby · polling for work

steps run 0288 MB

Press Replay run to start, then Kill worker while a step is in flight.

Completed steps re-run
0
In-flight steps restarted
0
Restored from checkpoint
0

06

/

Numbers

Boring numbers, on purpose.

The scheduler is the part you shouldn’t have to think about, so we think about it constantly. Measured across all regions and published on the status page, including the bad days.

06

/

Numbers

Boring numbers, on purpose.

The scheduler is the part you shouldn’t have to think about, so we think about it constantly. Measured across all regions and published on the status page, including the bad days.

06

/

Numbers

Boring numbers, on purpose.

The scheduler is the part you shouldn’t have to think about, so we think about it constantly. Measured across all regions and published on the status page, including the bad days.

p99 scheduling latency

38

ms

From step enqueued to step running on a worker. Last 30 days, all regions.

p50 9ms

p95 24ms

p99 38ms

Steps run in August

2.1

B

About 810 a second, around the clock. Retries count; sleeping doesn’t.

2,143,882,019

steps since Aug 1 · counting live

API & scheduler uptime

99.995

%

Trailing 90 days. One partial outage, written up in public.

90 days ago

today

Jul 9 · 6 min · eu-west scheduler

07

/

Pricing

Pay for steps.

Waiting is free.

Sleeping for a week, waiting on an approval, backing off from a rate limit: none of it is billed. You pay when your code runs, and retries count as the steps they are.

07

/

Pricing

Pay for steps.

Waiting is free.

Sleeping for a week, waiting on an approval, backing off from a rate limit: none of it is billed. You pay when your code runs, and retries count as the steps they are.

07

/

Pricing

Pay for steps.

Waiting is free.

Sleeping for a week, waiting on an approval, backing off from a rate limit: none of it is billed. You pay when your code runs, and retries count as the steps they are.

2.5Msteps

≈ 6,900 runs a day of a 12-step agent.

Fits you bestPro
$76/ month
$49 base with 1M steps, + 1.5M × $18/MAt 2.5M, you’d hit the limit on day 1.

Hobby

Your range

For side projects and 2 a.m. experiments.

$0

/ month

50,000 steps a month

3-day trace retention

10 concurrent runs

Community forum support

Hobby

Your range

For side projects and 2 a.m. experiments.

$0

/ month

50,000 steps a month

3-day trace retention

10 concurrent runs

Community forum support

Pro

Your range

For teams with a pager and a budget line.

from $49

/ month

1M steps included, then $18 per million ($10 past 20M)

30-day traces, replay any run locally

Approvals by email, CLI, API and webhook

1,000 concurrent runs · alerts to your pager

Pro

Your range

For teams with a pager and a budget line.

from $49

/ month

1M steps included, then $18 per million ($10 past 20M)

30-day traces, replay any run locally

Approvals by email, CLI, API and webhook

1,000 concurrent runs · alerts to your pager

Enterprise

Your range

For when your steps have their own finance team.

Custom

Workers in your own cloud, state in ours or yours

SAML SSO, SCIM, audit log export

99.99% uptime SLA with real credits

A named engineer, not a ticket queue

Enterprise

Your range

For when your steps have their own finance team.

Custom

Workers in your own cloud, state in ours or yours

SAML SSO, SCIM, audit log export

99.99% uptime SLA with real credits

A named engineer, not a ticket queue

A step is one execution of a step() call. Retries are steps. Sleeps and waits are not.

Prices in USD, excl. VAT. Open-source SDKs are free forever.

08

/

Changelog

Shipped, then written down.

We release on Tuesdays and write the notes on Wednesdays, once we’ve seen what broke.

Sep 15, 2026

v2.4.0

Feature

Human approvals are generally available

Approve or reject from email, the CLI (relay approve run_…), the API, or a signed webhook. Timeouts can now escalate to a second approver instead of failing the run.

Sep 1, 2026

relay-py 1.8.0

SDK

Python: async generators as streaming steps

yield partial results from a step and Relay checkpoints each chunk, so a crash mid-stream resumes at the last chunk instead of the first token.

Aug 18, 2026

v2.3.2

Fix

Cron schedules respect DST in every IANA zone

Including Europe/Helsinki, where our own 03:00 cleanup job silently skipped March 29th. Sorry, Helsinki. Schedules now fire once, at the wall-clock time you wrote.

Aug 4, 2026

v2.3.0

Feature

relay replay: rerun any production run on your laptop

Pulls the recorded step results, so the run replays deterministically without calling a single external API. Set a breakpoint at step four and step through.

Jul 14, 2026

v2.2.0

Feature

Concurrency keys per step

Limit to ten concurrent calls per customer, not per workflow. Your rate-limited vendor will notice the difference before you do.

09

/

Start

Let it fail.
It’ll finish.

Two commands to a running workflow on your laptop. Deploy the same code to Relay Cloud or your own cluster when you’re ready. The free tier doesn’t expire.

zsh — ~/code/new-agent

~/code/new-agent $ npx relay init

  ✓ Created relay.config.ts

  ✓ Added workflows/hello.ts (3 steps)

  ✓ Installed @relay/sdk 2.4.0

~/code/new-agent $ npx relay dev

  relay dev  → http://localhost:8288

  worker connected · 1 workflow · 3 steps

  ▸ run_01J9 hello-world  ✓ completed in 212ms

~/code/new-agent $

Durable execution for code with somewhere to be.

All systems normal

Newsletter

The changelog, monthly. No launch-week confetti.

relay

© 2026 Relay Labs, Inc. · Helsinki & Lisbon

HEL UTC+2

LIS UTC+0

No workers were harmed in the making of this page. Several were killed.

Durable execution for code with somewhere to be.

All systems normal

Newsletter

The changelog, monthly. No launch-week confetti.

relay

© 2026 Relay Labs, Inc. · Helsinki & Lisbon

HEL UTC+2

LIS UTC+0

No workers were harmed in the making of this page. Several were killed.

Durable execution for code with somewhere to be.

All systems normal

Newsletter

The changelog, monthly. No launch-week confetti.

relay

© 2026 Relay Labs, Inc. · Helsinki & Lisbon

HEL UTC+2

LIS UTC+0

No workers were harmed in the making of this page. Several were killed.

Create a free website with Framer, the website builder loved by startups, designers and agencies.