Johannes Kaindl261 downloadsLocal, offline retrieval over your vault: related notes, semantic search, and grounded chat with a local LLM — nothing leaves your machine.
Retrieval over your own vault — related notes, semantic search, and grounded chat — running locally and offline.
Vault Retrieval turns your notes into a searchable knowledge base without sending anything to the cloud. It reads a small embedding index that ships with your vault and answers three questions: What else have I written about this? Where did I say something like that? What does my vault know about X? Generation (chat) runs against a local LLM endpoint you control.
%% guidance comments, and a relevance-ranked template list (cosine over the same index — reusing the stored vectors, no re-embedding) preselects the best fit and updates live as you switch notes. Enable it under Settings → Smart Apply.<vault>/_vaultrag/ (default path; configurable in settings and hidden in the file explorer by default) — produced by your indexing backend and synced with the vault. The related-notes panel and semantic search need only this index; no running server.In Obsidian, open Settings → Community plugins → Browse, search for Vault Retrieval, then install and enable it.
Download main.js, manifest.json and styles.css from the latest release, drop them into <vault>/.obsidian/plugins/vault-retrieval/, then enable Settings → Community plugins → Vault Retrieval.
Add the GitHub mirror johannes-kaindl/vault-rag in the BRAT plugin to track pre-release builds.
git clone https://codeberg.org/jkaindl/vault-rag
cd vault-rag
npm install
npm run build # → main.js
# copy main.js, manifest.json, styles.css into <vault>/.obsidian/plugins/vault-retrieval/
| Setting | What it does | Default |
|---|---|---|
| Embedding endpoint / model | Re-embeds notes on save | http://localhost:11434 · qwen3-embedding:8b |
| Chat endpoint / model | LLM for RAG chat | http://localhost:8080 · qwen3 |
| Index folder | Where the synced index lives. Cross-device sync (including iPhone) requires the Obsidian Sync option "Sync all other file types" | _vaultrag |
| Hide index folder in file explorer | Hides the index folder from the file explorer for a cleaner workspace (cosmetic; data and sync are unaffected) | on |
| Similarity / top-k | Retrieval thresholds | tunable |
| Excluded folders | Paths skipped by indexing | Templates/, Archive/ |
| Context budget | Max characters fed as context (ceiling follows the model window) | 12000 |
| Suppress thinking | Default for new chats; also a per-chat toggle in the panel | off |
| Enter sends | On: Enter sends, Shift+Enter newlines · Off: reversed | on |
Endpoint tip: enter the base URL without a trailing
/v1— the plugin appends it. Both forms are accepted.
Your indexing backend exports a portable note-level Matryoshka-256 int8 mini-index (~1.4 MB) into <vault>/_vaultrag/. The plugin loads it and runs brute-force cosine locally — no daemon, no VPN, no on-device LLM needed for retrieval. Only chat talks to an LLM, over an endpoint you configure. The portable index is what makes retrieval work identically across all your synced devices.
Architecture, module layout and contributor conventions live in AGENTS.md.
The plugin's embedding index doubles as a retrieval backend for MCP clients (Claude Code, OpenClaw, …). An in-plugin HTTP server (Streamable HTTP, loopback-only) exposes three read-only tools:
| Tool | What it does | Needs endpoint? |
|---|---|---|
search |
Semantic search over the vault (query → {path, score} hits) |
yes (embeds the query) |
related |
Notes related to a given note (straight from the index) | no — works offline |
read_note |
Full markdown text of a note (.md only, excludes respected) |
no — works offline |
Enable it in the plugin settings under "MCP-Server" (desktop only — the toggle and server
are disabled on mobile). The server binds to 127.0.0.1 on a configurable port (default
8123) and requires a Bearer token on every request. The settings section has a "copy
command" button that generates the registration command for you, e.g.:
claude mcp add --transport http vault-retrieval http://127.0.0.1:8123/mcp \
--header "Authorization: Bearer <token>"
Configuration (endpoints, index folder, excludes) is read from the plugin's own settings — no separate config file. The server only runs while Obsidian is open and picks up index changes live (reloads whenever the plugin rewrites the index). One server instance per vault. The server never writes to your vault.
Note: read_note enforces exclude prefixes case-insensitively (safe on case-insensitive filesystems like APFS/NTFS), while search/related filter result paths case-sensitively — they expose only paths and scores, never content.
Image transcription (handwriting/screenshots → Markdown) lives in the sibling plugin image-to-markdown.
Issues and pull requests are welcome on Codeberg. The project is test-driven — every change ships with tests (npm test), and larger features go through a brainstorm → spec → plan → TDD flow (docs/superpowers/). See AGENTS.md for conventions.
LICENSE). A commercial dual-license is available on request if the AGPL's copyleft doesn't fit your use case.LICENSE-DOCS).Copyright © 2026 Johannes Kaindl.