Skip to main content

cairn

cairn

An open-source control plane for governed ModelOps.
Fine-tune, evaluate, promote, and serve models as single governed commands — cost-capped before the GPU spins up, policy-gated, and audited end to end.

Docs Website Live demo Python Status

Docs · Live demo · Install · Pipeline catalog · Gates and approvals · Waitlist


What is cairn?

cairn runs the work behind AI as governed commands. You declare an outcome — gate a dataset, fine-tune a model, evaluate it against a baseline, promote it, serve it — and cairn drives the tools underneath, enforces the guardrails, and records exactly what ran.

The engine is domain-neutral. Everything that knows about a domain lives in a pack; everything that touches a tool is an operator. The engine never imports a pack — that one-way dependency is what lets the same machinery run fine-tuning, dataset checks, model evaluation, or incident response, and lets any operator inherit the budget, policy gate, and audit for free.

cairn is open source (Apache 2.0) and self-hosted: your keys, your GPUs, your logs — nothing leaves your perimeter.

Why governed?

This is what separates cairn from a bare agent loop or a black-box tool — the work runs behind deterministic guardrails you can inspect afterward:

  • Hard budget — every run accrues cost in a scope; over the cap it raises BudgetExceeded, so a fine-tune can't quietly overspend.
  • Policy + human approval — proposed actions pass declarative policy rules before any executor runs; high-risk ones (promote a model, destroy a resource) pause for a human and resume durably from a checkpoint.
  • Reproducible runs — every run stores its validated inputs, a content- addressed schema hash, and the exact operators it resolved to. Replay any run; explain any result.
  • Tamper-evident audit — every model call, tool call, and approval lands in a hash-chained, append-only log: what ran, what it cost, who approved it.
  • Citation validation — for synthesized answers, every identifier the model cites is exact-string-matched against its context; unmatched citations are stripped.

Quickstart

The engine ships as the cairndev distribution (import name cairn). The cairndev wheel carries the builtin operator packs (14) and the core contracts (13); their sources live under packages/ in this repository. The public release is five wheels: cairndev, cairn-client, the optional Metaflow and SkyPilot engines, and the example pack cairn-pack-hello.

curl -LsSf https://docs.cairndev.sh/install.sh | sh     # or: pip install cairndev
cairn --version && cairn doctor

Or try it without installing: the live demo at https://demo.cairndev.sh (a shared sandbox, so don't enter real credentials). The Quickstart runs a pipeline on a local engine.

From source:

git clone https://github.com/cairndev-sh/cairn && cd cairn
uv sync --extra dev
uv run cairn --help

A domain pack is a data wheel the engine discovers through an entry point; the example pack shows the shape, and a governed run is a declared pipeline:

CAIRN_PACK_PATH=examples/hello-cairn uv run cairn pipeline ls
CAIRN_PACK_PATH=examples/hello-cairn uv run cairn pipeline explain hello-cairn/profile-and-publish

Those are the commands the public CI job runs on every change. The container image is built from Dockerfile.engine, the Helm chart lives under deploy/helm/cairn, and the optional extras are auth, dataflow-engine, dev, hello, infisical, kernel, metaflow, nats, oauth, optuna, pii, rag, rag-pgvector, rag-pinecone, rag-qdrant, rag-sqlite-vec, rerank-cohere, rerank-cross-encoder, runtime-dbos, runtime-postgres, runtime-sqlite, runtime-temporal, skypilot, ssh, storage-postgres, telemetry, train. Full setup: Install and deploy · CLI reference.

The ModelOps lifecycle

Each stage is a normal governed run; chained together they form one auditable spine — as a template's subgraphs, or as an explicit pipeline.

flowchart LR
  D[Gate dataset] --> P[Prep · scrub · split]
  P --> T[Train · local or remote GPU]
  T --> E[Evaluate · deterministic gates]
  E --> H{{Human approval}}
  H --> R[Register · MLflow]
  R --> S[Serve · vLLM]

Deterministic gates decide pass/fail; LLM judges are advisory and off by default. Promotion pauses for a human. The shipped pipelines are listed in the pipeline catalog.

One engine, many surfaces

The same governed core is driven from two places in this repository:

  • CLI — the full control surface: run, preflight, replay, approve, deploy. → CLI reference
  • HTTP + SSE API — every control-plane action is an endpoint, including live run streaming.

Documentation

Overview What cairn is and the governance thesis
Architecture Engine, packs, profiles, request lifecycle
Write a pipeline · Capabilities and operators Packs, and how operators pick up a provider
Gates and approvals · Cost and budgets Policies, HITL gates, budget, audit
Pipelines Chain governed workflows with gates and events
Install and deploy Install, Docker Compose, Helm, sign-in
Operators catalog Every shipped operator, by domain

Status & license

cairn is in early access and under active development. The API and command surface may still change between releases; see CHANGELOG.md.

Licensed under the Apache License 2.0 — see LICENSE. Contributions are welcome: read CONTRIBUTING.md first. Want a say in what ships next? Join the waitlist.

Metadata

Release files for cairndev 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cairndev 0.3.1
File Size Uploaded Provenance Actions
cairndev-0.3.1.tar.gz 2.1 MB Without provenance Details for cairndev-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cairndev 0.3.1
File Interpreter ABI Platform Actions
cairndev-0.3.1-py3-none-any.whl Python 3 none any Details for cairndev-0.3.1-py3-none-any.whl

Total release size: 4.1 MB

Release files / cairndev-0.3.1.tar.gz

Download URL cairndev-0.3.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4c6546cb48a530b5f689285d5cf9d6f460877b93646aa241d3153e48627f8831
BLAKE2b-256 checksum
How to use checksums
116f882d26db9647d09e0e8ff8d690c0e2c7476121ebe1625ac9a35984994843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cairndev-0.3.1-py3-none-any.whl

Download URL cairndev-0.3.1-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
141a08cad45764f9418f539d21523d2b079783b29b52cc7ce0c4287cd3cc86d6
BLAKE2b-256 checksum
How to use checksums
4b2f9b6829de61de401adab9c2130d681cbf3cb142a1d8ce8766609aee9e5831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cairndev 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page