megachangelog
Feature4.1 Beta

Workflow 4.1 Beta: Event-sourced architecture

Workflow 4.1 Beta introduces event-sourced architecture, storing all state changes as immutable events instead of updating records in place, enabling self-healing runs, complete audit trails, and consistency guarantees. The release also adds provider-executed tools, NestJS support, improved throughput handling thousands of steps per second, and enhanced serialization capabilities.

changes how workflows track state internally. Instead of updating records in place, every state change is now stored as an event, and current state is reconstructed by replaying the log. This release also adds support for provider-executed tools and higher throughput.Workflow 4.1 Beta

is a persistence pattern where state changes are stored as a sequence of events rather than by updating records in place. Instead of storing "this run is completed," the system stores "run_created, then run_started, then run_completed" and reconstructs the current state by replaying those events.Event sourcing

In Workflow 4.1, runs, steps, and hooks are no longer mutable database records. They're materializations of an append-only event log. Each event captures a timestamp and context, and the runtime derives current state by processing events in order.

This architecture makes workflows more reliable in three ways:

For a deeper look at the event model, including state machine diagrams for run, step, and hook lifecycles, see the .Event Sourcing documentation

Learn more about or with your first workflow.Workflowget started

Read more

What event sourcing means for workflows

Other updates

  • : If a queue message is lost or a race condition occurs, replaying the workflow route detects missing state and re-enqueues the necessary messages. Old runs required manual intervention to recover from queue downtime; new runs recover automatically.Self-healing

  • : The event log lets you replay the exact sequence that led to any state, which makes debugging distributed workflows much easier.Complete audit trail

  • : Events are append-only, so partial failures during a write can't leave entities in an inconsistent state. The event log is the single source of truth.Consistency

  • : The workflow queue system now processes many thousands of steps per second. When dependencies allow, multiple steps execute in parallel.Improved throughput

  • : now supports provider-executed tools like Google Search and WebSearch, which run on the model provider's infrastructure rather than in your workflow.Provider-executed tools@workflow/ai

  • : The new package adds build support for NestJS applications, handling dependency injection patterns so workflows integrate with existing NestJS services.NestJS support@workflow/nest

  • : The SWC plugin now supports the TC39 Explicit Resource Management proposal inside step and workflow functions, enabling automatic resource cleanup.Top-level using declarations

  • : Client mode now supports custom class serialization, with a object in that declares serializable types.Custom class serializationclassesmanifest.json

  • Fixed double-serialization of tool output in @workflow/ai

workflowevent-sourcingarchitecturereliabilitythroughputtools

Source: original entry ↗

More from Vercel

Follow Vercel to get its new changes in your feed and email digest.

Feature

OpenAI Decisions API now available on AI Gateway

OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.

ai-gatewayopenaiapidecisionssdks
Feature

Timestamp attributes now supported in Vercel Flags

Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.

flagstargetingfeaturetimestampscampaigns
Feature

Glyph Cluster now available in stealth on AI Gateway

Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.

ai-gatewaymodelscodingstealth
See all Vercel changes →