Skip to main content
The Workflow DevKit provides a set of core APIs for building durable workflows. These APIs are available from the workflow package and can be used within workflow and step functions.

Workflow APIs

These functions are available within workflow functions (functions with "use workflow"):

Step APIs

These functions are available within step functions (functions with "use step"):

Error Handling

Control step retry behavior with error classes:

Import Pattern

All APIs are exported from the workflow package:
import {
  createHook,
  createWebhook,
  defineHook,
  sleep,
  fetch,
  getStepMetadata,
  getWorkflowMetadata,
  getWritable,
  FatalError,
  RetryableError,
} from 'workflow';

Build docs developers (and LLMs) love