Reader
Timeline1494StarredSettings

Feeds

AI

Anthropic NewsExponential ViewSimon Willison's Weblog10Vercel News1108

设计

AreslunaDaring Fireball26Geoffrey LittJim Nielsen’s Blog

思考

Essays - Benedict EvansSteve BlankZara Zhang
Cursor Changelog30Lenny's Podcast: Product | Career | Growth320

Select an article to read

一种用于持久化执行的新编程模型

A new programming model for durable execution

Vercel News·Pranay Prakash·April 16, 2026

The gap between prototypes and production-ready systems is huge. Code that's trivial to run locally falls apart the moment it needs to handle failures, restarts, and real traffic.

Framework defined infrastructure solved this for web applications. When you deploy, Vercel infers the right configuration from the app itself. Workflows extends that model to long-running systems. Instead of managing a separate codebase for orchestration, durable workflows are an extension of your application code.

Since launching in beta in October 2025, Workflows has processed over 100 million runs and over 500 million steps across more than 1,500 customers, with more than 200K npm downloads every week.

Today, is generally available. Vercel Workflows

Workflows is built for any workload that doesn’t fit in a single request.

: Deep integration with the AI SDK enables that can maintain state, tools, and handle external events or interruptions. AI SDK v7 is taking this further with Agentsinfinitely long running durable agentsWorkflowAgent.

: proved this programming model in TypeScript codebases, and we're bringing it to a new language. The is now in beta. BackendsWorkflow SDKWorkflow Python SDK

: Workflows can be used for any function that needs to execute reliably, including multi-step onboarding flows, payment processing, ETL pipelines, or any backend work that would otherwise require you to wire up your own queues and retry logic. Long-running workloads

Shipping a reliable long-running process to production typically means splitting your code across queues, workers, status tables, retry logic, and monitoring. Dedicated orchestration services add yet another layer with long-lived background processes you run in Kubernetes, scale horizontally, and dedicate engineering time to keep healthy. They are distributed systems you pay for on top of your core application compute.

Workflows eliminates the orchestrator entirely. All coordination runs in your application code, not a separate service. The infrastructure is built on three components:

Because there is no separate orchestration service, you only pay for the compute your steps actually use when functions are running.

Workflows lets you write long-running functions in TypeScript or Python using normal control flow and a small API surface.

In TypeScript you with , and isolate units of work with . Workflows handles everything underneath: queues, retries, step isolation, observability, durable state, and streaming.create a workflow"use workflow""use step"

At first glance, this looks like one function calling another, and that is exactly the point. Each step gets isolation, retries, persistence, observability, and durable continuation automatically. The orchestration lives in the application code, not in a separate system.

A Next.js app with the Workflow SDK installed runs the same way locally as it does in production at scale, with the same code, real guarantees, and no separate orchestration tooling to configure.

One of the best examples from beta testing is . It continuously pits models against each other, feeding them the current board state, validating moves, rendering the game, and running matches indefinitely, turn after turn.Guillermo's infinite chess game

Each chess match is a workflow run, and when a game ends, the . Infinity is modeled as recursion across runs.last step starts a new run

Because every workflow run is pegged to a specific deployment, one game can safely finish on the version it started with while the next game begins on the latest deployment. That creates a clean upgrade boundary where each game remains stable within its version, and every new game picks up the latest improvements.

If the backend code powering the chess match crashes or encounters transient errors, the workflow run automatically retries it without causing the application to fail.

Workflows is purpose-built for the agentic era. It is the only security-first, durable SDK made for building agents and made for agents to build with.

By default, Vercel Workflows , including step inputs, outputs, and stream chunks, before they leave your deployment. Nothing is readable in transit or at rest outside your environment, and decryption only happens inside the deployment running the workflow. encrypts all data

Encryption is built in and free, not a security add-on you configure after the fact. This is possible because Workflows owns both orchestration and execution in the same environment, so encryption can happen automatically without a separate service or any extra infrastructure on your end.

When you need to inspect encrypted data through the dashboard or CLI, explicit decryption is supported with a full . workflowaudit trail

Agents need more than longer timeouts, they need durable execution, reliable orchestration, resumable streams, and enough headroom to move large payloads through long-running systems.

Durable agents

Workflow SDK and AI SDK share a that gives agents durable execution, tool calling, state management, and the ability to handle external events or interruptions gracefully. Tools can be implemented as workflow steps for automatic retries or as regular workflow-level logic that uses primitives like and hooks to suspend and resume cleanly. Agents process tool calls iteratively until completion, surviving restarts and failures along the way. deep integrationsleep

AI SDK v7 takes this further with , a fully native implementation.WorkflowAgent

Durable streams

persist agent output. gives you a persistent stream that multiple clients can connect to, disconnect from, reconnect to later, and resume from any point. The workflow keeps running even if the user closes the browser. When they come back, the client reconnects and continues exactly where the stream left off, no Redis or custom pub/sub required.Durable streamsgetWritable()

In this example, a flight booking agent streams itinerary updates as it plans a trip and searches for flights:

The API route starts the workflow and returns the durable stream to the client. The run ID in the response header is what enables reconnection:

If the user closes the browser mid-search, the workflow keeps running. When they re-connect, or share the link with a different user who opens the session, resumes the stream from the last event the client received. WorkflowChatTransport

