How xbl2602/obsidian-rag works
Obsidian RAG is a local-first search and knowledge-management application for Obsidian vaults. The main workflow registers a vault, applies its inclusion rules, extracts and indexes supported files, then answers a meaning-based query with fused keyword and vector retrieval. Users can inspect indexing outcomes, follow note links, and optionally search PDF pages visually. The graph includes both desktop interfaces and MCP access. Some feature wiring is documented in the README but not shown in sampled source; those links are included only where the documentation supports them.
Main entry points: index.py Indexer · bridge.py Webview bridge · server.py MCP tools · retriever.py Hybrid retrieval
Components 26
Vault indexing
- Indexer
index.py - Document extraction
extractors.py - Text index
index.py - MinerU OCR
mineru_server.py - GPU arbitration
gpu_arbiter.py
Search and navigation
- Hybrid retrieval
retriever.py - Result guidance
advice.py - Page indexer
wemm_indexer.py - Page vector store
wemm_indexer.py - Visual page search
wemm_retriever.py - WEMM service
wemm_server.py
Knowledge management
- Library registry
library.py - Shared settings
config.py - Note relations
index.py - Duplicate suggestions
dedup.py - Vault transfer
export.py - Library summaries
library_summary.py
User interfaces
- MCP tools
server.py - Index worker
gui/worker.py - Classic desktop
gui/app.py - Webview bridge
guiweb/bridge.py - Webview desktop
guiweb/app.py - Webview interface
guiweb/ui/app.js
Other components
- Vault owner
- Obsidian vault
- AI client
Connections 43
- Vault owner → Obsidian vault: maintains notes
- Vault owner → Library registry: registers vault
- Vault owner → Classic desktop: uses
- Vault owner → Webview desktop: uses
- Vault owner → MCP tools: configures
- Obsidian vault → Indexer: scanned by
- Library registry → Indexer: provides scope
- Shared settings → Indexer: configures
- Indexer → Document extraction: extracts files
- Indexer → Text index: writes chunks
- Indexer → Page indexer: updates pages
- Indexer → MinerU OCR: requests OCR
- Indexer → GPU arbitration: coordinates GPU
- Shared settings → Hybrid retrieval: configures
- Text index → Hybrid retrieval: provides indexed text
- Hybrid retrieval → Result guidance: formats guidance
- Indexer → Note relations: records wiki links
- Library registry → Library summaries: supplies library
- Indexer → Duplicate suggestions: provides note corpus
- Vault owner → Vault transfer: exports or imports
- Page indexer → Page vector store: writes page vectors
- Visual page search → Page vector store: queries pages
- Visual page search → WEMM service: encodes query
- Shared settings → Visual page search: configures backend
- GPU arbitration → WEMM service: manages availability
- AI client → MCP tools: invokes tools
- MCP tools → Hybrid retrieval: searches knowledge
- MCP tools → Indexer: requests reindex
- MCP tools → Note relations: reads links
- MCP tools → Visual page search: navigates pages
- MCP tools → Library registry: lists libraries
- Classic desktop → Index worker: starts indexing
- Index worker → Indexer: spawns process
- Classic desktop → Hybrid retrieval: searches
- Webview desktop → Webview bridge: creates bridge
- Webview interface → Webview bridge: calls API
- Webview bridge → Index worker: starts indexing
- Webview bridge → Hybrid retrieval: searches
- Webview bridge → Library registry: updates selection
- Webview bridge → Library summaries: generates summaries
- Webview bridge → Note relations: reads note links
- Webview bridge → Duplicate suggestions: finds duplicates
- Webview bridge → Visual page search: navigates pages