One agent learns it.Every agent knows it.

Cairn is open-source memory for coding agents. It keeps what each session learns about your repository and hands it to the next one, in whichever agent you open, before the first prompt.

$ uv tool install --python 3.12 cairn-brain
CodexTuesday 16:20 · session 1
› The session-start hook hangs while a sync runs. Fix it.  reading src/cairn/hooks.py, src/cairn/store.py  ✗ database is locked: the hook waits behind the sync  Opening the store wrote schema_version every time.  Read-only opens skip the write now.  ✓ tests pass · 2 files changed   ● cairn_remember  kind=gotcha    Agent hooks never fail on a busy store    stored with its source, commit 81efc41
Claude CodeWednesday 09:02 · next session
memory arrives via a SessionStart hook, with this visible panel
▲ cairn · cairn — what this project remembers  What the team knows (32 memories)   gotcha  Agent hooks never fail on a busy store           (commit 81efc41, 6h ago) Handle with care   src/cairn/hooks.py — 6 of 13 commits were fixes or reverts › Add a timeout to the session-start hook.  Memory says hooks must never fail on a busy store.  Keeping the read-only open; the timeout returns no brief.
Open the next session in

A replay with staged prompts. The memory, the panel and the brief text are real output from Cairn's own repository on October 6, 2026. Filled dot: verified live. Ring: wired, not yet tested live.

01 What forgetting costs

Without memory, agents read their way back in.

Before editing src/cairn/router.py, an agent asked Cairn what depends on it. The cited answer cost 391 tokens. The 33 files behind that answer come to 144,228 tokens.

33 files an agent would open144,228 tokens
Cairn's answer, 391 tokens, drawn to the same scale
369×

times fewer tokens. The answer still lists dependents, tests to run, past fixes and the task that owns the code.

0model calls to open a session, about 2,200 tokens of context
~1.24Mtokens of file reading saved across 25 answers
875files mapped into 16,906 nodes
32 · 1,216team memories and session notes, each with a source

Cairn on its own repository; savings as of October 8, 2026, other counts unchanged since October 6. Sources: cairn status, cairn recap, the session-start hook and the Overview page. Each answer is logged with its size and the size of the files it cites.

  • Without memory, agents
  • re-read the same files
  • miss the caller three hops away
  • repeat the fix you reverted
  • never hear the team's decision
  • start over when you switch tools

02 What it remembers

Open a session. It already knows the project.

This is what Claude Code shows when a session opens in Cairn's own repository, unedited. It is built from the local store with no model calls. Every other agent receives the same memory as a written brief.

Claude Code~/code/cairn · session start
▲ cairn · cairn — what this project remembers

1Pick up where you left off · 3h ago in OpenCode
   Asked  Verify cairn MCP server status by calling cairn_status tool…
   Done   Successfully invoked cairn_status MCP tool; tool returned…
   Next   Session idle pending next user request

2New since then
   + gotcha   Injected context, hints and tool descriptions must name real…
   + commit   fix: session capture never climbs above the repository root
   + 1 more commits

3What the team knows (32 memories)
   gotcha   The MCP server creates nothing where Cairn is not set up…
            (commit 7a6c581, 4h ago)
   gotcha   Agent hooks never fail on a busy store: Opening the store…
            (commit 81efc41, 6h ago)
   gotcha   Windows support: cross-process file locks use msvcrt where…
            (commit 1481d1c, 1d ago)

4Handle with care
   src/cairn/hooks.py — 6 of 13 commits were fixes or reverts, last 2h ago
   src/cairn/cli.py — 4 of 13 commits were fixes or reverts, last 3h ago

5Open work
   90 drift findings, e.g. `pyproject.toml` changed after T001… → cairn drift

875 files mapped · 32 memories · 1,216 session notes · http://127.0.0.1:4747
  1. 1Last sessionWhat it asked, did and left next, from any agent.
  2. 2New sinceMemories and commits since then.
  3. 3Team knowledgeOne sentence each, with its source and age.
  4. 4Fragile filesMostly fixes and reverts lately.
  5. 5Open workWhere code drifted from its spec.

03 Across the lifecycle

Every stage reads from it. Every stage writes back.

People and agents trade work from spec to ship. Cairn is the memory both sides share, so each stage starts with what the last one learned and the next cycle starts ahead. Pick a stage to see the real output.

  1. Specify. /cairn.specify and /cairn.clarify write the spec; lasting decisions become memory.
  2. Plan. /cairn.plan grounds the plan in context, impact and recall; /cairn.tasks checks impact for every file.
  3. Implement. The brief at session start, context on each prompt, impact and why before edits.
  4. Review. cairn review-context shows callers, tests and history; cairn drift runs until clean.
  5. Ship. Git hooks re-sync after the merge; cairn standup reads commits against requirements.
  6. Learn. Session summaries, timeline facts and recorded learnings start the next cycle.

