Workflow SDK 5 Released: A Durable Workflow Engine Built for Production

Workflow SDK 5 advances durable execution toward production-grade Agent workloads.
Workflow SDK 5 is a systematic upgrade based on over 4 billion steps and 700 million runs, focused on security, reliability, and performance. It adds AES-256-GCM encryption for event logs, regionalized runs with pinned home-region state, and an engine rewrite with incremental replay that cuts step overhead p75 from 618 ms to 109 ms and 1,020-step completion from 21.0 to 3.0 minutes.
From Experiment to Production: The Turning Point for Workflow SDK
Workflow SDK started with a simple goal: write business logic in ordinary async JavaScript and let the SDK handle crash recovery, deployment switches, and long waits. A single sleep("3d") could keep a function running across three days—that was once its most intuitive selling point.
After accumulating more than 4 billion steps and 700 million runs, the team observed two clear usage patterns: traditional automation, including data flow, order processing, background task orchestration, subscription management, and ETL pipelines; and Agents and harnesses, which naturally need durable execution because they run for a long time and are costly. Workflow SDK 5 is a systematic upgrade built around the mature needs of these two workloads, with its core focus on three lines: security, reliability, and performance.
Durable Execution is the foundational concept for understanding Workflow SDK. Once a traditional function's process crashes or a deployment switches, the in-memory execution state is lost, and long tasks must restart from scratch. Durable execution writes each step's inputs, outputs, and progress to an event log, and on recovery the runtime replays the log to skip completed steps and side effects, continuing from the interruption point. This makes waits spanning days, like sleep("3d"), possible—no compute resources are consumed during the wait, and a scheduler wakes it up when the time comes. The cost is that every step must interact with storage and the queue, so log size, the number of hops, and serialization overhead directly determine the system's performance ceiling—which is the fundamental motivation for rewriting the engine in SDK 5.
End-to-End Encryption: Event Logs No Longer Exposed
Workflow's event log must store step arguments and return values to recover runs after a crash or deployment. This data may contain sensitive customer information, model context, credentials, and tool call results. SDK 5's approach is to encrypt data before it leaves your code: workflow and step inputs and outputs, hook payloads, and stream data are all encrypted with AES-256-GCM, using a separate key for each run. With encryption enabled, any backend—including Vercel—can only see and store ciphertext, and plaintext is decrypted only in your deployment environment or authorized observability tools.
On Vercel this capability works with zero configuration. Keys are derived from the deployment scope, a run can only decrypt its own data, and business code requires no changes. Observability is not sacrificed: names, durations, and statuses remain visible, and payloads can be decrypted in the dashboard or CLI when needed. Decryption happens locally in the browser or terminal, permissions match the project's environment variables, and every request is recorded in the team's audit log.
For self-hosted Worlds, encryption is implemented at the SDK layer. A custom World only needs to implement getEncryptionKeyForRun(), returning a stable 32-byte key for each run, and the SDK can then encrypt before writing to storage, queues, or streams, and decrypt during replay. Cross-run writes are also protected: when code resumes another run's hook, starts a run in another deployment, or writes a stream forwarded from another run, the payload is encrypted to the target run's public key, so the writer does not need to read the target run's existing payloads. In addition, by setting payload retention to experimental_retention: 0, inputs, outputs, and stream contents can be deleted immediately after a run completes or fails, retaining only the metadata needed for observability.
AES-256-GCM is an authenticated symmetric encryption algorithm: a 256-bit key provides strong confidentiality, and GCM mode also generates an authentication tag, so any tampering with the ciphertext is detected at decryption. It suits event log scenarios that are "written once, read many times," with low encryption and decryption overhead and support for streaming. "A separate key for each run" in the text means key derivation is typically based on the deployment scope and run ID, forming a hierarchy: even if a single run's key leaks, it cannot decrypt other runs' data. When writing across runs, "encrypted to the target run's public key" indicates hybrid encryption—an asymmetric key wraps the symmetric key, letting the writer securely deliver the payload without holding the target run's decryption permissions.
Regionalized Runs and Reliability Hardening
In SDK 4, all runs lived in iad1. Even if a project was deployed across multiple regions, each run's event log, queue, and stream existed in only one region, and steps executed in other regions had to make cross-region requests to record progress. SDK 5 deploys workflow infrastructure to every Vercel Function region: each run has its own home region, and state, queue scheduling, and streams are served by the region that started it, eliminating cross-region round trips on the hot path.
By default, a run starts in the region of the function that started it, so after deploying to multiple regions, each run naturally stays close to the user who triggered it, with no configuration needed. When a run needs to live elsewhere, you can pass a region parameter to start(), for example to run a workflow next to the database it reads and writes, or to keep customer data in a region required for compliance. Note that region determines where run data is stored; steps themselves still execute in the region where the app is deployed.
Regional isolation also brings reliability benefits: an outage in one region need not prevent healthy regions from starting new runs. Projects configured with Vercel Function failover can execute steps in the fallback region while continuing to use the original home region for state—state always stays pinned to the home region and does not migrate during failover. The team also used anonymous telemetry and customer collaboration to fix dozens of rare bugs and race conditions in the runtime, and the SDK's ability to self-recover from intermittent network errors has improved. According to the official statement, run failures or stalls caused by platform or runtime bugs have become nearly nonexistent in SDK 5.
Performance Rewrite for Agents
In SDK 4, every step invocation required a queue hop: one to start the step and one to continue the workflow. This was acceptable for slow background automation, but for the AI workloads developers build today, it means added latency. Agent loops and harnesses may contain thousands of sequential events, high-throughput token streams, tool chains, and dynamic sub-agents; at this scale, the network and CPU overhead around each step becomes a bottleneck.
SDK 5 rewrites most of the engine implementation to reduce redundant queue hops, unnecessary network requests, and CPU work. Across measured workloads, latency and overhead improved by 1.6x to 25x, with a consistent developer experience and no major breaking changes. Officially, v5.2.0 was compared with v4.8.12 on Vercel, measured on October 8, 2026, in region iad1, with step inputs and outputs of 1 KB JSON each.
Key changes include three items. First, fewer queue hops: a single invocation can execute multiple steps inline before yielding, including parallel steps; the runtime also avoids unnecessary persistence round trips by folding step creation into execution. In a five-step benchmark, p75 overhead between steps dropped from 618 ms to 109 ms. Second, incremental replay: in a 1,020-step benchmark, v4's p75 overhead grew with the event log, eventually reaching 1,748 ms in the sampling interval, while v5.2.0 was 70 ms; the median time to complete all 1,020 steps dropped from 21.0 minutes to 3.0 minutes. Third, WebSocket streaming: on Vercel World, v5.2.0 writes streams over WebSocket by default, and in a benchmark replaying a 52.4-second Agent response, median delivery time dropped from 226.1 seconds to 53.5 seconds. It should be noted that this measures the delivery speed of an already-recorded response, not faster model generation.
Payload compression further reduces stored and transmitted data volume, shrinking AI token streams by about 80% on average after compression. The team also cautions that these figures describe measurements in a single region, with a single workload, against Vercel World, and are best used as a reference for runtime overhead rather than a prediction for every application.
Incremental Replay is the key mechanism behind SDK 5's performance gains. SDK 4 had to replay the entire history from the head of the event log when recovering a run, so the longer the log, the greater the overhead of each step invocation, showing a degradation curve that rises linearly with run duration. Incremental replay maintains a cursor of the processed position and replays only events added since the last checkpoint, decoupling per-step overhead from total step count. This is exactly why v4's p75 climbed from early intervals to 1,748 ms in the 1,020-step benchmark while v5.2.0 stayed stable at 70 ms—the former accumulates O(n), while the latter is approximately O(1). For Agent loops containing thousands of sequential events, this difference directly determines whether long sessions are feasible.
World: The Shared Durable Foundation
Workflow SDK's durable functions are built on World: the interface for storing progress, scheduling work, and delivering streams. The same foundation now also supports fx and durable-harness, adding durability to existing Agent harnesses. Improvements to shared storage, queues, and streaming infrastructure benefit any World consumer, while optimizations to the workflow replay runtime apply only to Workflow SDK and do not automatically affect all harnesses.
The team offers paths for choosing an integration based on how you build: Workflow SDK for writing durable application logic with use workflow and use step; WorkflowAgent for running AI SDK Agent loops inside a workflow via @ai-sdk/workflow; fx for embedding and extending native coding Agents based on libfx; durable-harness for adding durability under existing supported harnesses, supporting Pi and OpenCode, with experimental integration for Claude Code and Codex in Vercel Sandbox; and eve for natively driving durable sessions with Workflow SDK and Worlds. The team says it will continue to expand the catalog of SDKs and frameworks whose durability is provided by Worlds.
World can be understood as Workflow SDK's pluggable backend abstraction: it defines three primitives—storing event logs, scheduling queue tasks, and delivering stream data—separating "durability" from the runtime. Vercel World is the official managed implementation, while self-hosted Worlds let teams connect their own databases and message queues. Because capabilities such as the replay runtime, encryption, and compression sit above World, tools like fx and durable-harness that share the same World directly gain improvements to storage and streaming infrastructure, but do not automatically inherit Workflow SDK's engine-specific optimizations—a layering that explains the distinction in the text between "which improvements benefit all consumers and which apply only to Workflow SDK."
Other Updates and Getting Started
SDK 5 also adds in-run cancellation based on AbortController, searchable run attributes, more framework integrations, and more. The upgrade documentation covers the specific changes, and new projects can install the latest SDK and start building right away. The Python SDK has also entered beta, offering the same durable workflows, steps, sleep, and hook capabilities. For teams already using SDK 4, existing runs will remain in iad1, and you can control the migration pace.
One-line Summary
Workflow SDK 5 advances durable execution toward production-grade Agent workloads through encryption, regionalization, and an engine rewrite.
Paragraph Summary
Workflow SDK 5 is a systematic upgrade based on observations from more than 4 billion steps and 700 million runs, organized around three lines: security, reliability, and performance. On security, event log payloads are encrypted with AES-256-GCM before leaving code, with zero configuration on Vercel and an implementation via getEncryptionKeyForRun for self-hosted Worlds, while observability is preserved through local decryption. On reliability, runs move from a fixed iad1 to regionalized deployment, with each run having a home region, no cross-region round trips on the hot path, and state remaining pinned to the home region during failover. On performance, the engine rewrite reduces queue hops and introduces incremental replay; in official benchmarks, p75 overhead between steps drops from 618 ms to 109 ms, median time to complete 1,020 steps drops from 21.0 minutes to 3.0 minutes, and WebSocket streaming cuts median delivery time for a 52.4-second Agent response from 226.1 seconds to 53.5 seconds. World, as the shared durable foundation, also supports Agent tools such as fx and durable-harness.
Related articles

Gemini 4 Neon Leak: A Potential Strong Contender Against Opus 5.5
A Hacker News thread suggests Gemini 4 Neon looks like an Opus 5.5 competitor. This article unpacks the product positioning behind this community signal, shifts in the top-model competitive landscape, and what it means for developers' model selection strategy.

Claude Fable 5.2's Self-Authored Short Film 'Fable' Sparks Discussion
A short film 'Fable,' credited to Claude Fable 5.2 for script, visuals, and directing, appears on Hacker News. This article analyzes the significance of full-pipeline AI creation, community reactions, and what it means for content creators.

Anthropic IPO Pricing: A Signal of AI Giants Going Public
Anthropic's IPO pricing draws attention. This article analyzes its potential impact on AI industry valuation, commercialization paths, and the competitive landscape, and highlights public-market expectations and challenges for AI companies.