01
Click endurance
29k
saved
42.7%
less token use
91k baseline to 62k with Kairn.
Public beta
Context runtime for coding agents.
Kairn sits between retrieval and the agent, governing what context enters the working session so coding agents waste fewer tokens and stay focused longer.
npm install -g usekairn@betaLocal-first. Index and session memory stay on your machine.
Less waste. Repeated and irrelevant context gets filtered before the agent sees it.
Agent-ready. Works through Codex session hooks or local MCP.
What it does
Retrieval can surface possible files and snippets. Kairn decides what belongs in the active coding session.
Find the source files the agent should start with.
Keep repeated context out of long sessions.
Ask for missing evidence instead of guessing.
Govern working context instead of blindly appending retrieval results.
Work through Codex session hooks or local MCP.
Why it matters
Repeated and irrelevant repo context gets filtered before it reaches the agent.
Kairn remembers established source context across a session, so the agent does not restart discovery every turn.
Kairn routes the files that matter without turning every prompt into a repo dump.
In token-limited workflows, lower token use gives you more equivalent agent work from the same spend.
The repo index and session ledger stay on your machine. Beta telemetry is opt-in and aggregate-only.
Beyond retrieval
RAG can surface relevant files, chunks, and tool results. But relevance is not the same as readiness. Kairn decides what reaches the model now, what should be compressed, what should wait, and when more evidence is needed before spending tokens.
01
Files, snippets, tests, diffs, and prior turns that might be relevant.
02
It decides what reaches the model, what shrinks, what waits, and when evidence is missing.
03
Enough source to act, less stale or repeated material.
Not a bigger search result. A better governed prompt surface.
Evidence snapshot
Evidence sets
8+
headline sets plus latest check
Median reduction
42.7%
clean rows shown
Official tasks passed
20/25
Kairn across official campaigns
Endurance suites
4
long-session evidence
01
29k
saved
42.7%
less token use
91k baseline to 62k with Kairn.
02
11k
saved
16.4%
less token use
70k baseline to 58k with Kairn.
03
12k
saved
54.2%
less token use
22k baseline to 10k with Kairn.
The savings shown here only count when the task still passes. Separate evaluator rows also show Kairn improving outcomes when better source focus matters.
Beta paths
The most-tested public beta path for terminal workflows.
The portable path for editors, extensions, and agent UIs.
Optional aggregate feedback that helps improve routing without uploading code.
Privacy
Your source, prompts, diffs, filenames, repo names, branch names, and raw outputs stay local by default. Beta telemetry is opt-in and aggregate-only.
Public beta