What becomes possible

  • Agents check the history before repeating a reverted fix.
  • A new hire's agent knows the team's conventions on day one.
  • Reviews see callers, tests and past reverts next to the diff.
  • Switch or mix agents without losing what any of them learned.
  • Knowledge stays when people move on to other work.
  • Impact reaches sibling repositories named in system.yaml.

04 Agents, data, cost

One memory for the agents your team already uses.

cairn global install wires each agent at user level, writing only what that agent supports. cairn uninstall removes exactly that. Switch agents mid-week and the memory comes along.

Claude Code

Session-start hooks for the panel and the brief, plus context on each code prompt

Verified live

Codex

A session-start hook; approve Cairn's hooks once under /hooks

Verified live

OpenCode

A plugin that adds the memory to the system prompt

Verified live

Copilot CLI

An instructions file kept out of git

Verified live

Antigravity

An always-on rule kept out of git

Verified live

Cursor

A session-start hook, in the IDE and cursor-agent

Wired, not yet tested live

Gemini CLI

A session-start hook, also under gemini -p

Wired, not yet tested live

Also wired: VS Code with Copilot, and Windsurf. Any other MCP client can run cairn mcp. Agents reach 13 MCP tools, including impact, why, recall and search. What each agent gets · MCP tools

Privacy

Your code stays where it already lives.

Your laptop

Where it all starts

Session capture, the code map, memories and the token ledger, in the repository's .cairn/ folder. None of it leaves unless you connect a team server.

Your git host

Already your repository

Specs, ADRs and shared config travel with the code and get reviewed like code.

Your team server

Optional, self-hosted

Shared memories and pushed sessions, with private blocks removed and secrets masked, under each member's token.

A model provider

Optional, per call

Prompts for summaries and facts, only when a model is configured. Turn it off and everything above still works.

  • Private stays private. Text inside <private> tags is never stored. Values that look like keys or passwords are masked before anything is written.
  • Loopback only. The local server listens on 127.0.0.1. Anything wider needs team mode with sign-in.
  • Works offline. Search vectors are computed on your machine.

Cost

No model on day one. Your model when you want one.

  • Free to start. The map, impact, why, drift, recall and the session panel are computed from your repository.
  • Bring a model for more. An Anthropic or OpenAI-compatible key, a local endpoint, or your signed-in Claude Code plan. Each job goes to the cheapest tier that does it well.
  • Budgets you set. Timeline facts stop at 150,000 tokens per sync by default, or turn them off.
  • A ledger of every call, on your machine:
TerminalCairn's own repository, all calls to date
$ cairn models --ledger
  tier      model                       calls  input      output
  fast      claude-haiku-4-5-20251001   878    1,021,846  1,909,422
  balanced  claude-sonnet-5             217    432        442,679
  deep      claude-opus-5-5             22     5,213      18,497

Cache column trimmed. With the Claude Code provider, these tokens count against your plan's usage. Models and cost

05 Plans

Free to run. Paid when a team wants one view.

Everything on this page up to here is in the open-source release. The paid plans add a shared view on top, for teams that want one.

Free · available now

Open source

  • Every layer, every agent, the CLI and the 13 MCP tools
  • The session panel, brief and per-prompt context
  • The local page, review context, standup and recap
  • A self-hosted team server with sign-in, four roles, API tokens and an audit log

Apache-2.0 · v0.2.2

Install

Early access

Team

  • A hosted control plane
  • One dashboard across repositories
  • A review queue for memories
  • Search and impact across repositories
  • Usage and savings analytics
Request early access

Talk to us

Enterprise

  • Self-hosted, or in your cloud
  • SSO and SCIM
  • Audit
  • Redaction and retention controls
Start a conversation
Available nowSelf-hosted team server: sign-in, roles, tokens, audit log, git projects re-synced by push webhooks.
In developmentTeam knowledge in git: memories, decisions and session summaries shared through your repository.
In developmentLive verification for Cursor and Gemini CLI.

06 For partners and investors

Memory is splitting by vendor. Cairn keeps it with the team.

The case in three parts, for anyone deciding whether to build on Cairn, partner with us or back it.

Why now

Teams run several agents, and each remembers inside its own product.

Developers mix Claude Code, Codex, Cursor, Copilot and others, often in the same week. What the team knows ends up scattered by tool and by person.

Why Cairn

Agent-neutral, local-first, open, and the customer owns the data.

One memory for seven agents. It runs on the developer's machine under Apache-2.0 and keeps what it knows in the repository, the team's git and the team's own server.

The business

Open source first, then Team, then Enterprise.

Developers adopt the open-source release one repository at a time. Teams pay for the hosted view across repositories. Enterprises pay for self-hosting, SSO and SCIM, audit and data controls.

Give every agent the same memory.

Three commands, about 15 seconds of setup with no model. Then open your agent the way you always do. You need Python 3.11 to 3.13 and git. No Docker, database server or API key.

Terminalsetup
# install the CLI
$ uv tool install --python 3.12 cairn-brain
# wire every agent on this machine
$ cairn global install
# map the repository, seed memory, add git hooks
$ cd your-repo && cairn init --no-deep