
Workflow SDK now supports inflight cancellation
Quick Answer
The Workflow SDK 5 beta from Vercel AI introduces inflight cancellation support, allowing developers to manage operations across workflows and steps using AbortController and AbortSignal.
Quick Take
This feature enables cancellation of ongoing tasks, enhances cooperation between steps, and maintains signal durability across suspensions, improving overall workflow efficiency.
Key Points
- Supports inflight cancellation using AbortController and AbortSignal across workflows.
- Cancellation is cooperative; steps must check the signal for operations.
- Durable signals persist across suspensions and allow for deterministic replay.
- Can cancel slow steps or remaining requests based on external conditions.
- Enhances workflow efficiency by managing parallel tasks effectively.
Article Excerpt
From source RSS / original summaryThe Workflow SDK 5 beta now supports the standard and APIs across workflow and step boundaries. AbortControllerAbortSignalCreate a controller inside a workflow, pass its signal into one or more steps, and cancel in-flight operations using the same API already uses. fetchThat signal stays durable across suspensions and deterministic replay. When a step is running, it sees the cancellation, even when it's in a separate function invocation.
Cancellation is also cooperative; steps have to inspect the signal or pass it to an API that supports. AbortSignalUse it to stop a slow step when a durable timeout wins a race, cancel the remaining requests after the first successful response, thread one signal through a multi-step pipeline, or cancel parallel work when an external condition changes. Try it with and read the to learn more. workflow@betacancellation documentationRead more
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

