Johannes Kaindl Uplink Deutsch

vault-rag

Your notes already know things you've forgotten you wrote. vault-rag turns an Obsidian vault into a knowledge base you can actually ask — what else have I written about this? where did I say something like that? what does my vault know about X? — without sending a single note to the cloud. Retrieval runs on-device against a small index that travels with the vault; only chat talks to a local LLM you point it at.

Obsidian with an open Zettelkasten note and, in the side panel on the right, the vault's other notes ranked by how closely they relate to it, from 0.82 down to 0.50

Why this one

The premise is local-first knowledge. A personal vault gets more valuable the better you can re-find and reconnect what's already in it — and that shouldn't mean renting someone else's model or shipping private notes off-device. So the index is a tiny, portable artifact (a note-level Matryoshka-256 int8 mini-index, ~1.4 MB) that syncs with the vault and runs identically on every device, phone included. Related notes and search need no server at all; only generation reaches out, to an endpoint on your own machine.

What it does

  • Related notes — a side panel ranks what's most similar to the note you're reading, by meaning, fully offline.
  • Semantic search — find notes by what they're about, not the exact words they happen to use.
  • Grounded chat — ask the vault a question and get an answer built from retrieved notes, streamed from your local model, with the source notes shown and editable so you steer what grounds the reply.
  • Smart Apply — hand a messy note a template and it reshapes the note into that structure without inventing anything.
  • Link suggestions — an inbox that proposes which existing notes a fresh capture should link to, from the same index; you accept or reject, the plugin never writes unasked.

Smart Apply, in one breath

The newest capability is also the most opinionated. A reasoning model never writes your prose — it only decides which of your numbered original blocks belong under which template heading, and the plugin rebuilds the body from those exact blocks behind a diff you approve. Fabrication isn't discouraged by a prompt; it's impossible by construction. Templates describe themselves in %% comments so even a small local model routes well, and the relevance-ranked template list reuses the same stored vectors the rest of the plugin already runs on — so the best-fit template is preselected instantly as you move between notes, not re-embedded each time.

The Smart Apply panel in a dark theme: the meeting template is preselected at 100 percent, the note's own paragraphs are sorted block by block under the template's headings, and the last line reads "Remaining: nothing lost"

Links, suggested — never forced

Capturing a note is easy; wiring it into what you already know is the part that stays undone. The Integrator tab takes that chore and turns it into a queue: after you change a note in the folders you name, the plugin looks up its nearest neighbours in the index — no language model, no network — and lists them as suggestions. Accept writes one wikilink into the note, either as a related property or as a section at the end, touching nothing else; reject is remembered, so the same target never comes back for that note. There is deliberately no automatic mode: a threshold that decides "this link is good enough" is a judgement the retrieval layer shouldn't make. If you want that judgement automated, the plugin exposes the two building blocks to other plugins and lets them carry it.

The vault as a tool your agents can call

The same index that answers you can now answer your agents. vault-rag can host a small MCP server — the Model Context Protocol that coding assistants speak — so an external agent like Claude Code, OpenCode, or a local OpenClaw gateway can search your vault, pull related notes, and read a note's text on demand. The connection stays on loopback and never leaves the machine, it's read-only and guarded by a token, and it runs only while Obsidian is open. One click in settings hands you the exact snippet to paste into whichever client you use. Your notes stop being a thing only you can query and become a retrieval backend the rest of your tooling can lean on — no second index, no cloud round-trip.

And the plugins next door

Agents outside Obsidian were the easy half. The harder question was what happens when the plugin beside it wants the same thing — a chat companion that should search your notes, but has no business building a second embedding index of the very same vault.

So retrieval is now a capability vault-rag offers, not just a feature it has. A neighbouring plugin asks it directly, in-process: is an index there, what's semantically close to this text, what relates to this note. No server, no port, no round-trip — and no second copy of your vault in vector form.

What made this interesting wasn't the code; it was deciding what to leave out. The surface is deliberately smaller than it could be. It hands back matches and nothing else: no reading notes (a plugin can already read the vault), no raw vectors (that would chain callers to an embedding dimension and model that must stay free to change), and no permission gate (anything able to make the call already has full vault access — a gate would perform safety rather than provide it). Even the failure reasons are terse codes rather than sentences, because the phrasing belongs to whoever shows it to you, in whichever language they speak.

The first neighbour to take it up was Koda, the vault's agentic companion. Its search now leans on meaning when literal matching comes up short — and it never had to learn what an embedding is. That division is the point: one plugin owns retrieval, another owns the conversation, and neither reimplements the other.

Under the hood

A pure retrieval core (brute-force cosine over the portable index) sits behind a thin Obsidian layer; live indexing re-embeds notes on save and catches up on offline edits when the endpoint returns. The technical reference — settings, endpoints, the module map — stays in the repo.

Beyond the browser

Repository

git.jkaindl.de/jkaindl/vault-rag — install from Obsidian's Community Plugins (search Vault Retrieval).

Wiring up a local LLM endpoint? → Connect vault-rag in the setup guide.