Vercel Speeds Up Workflow SDK 5: 1,020 Agent Steps in 3 Minutes Instead of 21
Vercel has released Workflow SDK 5, a library that keeps a long-running AI agent from starting over after a crash or deployment. In Vercel's test, an agent chain of 1,020 steps (a model call, a tool call, a write of the result) used to take 21 minutes (median), and the longer the history, the longer the SDK spent replaying it from the beginning. Now the same steps take 3 minutes, because the old history is no longer replayed from the start. For long agent loops, this is a reason to upgrade. Full text...
AI-processed from Vercel Blog; edited by Hamidun News
If you have run an AI agent for several minutes or hours, you know the problem: the server restarts, a deployment goes out, the network blips, and everything has to start over. Vercel's Workflow SDK tackles this by letting you write an ordinary asynchronous JavaScript function. The library records the result of each step and, after a failure, resumes from the same point.
A "step" here is any single action: a model call, a tool call, a database write. Version 5 is out, and its headline number is this: in Vercel's test, a chain of 1,020 steps used to run in 21 minutes (median) and now runs in 3 minutes. The cause is that in version 4, each new step got slower as the history grew, while in version 5 that dependency has nearly disappeared.
What people are already building on Workflow SDK
Vercel looked at what customers built over the past year. The total came to more than 4 billion steps and 700 million runs. Two scenarios stand out. The first is conventional automation: order processing, subscriptions, ETL, background jobs. The second is agents and the scaffolding around them. Agents are expensive and run for a long time, so lost progress hurts especially badly.
The principle is simple. You mark the function with the "use workflow" directive and individual actions with "use step". The result of each step goes into an event log. After a failure, the SDK replays the log and does not re-execute what has already been done. You can even write sleep("3d"), and the function will survive three days of waiting through any number of deployments.
Why it got faster
In v4, each step required two trips through a queue: one to start the step, another to continue the workflow. For slow background jobs, that is tolerable. For agent loops with thousands of events, it no longer is. In v5, Vercel rewrote a significant part of the engine. Now a single invocation can run several steps in a row, including parallel ones, and only then hand control back.
The second change is incremental replay. Imagine re-reading your entire work journal from the first page after every action. That is effectively what v4 did: the longer the log, the longer the replay. In v5, the runtime reads only what is new.
Vercel compared v5.2.0 and v4.8.12 on Vercel in the iad1 region, with measurements taken on October 8, 2026. Here p75 means 75% of measurements completed within this time:
- first step, p75: 418 → 172 ms;
- pause between steps, p75: 618 → 109 ms;
- overhead of late steps in a long run, p75: 1,748 → 70 ms (25 times lower);
- 1,020 steps, median: 21.0 → 3.0 minutes;
- resumption after a wait, p75: 699 → 425 ms;
- stream delivery, median: 226.1 → 53.5 s.
Streams now use WebSocket by default, and AI response tokens take on average 80% less space after compression. The share of runs in which at least one stream chunk was delayed by more than a second fell from 6 in 100 to 0 in 100. The caveat matters: delivering an agent response that took 52.4 seconds to write used to take 226.1 seconds and now takes 53.5. This is faster delivery, not faster generation by the model itself.
Security, regions, and reliability
The log holds step arguments and results: customer data, model context, access tokens, tool responses. In v5, each payload is encrypted with AES-256-GCM in your own code, with a separate key for each run. Any backend, including Vercel, sees and stores only ciphertext. On Vercel this works without configuration: the key is derived from the specific deployment's key, so a run decrypts only its own data. For custom implementations, you need to return a stable 32-byte key via getEncryptionKeyForRun().
For debugging, data can be decrypted in the dashboard or through the CLI (npx workflow inspect run <id> --decrypt). Decryption happens in your browser or terminal, with the same permissions as the project's environment variables, and every request is written to an audit log. If you set experimental_retention: 0, inputs, outputs, and streams are deleted immediately after a run completes or fails.
In v4, all runs lived in the iad1 region even if the project was deployed to several regions, so a step in Europe reached the log across the ocean. Now each run has a home region, by default the one where it started. You can set it explicitly: start(processOrder, [order], { region: "fra1" }). This is useful when customer data must stay in Frankfurt. Steps themselves execute wherever the application is deployed, so you should deploy to the same region. Older v4 runs stay in iad1. If a region fails, steps may run through a fallback region, while state stays in the home region.
The team also fixed dozens of rare runtime bugs and race conditions. According to the company, runs that failed or hung because of platform errors have become nearly nonexistent.
What to do with this
The measurements were taken under a single workload, in a single region, on managed Vercel World. Vercel itself says this is not a forecast for every application. If your tasks are short, with a couple of steps, the gain will be more modest. For long agent loops, where the log keeps growing, the effect should be more noticeable. The company says there are no major breaking changes, but before upgrading it is still worth checking the upgrade guide and running your own scenario.
- Nov 26, 2026FS-XML: How a Browser AI Chat Edits Your Project Code in One Click, With No Token Bills
- Nov 26, 2026Yandex to start selling Pin, an AI secretary that takes meeting notes, in December
- Nov 26, 2026A Swarm of AI Agents Hunts for a Proof That P = NP: 600 Volunteers Supply 85% of the Compute
- Nov 26, 2026From Chip to Classified Networks: The Pentagon Signs Contracts of Up to $200 Million With Four AI Labs
Key Questions Answered
What people are already building on Workflow SDK?
Vercel looked at what customers built over the past year. The total came to more than 4 billion steps and 700 million runs. Two scenarios stand out. The first is conventional automation: order processing, subscriptions, ETL, background jobs. The second is agents and the scaffolding around them. Agents are expensive and run for a long time, so lost progress hurts especially badly. The principle is simple. You mark the function with the "use workflow" directive and individual actions with "use step".
Why it got faster?
In v4, each step required two trips through a queue: one to start the step, another to continue the workflow. For slow background jobs, that is tolerable. For agent loops with thousands of events, it no longer is. In v5, Vercel rewrote a significant part of the engine. Now a single invocation can run several steps in a row, including parallel ones, and only then hand control back. The second change is incremental replay. Imagine re-reading your entire work journal from the first page after every action.
What are the key details on Security, regions, and reliability?
The log holds step arguments and results: customer data, model context, access tokens, tool responses. In v5, each payload is encrypted with AES-256-GCM in your own code, with a separate key for each run. Any backend, including Vercel, sees and stores only ciphertext. On Vercel this works without configuration: the key is derived from the specific deployment's key, so a run decrypts only its own data. For custom implementations, you need to return a stable 32-byte key via getEncryptionKeyForRun().
Delegate Deep Research, Coding & Multi-Step Workflows to Nomad Agent
Deploy autonomous task execution with Nomad Agent (agent.nomadnet.ai) — automated web research, data synthesis, code generation, and MCP tool orchestration.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
