pg-workflows

JSON →
library 0.13.0 ·javascript
verified Jun 5, 2026

pg-workflows v0.13.0 is a TypeScript workflow engine that uses PostgreSQL as its sole backing store for durable execution, event-driven orchestration, and automatic retries. It eliminates the need for Redis, message brokers, or external workflow servers by storing all state in Postgres. Released under MIT, it targets Node >=18.0.0 and Postgres >=10. Key differentiators include a minimal API that feels like plain async TypeScript (no DSL), built-in step-level persistence with exactly-once semantics, event-driven pauses (step.waitFor), scheduling primitives (delay, waitUntil), and client/worker separation. Compared to Temporal or BullMQ, it requires zero new infrastructure and automatically runs schema migrations on start. Peer dependencies are pg (Postgres client) and optionally @opentelemetry/api for tracing. The package ships TypeScript types and is ESM-only.