git404hub

what is belay fr?

b-erdem/belay — explained in plain English

Analysis updated 2026-05-18

8ElixirAudience · developerComplexity · 4/5LicenseSetup · moderate

tl;dr

A Postgres backed durable job engine for Elixir that resumes failed jobs from the last completed step instead of starting over, with built in spend budgets.

vibe map

mindmap
  root((belay))
    What it does
      Step level retries
      Durable job journal
      Human in the loop waits
      Workflow DAGs
    Tech stack
      Elixir
      Postgres
      Postgrex
    Use cases
      AI agent pipelines
      Spend budgets
      Approval workflows
    Audience
      Elixir developers
      Backend engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Run long AI agent pipelines as durable jobs that resume from the last completed step after a crash.

VIBE 2

Add a human approval step to a background job that waits without burning compute until someone responds.

VIBE 3

Cap and track real dollar spend on LLM API calls made inside background jobs.

what's the stack?

ElixirPostgreSQLPostgrex

how it stacks up fr

b-erdem/belayburnerpad/burnerpad-litecaptablex/captablex
Stars8124
LanguageElixirElixirElixir
Setup difficultymoderatemoderatemoderate
Complexity4/53/53/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Requires an existing Postgres database and running the built in migration once at deploy time.

Use freely for any purpose, including commercial use, as long as you include the license and note any changes you made.

in plain english

Belay is a background job engine for the Elixir programming language that runs entirely on Postgres, without needing Redis or a separate workflow server. Its main idea is that a job is made of steps, and each step's result is saved once it succeeds. If a job fails partway through and gets retried, Belay does not redo the whole thing from scratch, it picks up from the first step that did not finish, replaying the already completed steps almost instantly from what it calls the journal. This matters most for jobs that mix expensive work such as calls to a paid API with long waits such as a human approval, or work that fans out across many machines. A classic job queue would retry everything from the start if any part failed, which can mean paying for the same API call twice. Belay's step based recovery avoids that. It also supports a workflow made of multiple steps arranged as a graph, waiting for a signal from a person before continuing, and canceling or steering a job while it runs. Because many of these jobs call paid AI models, Belay has built in spend tracking and budgets. You can set a dollar limit on a single job so it stops once that limit is crossed, set a shared spend limit across many queues so a burst of usage cannot outrun a dashboard, and correct the estimated cost inside a step once you know the real usage from the API response. The project ships with an embedded dashboard you can run inside your own application to watch jobs and workflows live, including a graph view of how a workflow's steps and any spawned child jobs relate to each other. It only depends on Postgrex, Jason, and telemetry, and does not require Ecto. It is distributed under the Apache 2.0 license and is installed as a regular dependency in an Elixir project's mix.exs file, plus a small amount of configuration for queues, storage, and any scheduled cron jobs.

prompts (copy fr)

prompt 1
Help me add Belay to my Elixir app's mix.exs and set up a Postgres backed queue.
prompt 2
Write a Belay worker that transcribes audio, summarizes it with an LLM, and waits for human approval.
prompt 3
Show me how to set a per job budget and a fleet wide rate limit for Anthropic tokens in Belay.

Frequently asked questions

what is belay fr?

A Postgres backed durable job engine for Elixir that resumes failed jobs from the last completed step instead of starting over, with built in spend budgets.

What language is belay written in?

Mainly Elixir. The stack also includes Elixir, PostgreSQL, Postgrex.

What license does belay use?

Use freely for any purpose, including commercial use, as long as you include the license and note any changes you made.

How hard is belay to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is belay for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.