Use Postgres for the ledger
Chosen over SQLite for concurrent writers. Revisit if the service stays single-user.





01Local-first memory and reasoning
Cairntir gives every AI agent on your project the same memory: what was decided, what’s still open, and what actually happened. All of it stays on your machine.
The sightline
A cairn marks a path someone has already walked. Cairntir marks your project the same way, so the trail is still there between chats, tools and teammates.
02The problem
When a session ends, its reasoning ends with it.
So someone briefs the next agent by hand. The more agents your team runs, the more hours that costs.
What’s lost when the window closes
What was chosen, and what it replaced.
Why the other options lost.
What’s half done and still waiting.
03What it keeps
Cairntir saves decisions, facts, open work and outcomes word for word, in a local database you own. Every new session starts with a handoff of what matters, and recall finds anything older by meaning, or by the file you’re about to change.
Wing a project · Room a topic inside it · Drawer one memory, word for word
Nothing is ever trimmed. A memory too long for the handoff is listed by name, ready to open in full.
Chosen over SQLite for concurrent writers. Revisit if the service stays single-user.
Keys are versioned. Eviction on deploy is not written yet.
Too long for this handoff, so it’s listed instead. Open it in full with cairntir_get.
cairntir recall "why did we choose Postgres?" --wing myproject
04What makes it different
Setup detects and connects the tools below. Any other MCP client can plug in too, and every one of them reads the same project history.
Nothing is saved just because it scrolled past in a chat. You, or an agent you ask, choose what becomes memory.
What you expected and what actually happened are kept side by side. Neither ever overwrites the other.
Handoffs deliver complete memories, never fragments. Anything that doesn’t fit is listed, ready to open.
Local storage, local search, open source. No telemetry, no account, no cloud.
05In the age of the AI workforce
Teams now run several models and tools at once, and swap them out as better ones arrive. Each new one starts cold. Cairntir keeps your project’s history in one place that every agent can read, whichever one you use next.
Stop briefing every new session from scratch.
The reason behind each choice travels with it, so nobody undoes it by accident.
A local database you can back up, inspect and move.
“On day thirty, opening the project should feel like walking into a lit room.”
What we’re building toward
06Start
Needs Python 3.11 or newer. Setup creates your local memory and connects every supported tool it finds.
Using Cursor? Setup prints one short rule for you to paste into its settings.
pip install --upgrade cairntir
cairntir setup
cairntir doctor
Ask your agent to remember a decision. Start your next task with:
cairntir_handoff(wing="myproject")
07Past the last stone
Available now
Word-for-word local memory, handoffs that brief every new session, recall by meaning or by file, reusable recipes and verified backups.
In progress
Start a task in one tool and finish it in another, right where you left off.
Next
Recall that brings the right memory forward before you ask for it.
Version two
A bigger step for Cairntir: project history that turns into the next useful action, a shared space where your team can read and refine what’s remembered, and routine progress that keeps moving without waiting for a prompt.
The engine at the heart of version two, built to carry work from remembered to finished. More soon.
08Questions
Cairntir is free, open-source memory for AI coding agents. It runs on your machine as an MCP server, saves your project’s decisions, facts, open work and outcomes word for word, and hands them to any connected agent when it starts a task or needs to look something up.
No. Your memory lives in a local database, and search runs locally too. The first run downloads a small search model; after that, the only network calls are optional update checks and any AI provider you choose to connect. There’s no telemetry.
Setup connects Claude Code, Cline, Codex CLI, Copilot CLI, Cursor, Gemini CLI, OpenCode and Qwen Code automatically. Any other MCP client can connect with the cairntir-mcp command.
Chat history is locked inside one tool and one conversation. A rules file is a single document someone has to keep up to date. Cairntir keeps separate, dated memories that every agent can search by meaning or by file, delivers them in full, and keeps what you expected apart from what actually happened.
Nothing. Cairntir is free and open source under the MIT license.
Install it once, and every new session can pick up where the last one left off.
Built and maintained by Patrick McGuire
McGuire Digital · Development and design
“We are problem solvers.”GitHub profile