
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.
Source Excerpt
The 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. …
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.

