# Workflow DevKit ## Docs - [Welcome to Workflow DevKit](https://mintlify.wiki/vercel/workflow/introduction.md): Build durable, resilient, and observable workflows in JavaScript with ease. Add reliability to async operations, AI agents, and complex business logic. - [Quickstart Guide](https://mintlify.wiki/vercel/workflow/quickstart.md): Get started with Workflow DevKit in under 5 minutes. Build your first durable workflow with automatic retries and state management. - [Next.js](https://mintlify.wiki/vercel/workflow/installation/next.md): Install and configure Workflow DevKit in your Next.js application - [Vite](https://mintlify.wiki/vercel/workflow/installation/vite.md): Install and configure Workflow DevKit in your Vite application - [Astro](https://mintlify.wiki/vercel/workflow/installation/astro.md): Install and configure Workflow DevKit in your Astro application - [Express](https://mintlify.wiki/vercel/workflow/installation/express.md): Install and configure Workflow DevKit in your Express application - [Fastify](https://mintlify.wiki/vercel/workflow/installation/fastify.md): Install and configure Workflow DevKit in your Fastify application - [Hono](https://mintlify.wiki/vercel/workflow/installation/hono.md): Install and configure Workflow DevKit in your Hono application - [Nitro](https://mintlify.wiki/vercel/workflow/installation/nitro.md): Install and configure Workflow DevKit in your Nitro application - [Nuxt](https://mintlify.wiki/vercel/workflow/installation/nuxt.md): Install and configure Workflow DevKit in your Nuxt application - [SvelteKit](https://mintlify.wiki/vercel/workflow/installation/sveltekit.md): Install and configure Workflow DevKit in your SvelteKit application - [NestJS](https://mintlify.wiki/vercel/workflow/installation/nestjs.md): Install and configure Workflow DevKit in your NestJS application - [Workflows and Steps](https://mintlify.wiki/vercel/workflow/concepts/workflows-and-steps.md): Build long-running, stateful application logic that persists progress and resumes after failures. - [Starting Workflows](https://mintlify.wiki/vercel/workflow/concepts/starting-workflows.md): Trigger workflow execution with the start() function and track progress with Run objects. - [Hooks & Webhooks](https://mintlify.wiki/vercel/workflow/concepts/hooks.md): Pause workflows and resume them later with external data, user interactions, or HTTP requests. - [Streaming](https://mintlify.wiki/vercel/workflow/concepts/streaming.md): Stream data in real-time to clients for progress updates and incremental content delivery. - [Errors & Retrying](https://mintlify.wiki/vercel/workflow/concepts/errors-and-retries.md): Customize retry behavior with FatalError and RetryableError for robust error handling. - [Serialization](https://mintlify.wiki/vercel/workflow/concepts/serialization.md): Understand how workflow data is serialized and persisted across suspensions and resumptions. - [Idempotency](https://mintlify.wiki/vercel/workflow/concepts/idempotency.md): Ensure operations can be safely retried without producing duplicate side effects. - [Common Patterns](https://mintlify.wiki/vercel/workflow/concepts/common-patterns.md): Implement distributed patterns using familiar async/await syntax with no new APIs to learn. - [Building Durable AI Agents](https://mintlify.wiki/vercel/workflow/ai/overview.md): Build AI agents that survive crashes, scale across requests, and maintain state with durable LLM tool-call loops. - [Chat Session Modeling](https://mintlify.wiki/vercel/workflow/ai/chat-session-modeling.md): Model chat sessions at different architectural layers to control state ownership and handle interruptions. - [Defining Tools](https://mintlify.wiki/vercel/workflow/ai/defining-tools.md): Common patterns for defining tools in durable AI agents using Workflow DevKit. - [Human-in-the-Loop](https://mintlify.wiki/vercel/workflow/ai/human-in-the-loop.md): Wait for human input or external events before proceeding in your AI agent workflows. - [Message Queueing](https://mintlify.wiki/vercel/workflow/ai/message-queueing.md): Inject messages during an agent's turn, before tool calls complete or while the model is reasoning. - [Resumable Streams](https://mintlify.wiki/vercel/workflow/ai/resumable-streams.md): Handle network interruptions, page refreshes, and timeouts without losing agent progress. - [Sleep and Delays](https://mintlify.wiki/vercel/workflow/ai/sleep-and-delays.md): Schedule recurring actions, handle rate limiting, and wait for external state in AI agents. - [Streaming Updates from Tools](https://mintlify.wiki/vercel/workflow/ai/streaming-updates-from-tools.md): Show progress updates and stream step output to users during long-running tool executions. - [Event Sourcing](https://mintlify.wiki/vercel/workflow/how-it-works/event-sourcing.md): Learn how Workflow DevKit uses event sourcing internally for debugging and observability. - [Understanding Directives](https://mintlify.wiki/vercel/workflow/how-it-works/understanding-directives.md): Explore how JavaScript directives enable the Workflow DevKit's durable execution model. - [Compilation Process](https://mintlify.wiki/vercel/workflow/how-it-works/compilation.md): Deep dive into how the Workflow DevKit compiler transforms directive-annotated code. - [Serialization Deep Dive](https://mintlify.wiki/vercel/workflow/how-it-works/serialization-deep-dive.md): Explore the serialization mechanics that enable cross-boundary data transfer in workflows. - [Deployment Overview](https://mintlify.wiki/vercel/workflow/deployment/overview.md): Deploy workflows locally, on Vercel, or anywhere using pluggable World adapters. - [Building a World](https://mintlify.wiki/vercel/workflow/deployment/storage.md): Implement the World interface to run workflows on any custom infrastructure. - [Observability](https://mintlify.wiki/vercel/workflow/observability/opentelemetry.md): Inspect, monitor, and debug workflows through the CLI and Web UI with powerful observability tools. - [Testing Workflows](https://mintlify.wiki/vercel/workflow/testing/workflows.md): Unit test individual steps and integration test entire workflows using Vitest and the Vite plugin. - [Error Reference](https://mintlify.wiki/vercel/workflow/errors/overview.md): Comprehensive guide to error types and handling in Workflow DevKit. - [Workflow Errors](https://mintlify.wiki/vercel/workflow/errors/workflow-errors.md): Control step execution with FatalError and RetryableError. - [Runtime Errors](https://mintlify.wiki/vercel/workflow/errors/runtime-errors.md): Error types thrown by Workflow DevKit during execution. - [API Reference Overview](https://mintlify.wiki/vercel/workflow/api-reference/overview.md): Complete reference for Workflow DevKit core APIs - [createHook](https://mintlify.wiki/vercel/workflow/api-reference/workflow/create-hook.md): Create a hook to receive external data in a workflow - [createWebhook](https://mintlify.wiki/vercel/workflow/api-reference/workflow/create-webhook.md): Create a webhook to receive HTTP requests in a workflow - [defineHook](https://mintlify.wiki/vercel/workflow/api-reference/workflow/define-hook.md): Define a typed hook with input validation and transformation - [sleep](https://mintlify.wiki/vercel/workflow/api-reference/workflow/sleep.md): Pause workflow execution for a duration or until a specific time - [fetch](https://mintlify.wiki/vercel/workflow/api-reference/workflow/fetch.md): Make HTTP requests from within workflows - [getWritable](https://mintlify.wiki/vercel/workflow/api-reference/workflow/get-writable.md): Get a writable stream for sending data from a workflow - [getStepMetadata](https://mintlify.wiki/vercel/workflow/api-reference/workflow/get-step-metadata.md): Get metadata about the currently executing step - [getWorkflowMetadata](https://mintlify.wiki/vercel/workflow/api-reference/workflow/get-workflow-metadata.md): Get metadata about the current workflow run - [FatalError](https://mintlify.wiki/vercel/workflow/api-reference/workflow/fatal-error.md): Throw a non-retryable error from a step function - [RetryableError](https://mintlify.wiki/vercel/workflow/api-reference/workflow/retryable-error.md): Throw an error with configurable retry behavior - [Workflow AI SDK](https://mintlify.wiki/vercel/workflow/api-reference/workflow-ai/overview.md): Build durable AI agents with automatic retries and state management - [DurableAgent](https://mintlify.wiki/vercel/workflow/api-reference/workflow-ai/durable-agent.md): Build AI agents with automatic state management and retries - [AI Providers](https://mintlify.wiki/vercel/workflow/api-reference/workflow-ai/providers.md): Integrate with Anthropic, OpenAI, Google AI, and xAI models - [createWorld](https://mintlify.wiki/vercel/workflow/api-reference/workflow-api/create-workflow-runtime.md): Create a workflow runtime world instance - [start](https://mintlify.wiki/vercel/workflow/api-reference/workflow-api/start-workflow.md): Start a new workflow execution - [resumeHook / resumeWebhook](https://mintlify.wiki/vercel/workflow/api-reference/workflow-api/resume-hook.md): Resume workflows by sending data to hooks and webhooks - [getRun](https://mintlify.wiki/vercel/workflow/api-reference/workflow-api/get-workflow-state.md): Retrieve and interact with workflow run instances - [@workflow/next](https://mintlify.wiki/vercel/workflow/api-reference/integrations/next.md): Next.js integration for Workflow DevKit - [@workflow/vite](https://mintlify.wiki/vercel/workflow/api-reference/integrations/vite.md): Vite plugin for Workflow DevKit - [@workflow/astro](https://mintlify.wiki/vercel/workflow/api-reference/integrations/astro.md): Astro integration for Workflow DevKit - [@workflow/nest](https://mintlify.wiki/vercel/workflow/api-reference/integrations/nest.md): NestJS integration for Workflow DevKit - [@workflow/nitro](https://mintlify.wiki/vercel/workflow/api-reference/integrations/nitro.md): Nitro module for Workflow DevKit - [@workflow/nuxt](https://mintlify.wiki/vercel/workflow/api-reference/integrations/nuxt.md): Nuxt module for Workflow DevKit - [@workflow/sveltekit](https://mintlify.wiki/vercel/workflow/api-reference/integrations/sveltekit.md): SvelteKit integration for Workflow DevKit - [CLI Overview](https://mintlify.wiki/vercel/workflow/api-reference/cli/overview.md): Command-line interface for Workflow DevKit - [workflow dev](https://mintlify.wiki/vercel/workflow/api-reference/cli/dev.md): Start development server with file watching - [workflow build](https://mintlify.wiki/vercel/workflow/api-reference/cli/build.md): Build workflow bundles for deployment - [workflow deploy](https://mintlify.wiki/vercel/workflow/api-reference/cli/deploy.md): Deploy workflows (not implemented) ## OpenAPI Specs - [openapi](https://mintlify.wiki/vercel/workflow/api-reference/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.