workflow
Durable, resumable workflows with step-based orchestration, hooks for external events, and built-in AI agent support.
- Supports three execution modes: workflow functions (orchestration layer), step functions (full Node.js access with automatic retry and result persistence), and DurableAgent for AI-powered workflows with tool integration
- Pause workflows at hooks to wait for external events, then resume from API routes; hooks support single events or iterable multi-event patterns with deterministic tokens
- Includes sandbox restrictions in workflow context (no direct fetch, setTimeout, or Node.js modules) but provides escape hatches like
import { fetch } from "workflow"and step functions for unrestricted logic - Framework integrations for Next.js, Express, Hono, Vite, Astro, and Nitro; CLI tools for local debugging, run inspection, and Vercel deployment observability
CRITICAL: Always Use Correct workflow Documentation
Your knowledge of workflow is outdated.
The workflow documentation outlined below matches the installed version of the Workflow SDK.
Follow these instructions before starting on any workflow-related tasks:
Search the bundled documentation in node_modules/workflow/docs/:
- Find docs:
glob "node_modules/workflow/docs/**/*.mdx" - Search content:
grep "your query" node_modules/workflow/docs/
Documentation structure in node_modules/workflow/docs/:
More from vercel/workflow
workflow-init
Install and configure Vercel Workflow SDK before it exists in node_modules. Use when the user asks to "install workflow", "set up workflow", "add durable workflows", "configure workflow sdk", or "init workflow" for Next.js, Express, Hono, Fastify, NestJS, Nitro, Nuxt, Astro, SvelteKit, or Vite.
1.4Kmigrating-to-workflow-sdk
Migrates Temporal, Inngest, Trigger.dev, and AWS Step Functions workflows to the Workflow SDK. Use when porting Activities, Workers, Signals, step.run(), step.waitForEvent(), Trigger.dev tasks / wait.forToken / triggerAndWait, ASL JSON state machines, Task/Choice/Wait/Parallel states, task tokens, or child workflows.
136internal-dev-workbench
Spin up a portless + tmux dev session for the Workflow SDK that gives each git worktree isolated `<branch>.<name>.localhost` URLs for the Next.js workbench and the observability UI, plus a Claude statusline that surfaces those URLs. Use only when the user asks for a "portless dev session", a "tmux dev layout for workflow", "worktree-isolated dev URLs", or wants to wire workflow dev URLs into the Claude statusline. Do not activate for the generic "start the dev server" / "run pnpm dev" task.
51