---
id: 16753
lang: en
title: "Vercel Speeds Up Workflow SDK 5: 1,020 Agent Steps in 3 Minutes Instead of 21"
published_at: "2026-11-21 01:34:40"
source_name: "Vercel Blog"
source_url: "https://vercel.com/blog/workflow-sdk-5"
canonical_url: "https://news.hamidun.com/en/news/16753"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Vercel Speeds Up Workflow SDK 5: 1,020 Agent Steps in 3 Minutes Instead of 21

> **Краткая суть (BLUF):** 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.  - The pause between steps fell from 618 ms to 109 ms (p75: 75% of steps complete at or under this time) - Delivery of an agent response that took 226.1 s now takes 53.5 s, down from 52.4 s in the original test run - Data is encrypted with AES-256-GCM, enabled by default on Vercel with no configuration  Full text...

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.

---
- **Первоисточник:** [Vercel Blog](https://vercel.com/blog/workflow-sdk-5)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/16753
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
