One memory trail across your connected coding agents.
AgentCairn keeps durable context in Markdown you can inspect, edit, and carry between Claude Code, Codex, Cursor, OpenCode, and other MCP hosts. A rebuildable local index gives each connected agent fast, cited recall from the same vault.
No hosted account · no external database · Apache-2.0
“Staging deploys use blue-green.”
↳ written and indexed
--- type: memory permalink: staging-deploys-use-blue-green-5b9d7c60 source: memory://agent/remember project: checkout-service harness: mcp --- - [context] Staging deploys use blue-green. #rememberedUse the blue-green deployment strategy.
↳ staging-deploys-use-blue-green-5b9d7c60 · current · checkout-service
DuckDB index: derived locally · safe to delete and rebuild
The contract
The files are canonical. The index is replaceable.
Every durable fact lives in an ordinary Markdown file. Open it in your editor or Obsidian, correct it by hand, sync it however you choose, and the next reconciled read honors the change.
DuckDB is only the fast retrieval layer. Delete it and rebuild it from the vault without sacrificing the memory trail your agents share.

Keep
Readable files
Notes, frontmatter, and [[wikilinks]] remain the durable record.
Rebuild
Disposable index
BM25, vectors, graph signals, and reranking can be regenerated from Markdown.
Recall
Cited context
Project, currency, and a permalink travel with each retrieved memory.
Try the failure mode that matters.
Delete the index. The memory stays.
This illustrative sequence removes the derived cache, rebuilds it from Markdown, and recalls the same fact. The valuable part was never trapped in the database.
Illustrative disposable-index sequence
- rm -f /tmp/cairn-demo.duckdbdemo index deleted.
- cairn reindex ~/vault --index /tmp/cairn-demo.duckdbrebuilding from Markdown… 128 notes indexed.
- cairn recall "auth fix" --index /tmp/cairn-demo.duckdbsame fact recalled from the rebuilt index. The vault was the truth.
Choose your agent. Get one exact path.
Every route uses the same Markdown vault, but each host has different integration boundaries. Start with the recommended setup for the agent in front of you.
Measured retrieval, explained plainly.
The benchmark harness and raw results are public. The useful conclusion is simpler: hybrid retrieval finds more relevant memory while returning a small fraction of the full history.
Find the useful turn
66.2% of answer-bearing turns found in the first five results on LoCoMo with hybrid retrieval and the reranker, macro-averaged across queries, compared with 52.7% for BM25 alone.
Carry less history
About 51–65× less recalled context at k=10 across the measured samples (three LoCoMo conversations and the LongMemEval-S 500-instance set). This uses a ~4-characters-per-token estimate and is not billed-cost savings.
Open full benchmark tables, metric definitions, and caveats
Recall@5 is the fraction of all answer-bearing turns retrieved in the first five results, macro-averaged across queries.MRR rewards placing the first matching turn closer to the top.
Retrieval — LoCoMo
Swipe to see every metric →
| arm | r@5 | r@10 | MRR |
|---|---|---|---|
| BM25 only | 0.527 | 0.604 | 0.459 |
| vector only | 0.536 | 0.637 | 0.433 |
| hybrid (RRF) | 0.562 | 0.648 | 0.477 |
| hybrid + reranker | 0.662 | 0.735 | 0.608 |
LoCoMo retrieval, turn-level macro-avg, FastEmbed nomic-embed-text-v1.5 (the default).
Retrieval — LongMemEval-S
Swipe to see every metric →
| arm | session r@5 | session MRR | turn r@5 |
|---|---|---|---|
| BM25 only | 0.920 | 0.918 | 0.680 |
| vector only | 0.936 | 0.916 | 0.507 |
| hybrid (RRF) | 0.954 | 0.938 | 0.640 |
| hybrid + reranker | 0.969 | 0.963 | 0.788 |
LongMemEval-S, full 500-instance set. Full turn r@10/MRR in benchmarks/README.md.
Context efficiency
Swipe to see every metric →
| dataset | haystack | recalled | reduction |
|---|---|---|---|
| LoCoMo | 25,646 tok | 529 tok | 51.1× |
| LongMemEval-S | 136,552 tok | 2,207 tok | 64.7× |
Context the default config recalls vs the full history. Estimate (~4 chars/tok).
- No single headline number — these are relative ablation signals.
- graph-boost is inert on chat corpora (no native wikilink graph); it's for real vaults.
- QA-accuracy numbers use an Anthropic judge, not GPT-4o — not comparable to published leaderboards.
One vault, different levels of automation.
Every supported host resolves the same configured Markdown vault. What varies is how much of the host lifecycle AgentCairn can automate: some recall and capture ambiently, some capture out-of-band, and MCP-only hosts expose explicit memory tools.
AgentCairn automation levels by host
Ambient
Recall and capture follow the host lifecycle.- Claude Code
- Codex
- OpenCode
- Hermes Agent
Sweep-backed
Tools are available; transcript capture runs out-of-band.- Cursor
- Antigravity
Explicit MCP
The same memory tools, invoked when you choose.- VS Code (Copilot)
- Claude Desktop
- Gemini CLI
Compare every host, integration, and setup command
Swipe to compare every host →
| host | support | set up with | ambient |
|---|---|---|---|
| Claude Code | Plugin | cairn install claude-code | full |
| Codex | Plugin | cairn install codex | full |
| Cursor | MCP server + skill + ingest | cairn install cursor | sweep |
| OpenCode | Plugin + MCP + ingest | cairn install opencode | full |
| Hermes Agent | MemoryProvider plugin (Python 3.11+) | see the Hermes guide | full |
| Antigravity | Plugin + ingest | cairn install antigravity --source /path/to/agentcairn/plugin | sweep |
| VS Code (Copilot) | MCP server | cairn install vscode | explicit |
| Claude Desktop | MCP server | cairn install claude-desktop | explicit |
| Gemini CLI | MCP server | cairn install gemini | explicit |
Plugin hosts (Claude Code, Codex, Antigravity) install via the host's own CLI — the MCP server is bundled in the plugin. MCP configuration is merged using each host's native schema, non-destructively, idempotently, and backup-first. Ambient recall-at-start + capture-at-end is fully wired on Claude Code and Codex; Codex SessionStart recall is verified live, and capture also runs out-of-band via `cairn sweep`. Antigravity has no recognized plugin hooks — capture runs out-of-band via `cairn sweep` (◐). `agy plugin install` takes a local directory (not a git repo), so install with `cairn install antigravity --source /path/to/agentcairn/plugin` after replacing that path with your checkout's plugin directory; it also removes any stale mcp_config.json entry. Cursor has no plugin hooks either — `cairn sweep` ingests sessions out-of-band from Cursor's global `state.vscdb` SQLite store (`cursorDiskKV` user bubbles); Cursor remains an MCP host (not a plugin host), but `cairn install cursor` also installs the `using-agentcairn-memory` skill to `~/.cursor/skills/` alongside writing `~/.cursor/mcp.json`. Hermes gets in-process recall and capture through its native MemoryProvider lifecycle in the standard managed Python 3.11 environment; see the Hermes guide.
Leave a trail your next agent can follow.
Start with the agent you use now. The same readable vault will be there when you open the next one.
Install for Claude Code
uvx --from agentcairn cairn install claude-code- Plaintext by designreadable Markdown, not encrypted storage
- Secret-aware writesrecognized patterns redacted; review unknown patterns and hand edits
- Local by defaultstdio MCP; no required daemon or external database
- Cloud only by opt-inenabled cloud features may send redacted text or queries off-device