agentcairn plugin

agentcairn keeps Claude Code, Codex and Cursor memory in Markdown files for Obsidian and hands an agent only what it needs

  • 75 ★ on the repository
  • Last commit
Plugin

Extended access

Why this level

  • Hooks read session transcripts and write a distilled summary to `~/agentcairn` as plain text; recognized credentials are redacted, but the notes are worth reviewing
  • The plugin installs an MCP server and hooks into agent settings and edits MCP config with a backup first
All reasons and checks

ccf/agentcairn

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add plugins/agentcairn

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Hooks read session transcripts and write a distilled summary to `~/agentcairn` as plain text; recognized credentials are redacted, but the notes are worth reviewing
  • The plugin installs an MCP server and hooks into agent settings and edits MCP config with a backup first

This is third-party code. Review the repository files before installing.

What it does

agentcairn collects context from coding agent sessions and writes it as Markdown notes with provenance. The vault lives in `~/agentcairn` and opens in Obsidian as an ordinary folder: a note edited by hand is honored on the next read. The DuckDB index is only a cache that can be deleted and rebuilt without touching the notes. On recall the agent receives BM25 and semantic vector results fused with Reciprocal Rank Fusion, optionally reranked. The current project gets a boost, and notes from other projects stay available with a label. Stale facts are never deleted: `valid_from`, `valid_until` and `superseded_by` demote them in results but keep the history. On Claude Code the plugin installs an MCP server, a memory skill and hooks: per-turn recall and capture at session end or compaction. The commands `/agentcairn:recall`, `/agentcairn:remember`, `/agentcairn:memory`, `/agentcairn:savings` and `/agentcairn:ingest` work in chat. Other clients read the same notes through MCP, and `cairn sweep` collects transcripts in the background. Embeddings are computed locally and there is no telemetry.

Who it is for. People who run several coding agents and want one shared memory they can read and edit in Obsidian.

Good fit when

  • You switch between Claude Code and Codex and the second agent should know what the first decided
  • The project has accumulated agreements like "deploys are blue-green" and the agent asks about them every time
  • You keep notes in Obsidian and want agent memory to live there as ordinary files
  • You want to see how much memory shrinks the context: `/agentcairn:savings` shows the saving

Not a fit when

  • Memory must live in the cloud and sync between machines without your own storage
  • You need a knowledge graph with automatically extracted entities: links here come from wikilinks and `cairn link`
  • You work only in VS Code with Copilot, where ambient memory is unavailable and only plain MCP works without hooks

Example request

Install agentcairn for Claude Code, remember that staging deploys are blue-green, and check in a new session that you recall it

Limitations

  • The plugin launches through `uvx`, so uv must be installed first.
  • The first run may download and warm the embedding and reranking models.
  • Ambient memory is not everywhere: Cursor and Antigravity get it only through `cairn sweep`, while VS Code with Copilot and Claude Desktop work as a plain MCP server without it.
  • An empty vault recalls nothing until the agent or you write the first facts with remember.

How to disable. For Claude Code run claude plugin uninstall agentcairn@agentcairn, and remove the plugin in Codex with codex plugin. The `~/agentcairn` vault stays on disk as a plain Markdown folder and can be deleted by hand. The DuckDB cache lives outside the vault and rebuilds itself.

FAQ

How do I install agentcairn in Claude Code?

Run claude plugin marketplace add ccf/agentcairn, then claude plugin install agentcairn@agentcairn. The plugin bundles the MCP server, the memory skill and the hooks, so no separate package is needed, only uv.

Where are the notes stored and can I edit them by hand?

Notes are Markdown files in `~/agentcairn`. A manual edit is honored on the next read because the DuckDB index rebuilds from the files.

Does agentcairn send data anywhere?

No, there is no telemetry. FastEmbed computes embeddings locally, the MCP server uses stdio, and no external database or daemon is needed. Automated writes pass through redaction of recognized credentials.

What happens to an outdated fact?

The fact stays in the vault. `valid_until` and `superseded_by` demote it in results, current notes rank first and the history remains inspectable.

Which agents are supported?

Claude Code and Codex get a plugin with hooks, OpenCode a plugin, Hermes Agent a memory provider, and Cursor and Antigravity connect through MCP and background collection. VS Code with Copilot and Claude Desktop work as an MCP server.

Discussion

No questions or reviews yet.

Plugins

Persistent agent memory in a folder of linked markdown notes, so Claude Code remembers a project across sessions

MCP serverExtended access336Repository stars

Knowledge-graph memory for agents: Claude Code and Codex plugins, an MCP server and a Python library

PluginExtended access33.3KRepository stars

Local memory for Claude Code, Codex and Claude Desktop: one Markdown folder and one MCP server shared by all.

MCP serverExtended access103Repository stars

Long-term agent memory in local Markdown files with a link graph, semantic search and MCP access

MCP serverExtended access4.6KRepository stars

Persistent memory for coding agents: insights are stored as markdown cards and recalled at the start of the next session.

MCP serverExtended access144Repository stars

Long-term memory for AI agents: Markdown files as the source of truth, a SQLite index as a cache, shared by Claude Code, Codex and others

CLIExtended access4.3KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
agentcairn (this card)no75
Claude-Memno116,457stores Claude Code sessions in its own database and has no Obsidian files
MemPalaceyesnot required60,537a separate memory system with a different storage model
Obsidian Mindno5,528an Obsidian vault for Claude Code without a shared memory across several agents

README in short

The repository opens with the promise of one memory across supported agents and links to the site, PyPI and the Obsidian companion. Plugin install commands for Claude Code and Codex follow, then the agentcairn-setup skill and a remember and recall check. A contract table lists five promises: Markdown as source of truth, a disposable index, one vault across agents, non-lossy history and context on every result. A table of supported agents and a section on direct use close the page.

README badge

Report a problem