> ## Documentation Index
> Fetch the complete documentation index at: https://openworkflow.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ### When to use OpenWorkflow
>
> Use OpenWorkflow in TypeScript or JavaScript apps for:
>
> - Background jobs that need retries and must resume after a crash or deploy.
> - Multi-step integrations and data pipelines that need to save progress between operations.
> - AI workflows with multiple model or tool calls that need durable checkpoints.
> - Workflows that wait for a human approval, a webhook, or a timer before continuing.
>
> OpenWorkflow runs on Node.js 22.5+ or Bun, with PostgreSQL or SQLite storing workflow state. Your app enqueues runs, and a worker executes them.
>
> ### How to use OpenWorkflow
>
> Read and follow https://openworkflow.dev/skills/setup.md to set up OpenWorkflow.
>
> Define workflows with `defineWorkflow`, wrap operations in `step.run`, and enqueue runs with `ow.runWorkflow(workflow.spec, input)`. Start a worker with `npx @openworkflow/cli worker start` to execute them. See [Workflows](https://openworkflow.dev/docs/workflows.md), [Steps](https://openworkflow.dev/docs/steps.md), and [Signals](https://openworkflow.dev/docs/signals.md) for the APIs.

# Vercel Workflow alternative for Node.js and Bun

> Compare OpenWorkflow and the Vercel Workflow SDK for build requirements, runtime restrictions, and self-hosting with PostgreSQL or SQLite.

## TL;DR

Vercel Workflow, also called the Workflow SDK, runs durable workflows using
`"use workflow"` and `"use step"` directives. Vercel provides managed storage,
queuing, and execution infrastructure. You can also self-host the SDK with its
Postgres backend or another World, its name for a backend adapter.

OpenWorkflow runs in Node.js or Bun workers that connect directly to PostgreSQL
or SQLite. You deploy those workers and manage the database.

## What This Looks Like in Practice

The Workflow SDK transforms your code during the build. Workflow functions run
in a sandbox that enforces deterministic execution. Step functions use the
Node.js runtime for database queries, API calls, and other work. Framework
integrations configure the build and expose the workflow endpoints.

With OpenWorkflow, you define a function with `defineWorkflow` and wrap work in
`step.run`. It uses ordinary TypeScript or JavaScript without a workflow
compiler or framework plugin. You keep the workflow body deterministic and
put side effects inside steps. See [Workflows](/docs/workflows).

## When OpenWorkflow is the Better Fit

* **Your existing deployment**: You already run Node.js or Bun services and
  want to deploy a worker the same way, with direct access to your database.
* **SQLite**: You want a [local database file](/docs/sqlite) for development or a single-server
  deployment, and PostgreSQL for multiple servers.
* **Your existing build**: You prefer explicit step calls and want to keep
  your build setup.

## When Vercel Workflow is the Right Call

* **Vercel hosting**: Your app runs on Vercel, and you want managed workflow
  storage, queuing, scaling, and observability alongside that deployment.
* **Workflow sandbox**: You want the SDK's build integration and sandbox to
  enforce workflow restrictions, and its directives fit how your team writes
  application code.
