Build Durable Workflows
in Ruby

Ductwork is a modern workflow orchestration framework that makes complex job pipelines maintainable, durable, and recoverable.

app/pipelines/enrich_all_users_data_pipeline.rb
# Define your pipeline with the DSL
class EnrichAllUsersDataPipeline < Ductwork::Pipeline
  define do |pipeline|
    pipeline.start(QueryUsersRequiringEnrichment)
            .expand(to: LoadUserData)
            .divide(to: [FetchDataFromSourceA, FetchDataFromSourceB])
            .combine(into: CollateUserData)
            .chain(to: UpdateUserData)
            .divert(to: { success: NotifyUser, otherwise: FlagForReview })
            .converge(into: FinalizeUserRecord)
            .collapse(into: ReportUserEnrichmentSuccess)
  end
end

# Run your pipeline!
EnrichAllUsersDataPipeline.trigger(days_since_last_enrichment: 7)

Why Choose Ductwork?

Everything you need to build reliable, scalable job pipelines in Ruby

Workflow Orchestration

Define and run complex workflows with branching, parallel execution, and branch merge methods.

Durable Execution

Automatically resume interrupted or orphaned pipelines after a worker crashes, with no manual intervention.

Error Resilience

Automatic retries, graceful failure handling, and detailed error reporting ensure reliability.

Recovery Mechanisms

Parent reaper processes monitor resources and release stale claims so no workflow is ever stuck.

State Persistence

Durable state management lets you deploy without the fear of interrupting pipeline execution.

Rails Integration

First-class Rails support with generators, configurations, and ActiveRecord integration out of the box.

Designed For

Ductwork shines in scenarios where building traditional job queues fall short

 AI Workflows

LLM chains that checkpoint each step, so a timeout resumes instead of using costly tokens

 Order Fulfillment

Complex order workflows with inventory checks, payment processing, and notifications

 Data Migrations

Large-scale data transformations with checkpoints and rollback capabilities

 ETL Pipelines

Extract, transform, and load data with parallel processing and error recovery

 Email Campaigns

Multi-stage email workflows with personalization, scheduling, and tracking

 Onboarding Pipelines

User onboarding processes with sending welcome emails and reminders

Are your background jobs durable?

A job with two side effects, or a job that enqueues another job, is one crash away from double-charging a customer or silently dropping work. This prompt reads your codebase and tells you exactly where atomicity gaps are.

Read-only No network calls Nothing installed

Works in Claude Code, Codex, Cursor, Copilot, or any agent that can read a repository.

Step 1

Copy

The whole prompt lands on your clipboard. Nothing is downloaded or installed.

Step 2

Paste into your agent

Open your Rails project in whichever coding agent you already use and paste.

Step 3

Read the report

Every gap, ranked, with the crash that causes it and what a fix has to guarantee.

Sample finding

Double work — app/jobs/checkout_job.rb:14

After the charge, before the status update: the customer is charged and the order still reads pending. A retry charges them again.

What a fix must guarantee: the charge runs at most once for a given order even if perform runs five times.

From an Early Adopter

“

Sometimes the problems that we as programmers need to solve are simple. Sometimes, though, they’re thorny, with complex edge cases and are fraught with a litany of unpredictable failure scenarios. Ductwork provides a framework with an elegant approach to the latter — speaking from personal experience using Ductwork, it’s saved me tens of hours developing, refining, and making something DIY production-ready. If you like software that does its job and does it incredibly well then I highly recommend kicking the tires.
Rob Sterner

Rob Sterner

Principal Engineer @ Nift

Simple, Transparent Pricing

Start free and scale as you grow. Both plans include core workflow features.

Open Source

Free Forever

Perfect for proof-of-concepts, getting started, and small-scale deployments

Get Started
Most Popular

Pro Tier

$200 /month

Built for production workloads, large-scale pipelines, and teams that need more control

Start 14-Day Free Trial

or $2,000/year billed annually (2 months free)

Compare plans in detail

Feature Open Source Pro Tier
Fluent Ruby DSL for defining workflows
Conditional branching
Durable, database-backed workflow state
Tunable job worker and pipeline advancer thread pools
Automatic restart of hung processes and threads
Automatic recovery of work from crashed workers
Forked or single-process threaded execution
Web dashboard, mountable as a Rails engine
Payloads with unlimited items, streamed in batches —
Human-in-the-loop functionality —
Concurrency limiting per shared resource —
Rate limiting per shared resource, with burst —
Trigger and step delay and scheduling functionality —
Step timeout functionality —
Batched, incremental fan-out and fan-in that scale to millions+ of steps —
StatsD metrics —
Support Community Direct, priority
Need something custom for your team?   Get in touch