An AI writing assistant that knows your world — grammar, style, and lore-aware suggestions for fiction writers.
Lorekeeper is an Obsidian plugin backed by a local Python engine. As you write, it watches for pauses, retrieves relevant context from your vault using RAG, and sends your current sentence to a local LLM for grammar and style suggestions — aware of your characters, your world, and your voice.
- Lore-aware suggestions — knows your characters, factions, and world bible
- Style & pacing feedback — not just grammar, but voice consistency
- Character name correction — typed Kaeltas? It knows you meant Kaelthas
- Session-scoped memory — indexes your vault on startup, updates on file change, releases on close
- Fully local — Ollama + a Python sidecar, nothing leaves your machine
- Configurable debounce — tune how long it waits after you stop typing
Obsidian Plugin (TypeScript)
│
│ HTTP (localhost)
▼
Lorekeeper Engine (Python / PyInstaller)
│
├── RAG Pipeline (sentence-transformers + vector store)
│ └── Your Vault (chunks, embeddings, timestamps)
│
└── Ollama (local LLM)
- The plugin handles typing detection, debounce, and displaying suggestions
- The engine handles vault indexing, context retrieval, and LLM calls
- They communicate over a local HTTP API
⚠️ Work in progress — not yet available on the Obsidian community plugin store.
- Obsidian (desktop only)
- Ollama with a model pulled (e.g.
qwen2.5:9b) - Lorekeeper Engine exe (download link coming soon)
- Download the Lorekeeper Engine exe from Releases
- Clone this repo into your vault's
.obsidian/plugins/lorekeeper/folder - Enable the plugin in Obsidian → Settings → Community Plugins
- Go to Lorekeeper settings and set the path to the engine exe
lorekeeper/
├── plugin/ # TypeScript — Obsidian plugin
│ └── src/
│ ├── main.ts
│ └── settings.ts
└── engine/ # Python — RAG pipeline + Ollama sidecar
- Plugin skeleton with debounce typing detection
- Settings system (engine path, debounce delay)
- Python FastAPI engine with basic Ollama call
- Vault indexing with session-scoped RAG
- Inline suggestion display in editor
- Character name fuzzy matching
- First public release
# Plugin
cd plugin
npm install
npm run dev # watches for changes, rebuilds automatically
# Engine
cd engine
pip install -r requirements.txt
python main.pyMIT