workflow
Core workflow primitives including steps, context management, streaming, webhooks, and error handling.
Installation
npm i workflow
pnpm i workflow
yarn add workflow
Functions
Workflow DevKit contains the following functions you can use inside your workflow functions:
A function that returns context about the current workflow execution.
A function that returns context about the current step execution.
Sleeping workflows for a specified duration. Deterministic and replay-safe.
Make HTTP requests from within a workflow with automatic retry semantics.
Create a low-level hook to receive arbitrary payloads from external systems.
Type-safe hook helper for consistent payload types.
Create a webhook that suspends the workflow until an HTTP request is received.
Access the current workflow run's default stream.
Error Classes
Workflow DevKit includes error classes that can be thrown in a workflow or step to change the error exit strategy of a workflow.