What is cairn
cairn is a self-hosted control plane for the work behind AI models: preparing datasets, fine-tuning, evaluating, serving and batch inference. It decides when each step may run, holds the spend to a budget, pauses for a data check or a person, and keeps a record of what happened. Your engines and providers do the work.
The problem
Section titled “The problem”Work on models spends money and changes things. A fine-tune buys GPU hours, a batch job buys tokens, and a promoted model or a new dataset version is what other people build on next.
So the same questions come up every time. Before a run: what will it cost, and who agreed to it? After a run: what ran, on which data, who approved it, and what did it cost? Without a control plane the answers live in scripts, notebooks and memory.
What cairn does
Section titled “What cairn does”You describe the work as a pipeline: a YAML file that lists the legs to run, their order, and the gates between them. cairn then does five things.
- One launch door. The console, the CLI and a schedule all start a pipeline through the same code. Policy can add a gate, or refuse the launch, before anything is recorded.
- Every leg is its own run. cairn hands each leg to the engine or operator that does the work, then tracks its status and cost.
- Gates. A gate is answered by data (a predicate over earlier results) or by a person. A waiting gate is stored, so it survives a restart.
- Budgets. Pricing is a step you can gate on before anything spends, and flow legs reserve their estimate against a budget before they start.
- The record. Each pipeline keeps its plan, its inputs, the run behind every leg, and every gate’s verdict and approver. Outputs are registered as content-addressed artifacts.
flowchart TD
start["Console · CLI · schedule"] --> door["Launch door<br/>policy · budget"]
door --> pipe["Pipeline"]
pipe --> legs["Legs: flow · task"]
pipe --> gates{"Gates: data · person"}
legs --> work["Your engines and providers"]
pipe --> record[("Record")]
What cairn does not replace
Section titled “What cairn does not replace”cairn orchestrates and governs. The work itself runs on tools you choose.
| Work | Runs on |
|---|---|
| Data processing | a dataflow engine: the built-in one, Prefect, Metaflow or SkyPilot |
| GPU training | a provider operator: Modal, RunPod, Vast.ai or Kaggle (or local CPU) |
| Model calls | your model API, or any OpenAI-compatible endpoint |
| Durable execution | the in-process runtime, DBOS or Temporal |
| State | SQLite or Postgres |
Words used in these docs
Section titled “Words used in these docs”| Word | Meaning |
|---|---|
| Pipeline | The thing you launch: a YAML file of legs and gates. |
| Leg | One step of a pipeline. A leg that does work is its own run. |
| Flow | A component a leg runs: a data or ML stage list, or an agentic markdown flow. |
| Step | A stage or node inside a flow. |
| Gate | A leg that stops the pipeline until data or a person says go. |
| Environment | Where a pipeline runs, and which operator does each kind of work there. |
| Operator | The code that talks to one tool or provider. |
| Pack | A directory (or installed package) that holds pipelines, flows and policies. |
- Quickstart: run cairn locally, launch a pipeline and approve a gate.
- Pipelines, legs and steps: the model in more detail.
- Install and deploy: run cairn for your team.