Skip to content

# Dead-simple workflow orchestration for Supabase

AI workflows you can actually debug.
Build LLM chains, RAG pipelines, and AI workflows with zero external services.
Create Your First Workflow
Run AI Workflow Demo
Terminal window

    npx pgflow@latest install

Sets up pgflow in your Supabase project. View full setup guide →

## Why pgflow

Section titled “Why pgflow”

⚡ < 100ms job startup

Jobs start near-instantly with 100ms polling. No waiting minutes for cron jobs - your workflows begin executing immediately when triggered.

🔌 Run from anywhere

Trigger workflows from database triggers, scheduled pg_cron jobs, browser clients, or RPC calls. Ultimate flexibility in how you start your workflows.

📡 Realtime progress tracking

Watch your workflows execute in real-time via websocket updates. See each step complete as it happens, no polling required.

👁️ Full observability

Every step, retry, and failure is stored in SQL tables. Query your workflow history with standard PostgreSQL - complete transparency into execution.

✨ No boilerplate

Skip the tedious wiring of pg_cron to queues to Edge Functions. pgflow handles all the plumbing so you focus on business logic.

📦 Zero new infrastructure

Everything runs in your existing Supabase project. No external services, no vendor dashboards, no additional infrastructure to manage.

## What Developers Are Saying

Section titled “What Developers Are Saying”

Real comments after seeing early demos

←
@Revolutionary-Fact28
(Reddit)

> This looks amazing! I built a system on edge functions but it was very complicated and took so much time. I will probably switch to this.

@CjHuber
(Hacker News)

> Exactly what I was looking for without even knowing it. Thank you for saving me tons of time in my project.

@bctreehugger
(Reddit)

> Amazing work on taking the initiative to build this out. Watching closely and looking forward to using it once my project has a need for it.

@bota01
(Reddit)

> This is very needed and the product looks nice. Can't wait for it to be production ready.

@Danish
(Discord)

> Waiting for your amazing work to be production ready!

@tomaspozo_
(Discord)

> This sounds awesome! Looking forward to see it.

@homj
(Discord)

> Sounds good, I'm looking forward to it!

→

## Type-safe DAG workflows in TypeScript

Section titled “Type-safe DAG workflows in TypeScript”

Define parallel, type-safe DAG workflows effortlessly:

    new Flow<{ url: string }>({ slug: 'analyze_website' })  .step(    { slug: 'website' },    async (input) => await scrapeWebsite(input.run.url)  )  .step(    { slug: 'summary', dependsOn: ['website'] },    async (input) => await summarizeWithAI(input.website.content)  )  .step(    { slug: 'tags', dependsOn: ['website'] },    async (input) => await extractTags(input.website.content)  )  .step(    { slug: 'saveToDb', dependsOn: ['summary', 'tags'] },    async ({ run, summary, tags }) =>      await saveWebsite({        user_id: run.user_id,        website_url: run.url,        summary,        tags,      })  );

## Perfect for teams who

Section titled “Perfect for teams who”

- Build AI applications on Supabase
- Need workflow orchestration without external services
- Want to debug exactly where workflows fail
- Value type safety and instant startup times
- Understand this is early but powerful software

## How it works

Section titled “How it works”

1. Define workflows in TypeScript with full type safety
2. Compile to SQL migrations with automatic dependencies
3. Deploy as Supabase Edge Functions
4. Trigger from SQL, browser, or scheduled jobs

Everything runs within your Supabase project - no external orchestrators or infrastructure.

## Ready to get started?

Section titled “Ready to get started?”
Check Demo app Try out the app that uses pgflow under the hood
Install pgflow Install pgflow into your Supabase project in few minutes