Menu

Configure where run state lives in Vercel Workflows - Vercel
📰

Configure where run state lives in Vercel Workflows - Vercel

Vercel News·Nathan Rajlich·6 days ago
#rNdwP8bt
#vercel#region#workflow#workflows#start
Reading 0:00
15s threshold

Vercel Workflows now keeps each run's state, queue dispatch, and output streams in a single home region: the region where the run starts by default, or any target region you choose.

A run keeps its home region for its lifetime, so for agents built on Workflows, the whole loop stays near the user: an agent serving someone in Sydney executes, checkpoints its progress, and streams output from Sydney. During a regional incident, workflow traffic fails over to the next closest region.

To get started, update the Workflow SDK to [email protected] or later:

Installs the latest beta release of the Workflow SDK.

To pin a run to a specific region, pass the region option to start() :

app/api/start-workflow/route.ts

import { start } from 'workflow/api' ;

import { myWorkflow } from '@/workflows/my-workflow' ;

const run = await start ( myWorkflow , [ input ] , { region : 'sfo1' } ) ;

Stores the run's data in sfo1 and dispatches its queue messages from there.

Existing workflows pick up regional placement on…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.