Skip to content

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.

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.

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")]

cairn orchestrates and governs. The work itself runs on tools you choose.

WorkRuns on
Data processinga dataflow engine: the built-in one, Prefect, Metaflow or SkyPilot
GPU traininga provider operator: Modal, RunPod, Vast.ai or Kaggle (or local CPU)
Model callsyour model API, or any OpenAI-compatible endpoint
Durable executionthe in-process runtime, DBOS or Temporal
StateSQLite or Postgres
WordMeaning
PipelineThe thing you launch: a YAML file of legs and gates.
LegOne step of a pipeline. A leg that does work is its own run.
FlowA component a leg runs: a data or ML stage list, or an agentic markdown flow.
StepA stage or node inside a flow.
GateA leg that stops the pipeline until data or a person says go.
EnvironmentWhere a pipeline runs, and which operator does each kind of work there.
OperatorThe code that talks to one tool or provider.
PackA directory (or installed package) that holds pipelines, flows and policies.