Obsidian Mind: Persistent Memory for AI Coding Agents
AI coding agents are powerful. They’re also goldfish.
Every session starts fresh. No memory of your goals, your team, your patterns, your wins. You re-explain the same architecture decisions. You lose context from three conversations ago. The knowledge never compounds.
Obsidian Mind fixes this. It’s an open-source Obsidian vault that gives your coding agent a brain.
What It Actually Does
Start a session:
You: "start session"
Agent: *reads North Star, checks active projects, scans recent memories*
Agent: "You're working on Project Alpha, blocked on the BE contract.
Last session you decided to split the coordinator. Your 1:1
with your manager is tomorrow — review brief is ready."
Brain dump after a meeting:
/om-dump Just had a 1:1 with Sarah. She's happy with the auth work but wants
us to add error monitoring before release. Also, Tom mentioned the cache
migration is deferred to Q2 — we decided to focus on the API contract first.
The agent then:
- Updates
org/people/Sarah Chen.mdwith meeting context - Creates
work/1-1/Sarah 2026-03-26.mdwith key takeaways - Creates a Decision Record: “Defer Redis migration to Q2”
- Adds to
perf/Brag Doc.md: “Auth architecture praised by manager” - Updates
work/active/Auth Refactor.mdwith error monitoring task
One brain dump. Five linked notes. Zero manual filing.
The Architecture
The vault structure is purpose-built for agent memory:
brain/ # Topic notes (persistent knowledge)
├── North Star.md # Your goals and priorities
├── people/ # Person notes
└── topics/ # Domain knowledge
work/ # Active projects
├── active/ # Current work
├── 1-1/ # Meeting notes
└── decisions/ # ADRs
perf/ # Performance tracking
├── Brag Doc.md # Wins and achievements
└── reviews/ # Review prep
Five lifecycle hooks handle routing automatically:
| Hook | When | What |
|---|---|---|
| SessionStart | On startup | Injects North Star, active projects, recent changes, tasks |
| UserPromptSubmit | Every message | Classifies content (decision, incident, win, 1:1) |
| PostToolUse | After writing .md | Validates frontmatter, enforces linking |
| PreCompact | Before context compaction | Backs up session transcript |
| Stop | End of session | Runs hygiene checks, finds uncaptured wins |
QMD: Semantic Search That Runs Locally
The secret sauce is QMD integration. Three small models run locally (~2.2GB total):
| Model | Size | Job |
|---|---|---|
| embeddinggemma-300M | ~328MB | Turns notes into vectors |
| qmd-query-expansion-1.7B | ~1.28GB | Rewrites queries into better search terms |
| Qwen3-Reranker-0.6B | ~640MB | Reorders results by relevance |
No API key. No per-query cost. Works offline. GPU acceleration when available.
So “what did we decide about caching” finds the note titled “Redis Migration ADR” — even when they share no keywords.
Cross-Repo Access via MCP
Here’s what makes this genuinely useful: you can query your vault from ANY repo.
Register the vault as an MCP server:
claude mcp add --scope user om node "/path/to/vault/.claude/scripts/om-mcp.mjs"
Now your coding session in some random project can search your notes, read decisions, follow the link graph, and record what it learned back into the vault.
The MCP tools:
search— Find notes by meaningexpand— Show a note’s links and backlinksrecall— Return durable lessons scoped to a projectremember— Store a new lessonrecord_work— File what happened
Brag Doc Automation
The brag-spotter subagent runs during wrap-up and finds uncaptured wins:
You: "wrap up"
Agent: *verifies all notes have links*
Agent: *updates indexes*
Agent: *scans for wins you didn't log*
Agent: "Found potential brag doc entry: 'Reduced API latency by 40%'
from your commit messages. Add it?"
Performance review season becomes “open the brag doc” instead of “frantically search Slack history.”
Multi-Agent Support
Works with:
- Claude Code — Full support (hooks, commands, subagents)
- Codex CLI — Hooks via
.codex/hooks.json - Gemini CLI — Hooks via
.gemini/settings.json - Cursor/Windsurf — Reads AGENTS.md
The vault conventions are agent-agnostic. Pure Markdown, TypeScript, and shell.
Installation
Via ShardMind (recommended):
npm install -g shardmind
mkdir my-vault && cd my-vault
shardmind install github:breferrari/obsidian-mind
The wizard collects your name, organization, and goals, then personalizes brain/North Star.md.
Or clone directly:
git clone https://github.com/breferrari/obsidian-mind.git
Then fill in brain/North Star.md manually.
How This Compares to Built-in Memory
Claude Code has ~/.claude/MEMORY.md. It’s an auto-loaded file. But:
- It’s not linked to anything
- It doesn’t survive machine changes
- It’s not searchable by meaning
- It’s not part of a knowledge graph
Obsidian Mind uses MEMORY.md as an index pointing to vault locations. The actual knowledge lives in the linked graph, browsable in Obsidian, searchable via QMD, portable across machines.
The Token Cost Question
The vault doesn’t dump everything into context. Tiered loading:
| Tier | What | When | Cost |
|---|---|---|---|
| Always | North Star excerpt, git summary, tasks | Session start | Budget-capped |
| On-demand | QMD search results | When needed | Targeted |
| Triggered | Classification hints | Every message | ~100 tokens |
| Triggered | Validation | After .md writes | ~200 tokens |
| Rare | Full file reads | Explicit request | Variable |
SessionStart loads lightweight context. An injection-size meter shows what it cost. Budget enforcement degrades gracefully when you exceed it.
Who This Is For
- You use Claude Code/Codex/Gemini CLI daily
- You’re tired of re-explaining context
- You already live in Obsidian (or want to)
- You care about performance reviews (brag doc automation)
- You want decisions to compound, not vanish
Links
- GitHub: breferrari/obsidian-mind
- QMD (semantic search): tobi/qmd
- ShardMind (installer): breferrari/shardmind
Your agent finally has a brain. Use it.