kairn

Getting Started

What Kairn is and how to start the public beta.

Kairn is a context runtime for AI coding agents.

It sits between retrieval and the agent, governing what context enters the working session.

RAG retrieves candidate context. Kairn decides what should actually reach the agent during execution: source, a smaller hint, silence, or one missing piece of evidence.

Install

Install the public beta package, then initialize Kairn inside the repo you want it to assist:

npm install -g usekairn@beta
cd /path/to/repo
kairn init
kairn doctor

The npm package installs the global kairn command. kairn init is the per-repo setup step.

Best first path

Codex CLI session mode is the most-tested path:

kairn codex

Use MCP when you want Kairn inside an editor or agent UI instead of a terminal session.

Why it helps

Kairn reduces waste by remembering established source context, routing the next turn toward relevant files, and staying quiet when extra context would add noise.

Read How Kairn Works for the local architecture.

What to expect

Kairn may stay quiet. Silence means the governor decided extra context would probably add noise or cost more than it saves.