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.
$ npx relay init
MIT-licensed SDKs · Cloud or self-hosted · No card to start
import { workflow, step } from "@relay/sdk"; export const research = workflow( "research-agent", async ({ input, approval }) => { const hits = await step("search", () => web.search(input.topic)); const notes = await step("summarize", { retries: 3, backoff: "2s" }, () => llm.summarize(hits)); await approval("review", { timeout: "48h" }); return step("publish", () => cms.post(notes)); });
↑ A real run, compressed: one rate limit, one retry, one human, zero pages.
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
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.
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
- 01acrawlqueued
- 02achunkqueued
- 03aembedqueued
- 04adedupequeued
- 05aupsertqueued
- 06anotifyqueued
standby · polling for work
- No checkpoints yet. Each finished step lands here.
standby · polling for work
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
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
≈ 6,900 runs a day of a 12-step agent.
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 $