workflow

Build durable, retryable workflows and AI agents with the Vercel Workflow DevKit.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill workflow-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow
Source: https://github.com/AarnavBaddam/skills/tree/main/workflow
Command: npx skills add https://github.com/AarnavBaddam/skills --skill workflow-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires workflow, @workflow/ai, @workflow/core, @workflow/next, @workflow/vitest, and includes references (resource) components.

What problem does it solve? Long-running tasks, multi-step pipelines, and AI agents often break on crashes, timeouts, or page reloads. This Skill provides expert guidance for building durable, crash-safe workflows with the Vercel Workflow DevKit (WDK), including pause/resume, automatic retries, and step-based execution. ## Core Features & Use Cases - Durable Workflows & Steps: Use the "use workflow" and "use step" directives to create orchestrations where each step is cached, retried, and survives crashes or reloads. - Hooks, Webhooks & Human-in-the-Loop: Pause workflows with createHook() or createWebhook() and resume them from API routes for approvals, external events, or chat-style interactions. - DurableAgent for AI: Build stateful AI agents with @workflow/ai that stream output, call tools, and survive interruptions without manual sandbox workarounds. - Use Case: Build a content generation pipeline that streams each phase, waits for editorial approval via a hook, retries transient API failures automatically, and resumes even if the user closes the browser. ## Quick Start Ask the AI to create a durable multi-step workflow using the Vercel Workflow DevKit with automatic retries and an approval pause step.

Frequently Asked Questions about workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a durable workflow with Vercel Workflow DevKit?

Add "use workflow" as the first line of an async function to make it durable, and "use step" for individual retryable units. Put logic in step functions for full Node.js access and use the workflow function purely for orchestration.

How do I pause a workflow and wait for human approval?

Use createHook() inside the workflow with a deterministic token; the workflow suspends at await hook. From an API route, call resumeHook(token, data) from workflow/api to deliver the approval payload and continue execution.

What is the difference between "use workflow" and "use step" functions?

Workflow functions run in a sandboxed VM without fetch, setTimeout, or Node.js modules, and handle orchestration only. Step functions have full Node.js and npm access, automatic retries, and persisted results for replay.

Can I build AI agents that survive crashes with the Workflow DevKit?

Yes, DurableAgent from @workflow/ai/agent maintains state and survives interruptions, handling the sandbox fetch setup automatically. Tools needing Node.js access use "use step", and getWritable() streams output to the run.

How do I debug a stuck or failed workflow run?

Run npx workflow inspect runs or npx workflow inspect run <run_id> for CLI inspection, and npx workflow web for a visual dashboard. For Vercel deployments, pass --backend vercel with --project and --team flags.

How do I test workflows that use sleep or hooks?

Use the @workflow/vitest plugin for integration tests without a running server. Helpers like waitForHook, waitForSleep, resumeHook, and getRun(runId).wakeUp() let you pause, resume, and skip sleeps deterministically.