Hooks and sleep

Workflows can suspend without incurring any compute.

let a workflow wait for an external trigger to resume. Hooks are useful for building and integrating with third-party services. Hookshuman-in-the-loop approval flows

lets a workflow suspend for any specified amount of time, from minutes to days or months. Sleep is useful for email drip campaigns and date-sensitive use cases. Sleep

Limits built for multimodal agents

Workflows 50 MB per step payload and up to 2 GB across an entire run, with generous event limits. That's plenty of headroom for agents passing images, video, and large context across long execution chains. supports

Workflows is not just great for building agents. It is also designed for coding agents to use directly.

The programming model is agent-friendly

Workflows code is ordinary TypeScript. A workflow is a function, a step is a function, and because orchestration lives in the application code itself, a coding agent only has to reason about one system. There is no separate orchestration layer to configure and no worker fleet to manage.

Full observability from the CLI

Workflow SDK ships with a that any agent can use for inspecting and debugging your workflow runs. If a human can inspect runs in the dashboard, an agent can inspect the same workflow state from the terminal.CLI

This works locally with no config. For production deployments on Vercel, the CLI reuses your CLI authentication with to make authenticated requests against the Vercel API. Agents can investigate state, inspect runs, and debug behavior without leaving the terminal. vercel--backend vercel

Workflows ships with a skill

Agents can install the directly and use it to scaffold, debug, and manage workflows without hand-written product knowledge.Workflows skill

Workflow SDK and part of the same family as AI SDK and Chat SDK. The npm package goes stable at GA with 200K+ weekly downloads and 75+ releases shipped during beta.is open sourceworkflow

are the adapter system that makes Workflows portable. Each World provides the three components a workflow needs (an event log, compute, and a queue), backed by different infrastructure.Worlds

: Vercel handles everything automatically. Deploy your app and Vercel Workflows runs on Fluid compute with Vercel Queues, zero-config E2E encryption, and built-in observability.Managed

: Run Workflows on your own infrastructure. We maintain a Postgres reference implementation that real customers run in production, and the Local World ships built in for development.Self-hosted

: The SDK is not locked to one runtime, and the community is already building more Worlds, including adapters for MongoDB, Redis, Turso, Jazz Cloud, and Cloudflare. We'll continue to support anyone who wants to build Worlds.Embedded

Mux built their media intelligence layer , handling execution, retries, and orchestration for AI inference across complex video pipelines. They also shipped and directives inside their own SDK, so any developer can and get a durable, multi-step pipeline as a normal imported function.on Workflows"use workflow""use step"@mux/ainpm install @mux/ai

Durable's most critical path is website creation: dozens of parallel AI steps orchestrated by Vercel Workflows to deliver a complete site in under 30 seconds. Their small dev team ripped out their self-hosted infrastructure entirely and with 160+ directives across 75 files. rewrote on Workflows

Flora runs their entire media generation pipeline , orchestrating 50+ image models with no queues, no state machines, and no separate service. They use rollbacks for credit refunds, recursive workflows for user-defined multi-step pipelines, and for progress streaming. Their customers kick off jobs, close their laptop, and come back to completed results.on Vercel WorkflowsgetWritable

Workflows 4 focused on getting the developer experience and SDK model right. Workflows 5 keeps the same programming model while pushing harder on performance and runtime efficiency. Here’s what we’re cooking:

Our goal is to make the overhead of opting into Workflows smaller and smaller until it is the obvious default for any project. Install to try Workflows 5 early (and on GitHub).workflow@betashare feedback

The is now in beta, making Workflows available across the broader AI and backend ecosystem. Here's a quick taste of how the opening example in this post looks in Python:Python SDK

Durability, reliability, observability, security, and streaming should be part of your product from the beginning, not chores you take on months later.

When you use Workflows, we take on the complexity so you can focus on what makes your app unique. Learn more about or to get started. Vercel Workflowsvisit the Workflow SDK docs

Vercel Workflows is generally available on April 16.

Read more

Built for agents, backends, and long-running workloads

The programming model: your code is the orchestrator

Vercel Workflows in action: Guillermo's infinite chess game

Secure by default

For building agents

Mux powers durable video and AI pipelines

Durable runs hundreds of AI agents for 3 million small businesses

Flora orchestrates creative AI agents across 50+ image models

Workflows 5

Python support

How it works

Why Workflows matters for agents

For agents to build with

Run Workflows anywhere

How Vercel customers use Workflows

What's next: Workflows 5 and Python support

Get started

  • records every step input, output, stream chunk, sleep, hook, and error in a run. It is the single source of truth for execution state and history.:Event log

  • : each step runs as its own function invocation on Fluid compute. The workflow library inside each function handles dequeueing, state loading, encryption, execution, and handoff to the next step.Your functions on Fluid compute

  • : each function enqueues the next step automatically. Queues run automatically on Vercel, in your own Postgres, or in-memory locally.Vercel Queues

  • Native concurrency controls, including a lock primitive for coordinating work across multiple runs

  • Globally deployed Workflows infrastructure

  • A snapshot-based runtime to reduce replay overhead as event histories grow

  • Better bundling and stronger Next.js integration