workflow
Workflow SDK: Build durable, reliable, and observable apps and AI Agents in TypeScript
What is workflow?
Workflow SDK: Build durable, reliable, and observable apps and AI Agents in TypeScript
Overview of workflow
What it is
Workflow SDK is a TypeScript and JavaScript library that makes functions durable. It persists workflow progress, retries failed steps, and provides built-in observability. Workflows can suspend without using compute while they wait. It is designed for building durable, reliable, and observable applications and AI agents.
Key features
- Persists workflow progress and retries failed steps automatically.
- Built-in observability with a local UI accessible via
npx workflow web. - Workflows can suspend without consuming compute resources.
- Supports lifecycle hooks for application-level completion and failure reporting.
- Local development uses a bundled backend with no configuration; deploy to Vercel for managed storage, queuing, scaling, and observability, or self-host with Postgres or a custom World.
Use cases
- Building durable server-side workflows, such as user onboarding sequences.
- Creating reliable AI agents that require step retries and progress persistence.
- Any application that needs long-running, observable processes that can suspend and resume.
Getting started
Install the SDK in an existing project: bash npm install workflow Configure the integration for your framework. For Next.js: ts // next.config.ts import { withWorkflow } from 'workflow/next'; export default withWorkflow({}); Start a workflow from an API route, Server Action, or other server-side code: ts import { start } from 'workflow/api'; import { onboardUser } from './workflows/onboard-user'; await start(onboardUser, ['[email protected]']); Run your app and open the local observability UI: bash npm run dev bash npx workflow web Full documentation is available in node_modules/workflow/docs.
License and pricing
The SDK is open source under the Apache-2.0 license. Pricing is not stated; the package is listed as open source.
Based on the project's public README and repository metadata.