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

  lorekeeper — campaign chat
What did Thorin find at the old mill?
LOREKEEPERAmidst the ruins of the desecrated mill, Thorin unearthed a most enigmatic relic: a gleaming silver key…
✦ source: journal — “The once tranquil air around the ancient mill…”

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.

01 · Fine-tuned generation

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.

journal — quick entry
Your notes

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…”

02 · Retrieval-augmented chat

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.

campaign chat — grounding honesty
You ask about lore that never happened

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.

03 · Session co-planner

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.

session plans — generate
Generated plan

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

  1. Mistral 7B Instruct
  2. LoRA fine-tune on session-journal data (12 game systems)
  3. merged & quantized to Q4 GGUF (~4 GB)
  4. served locally by Ollama — CPU or GPU

The grounding — making it tell the truth

  1. journal + sourcebooks → embeddings (pgvector) + full-text index
  2. hybrid retrieval — semantic ∥ keyword, fused by RRF
  3. relevance gate, threshold measured on a labeled eval set
  4. record injected into the prompt — sources cited, trace shown
  5. nothing relevant? the reply is labeled ungrounded

FastAPI · React · PostgreSQL + pgvector · Redis · Ollama · nginx — one compose stack

7B
params, runs locally
12
game systems trained
$0
per-token cost
0
external AI APIs

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.)

# 1 · get the app git clone https://github.com/hsmith-dev/Lorekeeper.quest.git lorekeeper cd lorekeeper && cp .env.example .env # 2 · edit .env — two values: SECRET_KEY (openssl rand -hex 32) # and POSTGRES_PASSWORD # 3 · launch docker compose -f docker-compose.prod.yml up -d --build

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.