Self-hosted · Open source · No AI API keys
The AI campaign companion that remembers your world.
A fine-tuned local LLM plus retrieval over your own campaign journal — so when you ask what happened at your table, the answer comes from your story, not a hallucination.
docker compose up · runs on CPU or any ~5 GB GPU · AGPL-3.0
Three things it does that a chatbot can't.
Every response below is a real, unedited output from the fine-tuned model running locally — not marketing copy.
Shorthand in. Story out.
Jot terse notes during the session; Lorekeeper expands them into a narrative journal entry in your campaign's genre voice. The model is a LoRA fine-tune of Mistral 7B trained on session-journal data across 12 game systems — it keeps names, events, and order faithful to your notes, and you review every draft before it's saved.
Party defeated goblin chief Grukk at the old mill. Rescued the miller's daughter. Thorin found a mysterious silver key.
Generated narrative
“The once tranquil air around the ancient mill now hung heavy with the stench of goblin filth… Goblin Chief Grukk, a hulking figure of malice and brutality, stood defiant amidst the wreckage — until our blades found their mark. In the quiet that followed, Thorin pried a gleaming silver key from the ruin's depths…”
Ask your campaign anything — and see the receipts.
Hybrid retrieval — semantic vector search fused with keyword search — over your journal and your uploaded sourcebooks, so both paraphrases and rare names like “Dawnbreaker” find the right record. Replies cite their sources and carry a “How this answer was built” trace: every candidate considered, its scores, and the exact prompt the model saw. And when the record is silent? The app says so — the relevance gate is measured against a labeled evaluation set, and ungrounded replies are labeled instead of presenting invention as canon.
Who is the queen of the elven court in our campaign?
Lorekeeper
“The annals of my vast knowledge speak not of a reigning queen within the elven court of your current campaign…”
⚠ Not from your journal — no campaign records matched this question, so this is improvised.
Next session, drafted from the record.
One click assembles your recent journal entries, open quests, and NPC roster into a prompt and drafts a structured plan for the next session — grounded in what actually happened, instructed never to contradict logged events. The same grounding powers NPC bios, quest hooks, recaps, and note autocomplete.
RECAP: The party has the Silver Key, which opens the gates of Karak Dun, but was ambushed en route by the Ashen Hand cultists seeking the key… LIKELY OBJECTIVES: Consult Aldric about the Silver Key and the Ashen Hand; plan the next move against the cult… POTENTIAL ENCOUNTERS · NPCS TO FEATURE · COMPLICATIONS
Two AI pipelines, one self-hosted box.
No OpenAI key, no data leaving your machine. The model and the retrieval index both live in one Docker Compose stack.
The model — making it speak the genre
- Mistral 7B Instruct
- LoRA fine-tune on session-journal data (12 game systems)
- merged & quantized to Q4 GGUF (~4 GB)
- served locally by Ollama — CPU or GPU
The grounding — making it tell the truth
- journal + sourcebooks → embeddings (pgvector) + full-text index
- hybrid retrieval — semantic ∥ keyword, fused by RRF
- relevance gate, threshold measured on a labeled eval set
- record injected into the prompt — sources cited, trace shown
- nothing relevant? the reply is labeled ungrounded
FastAPI · React · PostgreSQL + pgvector · Redis · Ollama · nginx — one compose stack
Run it tonight.
Docker is the only requirement. Registration is open out of the box — host it for yourself, your gaming group, your company, or a whole community, free. (Running it as a gated, paid service instead is one checkbox in the admin portal.)
Then open https://localhost (accept the one-time self-signed-certificate warning) and register — the first account becomes the admin. Install the fine-tuned model with one click under Admin → System → Model Library — it downloads straight from Hugging Face into the stack, no shell required. Something not working? The same System tab has the logs and a one-click support bundle to send to hello@harrisonsmith.ai.
Full source — backend, frontend, training pipeline, deployment docs. AGPL-3.0, with commercial licensing available.
github.com/hsmith-dev/Lorekeeper.quest 🤗 The modelQ4 GGUF + Ollama Modelfile + the LoRA adapter for reproducing the fine-tune. Apache-2.0, works with any GGUF runtime.
huggingface.co/harrisonsmith/Lorekeeper-Mistral-7B-GGUF