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 Python Status

Docs · Install · ModelOps lifecycle · Governance · 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 by default: your keys, your GPUs, your logs — nothing leaves your perimeter. A managed cloud is in private beta for teams who would rather not run it themselves; the engine is the same either way.

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.

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: Installation · 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. Read the walkthrough in the ModelOps docs.

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. → HTTP API

Documentation

Overview What cairn is and the governance thesis
Architecture Engine, packs, profiles, request lifecycle
Packs · Operators The pack contract and the operator contract
Governance Policies, HITL gates, budget, audit
Pipelines Chain governed workflows with gates and events
Deployment The compose stack: one .env, profile toggles
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. Interested in the managed cloud or a say in what ships next? Join the waitlist.

Metadata

Release files for cairndev 0.1.4

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.1.4
File Size Uploaded Provenance
cairndev-0.1.4.tar.gz 2.0 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 3.9 MB

Release files / cairndev-0.1.4.tar.gz

Download URL cairndev-0.1.4.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
81720ae01d4caa4590e8534c5e1739636c072b984704aaa42d9f79ba4e5a7c33
BLAKE2b-256 checksum
How to use checksums
6ad4a3668711a583ae5f904478f691e582f120de3656a763c29f6f896cf5899c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.1.4-py3-none-any.whl

Download URL cairndev-0.1.4-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
631a88d680ede6bb19ccfa02e594ce6500f1ae62ceaa690b8c37526ddc1237c0
BLAKE2b-256 checksum
How to use checksums
944d93181be7770df005c5b0c3ce15ae2aa9ee03c05203ab51ffa4f105c03c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.1.4

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.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

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