Vercel released Workflow SDK 5. It says the SDK has run over 4 billion steps and 700 million runs; v5 rewrites the engine to cut queue hops, taking a 1,020-step run from a 21-minute to a 3-minute median. Step payloads are encrypted with AES-256-GCM using a per-run key, Workflow infrastructure now runs in every Vercel Function region, and the same durability layer backs harnesses such as Pi and OpenCode.

Key Takeaways

  • ✓Vendor benchmark (v5.2.0 vs v4.8.12): first-step p75 418 ms to 172 ms, between-step p75 618 ms to 109 ms, late-run overhead 1,748 ms to 70 ms (25x lower)
  • ✓Streams now use WebSockets by default: replaying a 52.4-second agent response, median delivery fell from 226.1 s to 53.5 s, and token streams shrink about 80% with compression
  • ✓End-to-end payload encryption with a per-run key; Vercel stores only ciphertext, decryption happens in the browser or CLI and is audit-logged, and retention can be set to zero
  • ✓Run state lives in the region that started it, or a region set via start(), so one regional outage does not stop new runs elsewhere
  • ✓durable-harness adds durability to Pi and OpenCode, with experimental Claude Code and Codex integrations in Vercel Sandbox; a Python SDK is in beta
Vercel ships Workflow SDK 5: durable engine rewritten for agent loops, up to 25x lower overhead, end-to-end encrypted payloads by default and per-region runs
🖼️Official Media
Click to view high-res
🧭

Turn your technical choice into a development budget

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background and pain points

Workflow SDK lets developers write plain async JavaScript that survives crashes, deployments and long waits. Vercel says it has run more than 4 billion steps and 700 million runs, mostly for traditional automation (data movement, orders, ETL) and for expensive, long-running agents and harnesses. In v4 every step took two queue hops, fine for slow background jobs but a bottleneck for agent loops with thousands of sequential events.

Architecture highlights

v5 rewrites much of the engine: one invocation can run several steps inline, including parallel ones, before yielding for a wait, a hook or a timeout, and replay is now incremental so it no longer slows as the event log grows. Step inputs and outputs, hooks and stream data are encrypted with AES-256-GCM using a per-run key, so backends see only ciphertext. Workflow infrastructure is deployed to every Vercel Function region, and each run keeps its state in its home region or one you choose.

Benchmarks and data

Vercel compared v5.2.0 with v4.8.12 on production in iad1 on October 8: between-step p75 overhead fell from 618 ms to 109 ms, late-run overhead from 1,748 ms to 70 ms, the median time for 1,020 steps from 21.0 to 3.0 minutes, and stream delivery from 226.1 s to 53.5 s. These are vendor-reported numbers for one workload in one region.

Getting started

Upgrade with pnpm add workflow@latest; Vercel says there are no major breaking changes, and existing v4 runs stay in iad1. v5 also adds in-flight cancellation with AbortController, searchable run attributes and a redesigned trace viewer. To add durability to an existing agent, use WorkflowAgent from @ai-sdk/workflow or durable-harness.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextHugging Face Harness Leaderboard Adds DeepSeek Harness: DSH Statistically Tied for First in All Five Evaluations, 2nd on DeepSWE, 6th on Terminal-Bench After Shutting Down Its Own Servers
Read Now→