Build durable, resumable workflows that survive restarts, deployments, and failures using TypeScript directives.
| "use workflow" | Orchestrates steps, sleeps, suspends | Deterministic: No side effects, no Node.js modules, no global fetch | | "use step" | Contains business logic, I/O, side effects | Runs on separate request: Auto-retries on failure |
Workflow DevKit uses event sourcing - state changes are stored as events and replayed to reconstruct state. Workflows must be deterministic so replays produce identical step sequences. Steps run on separate requests, so data passes by value (mutations don't affect workflow variables).
Build durable workflows with Vercel Workflow DevKit using "use workflow" and "use step" directives. Use for long-running tasks, background jobs, AI agents, webhooks, scheduled tasks, retries, and workflow orchestration. Supports Next.js, Vite, Astro, Express, Fastify, Hono, Nitro, Nuxt, SvelteKit. Source: jakerains/agentskills.