Self-hosted and open source

The AI campaign companion that remembers your world.

A fine-tuned local LLM that answers from your own campaign journal. Your story, not a hallucination.

You asked

What did Thorin find at the old mill?

Lorekeeper answered

Amidst the ruins of the desecrated mill, Thorin unearthed a most enigmatic relic: a gleaming silver key…

SourceFrom your journal: “The once tranquil air around the ancient mill…”

Unedited output from the fine-tuned model, running locally.
7B
parameters, running on your hardware
12
game systems in the training data
$0
per-token cost
0
external AI APIs

Three things it does that a chatbot can't.

Every example below is real, unedited output from the fine-tuned model running locally. Not marketing copy.

Fine-tuned generation

Shorthand in. Story out.

Jot terse notes at the table. A LoRA fine-tune of Mistral 7B expands them into a journal entry in your campaign's voice, keeping names, events and order faithful. You review every draft before it's saved.

Your notes

Party defeated goblin chief Grukk at the old mill. Rescued the miller's daughter. Thorin found a mysterious silver key.

written up by Lorekeeper
Generated entry

The once tranquil air around the ancient mill now hung heavy with the stench of goblin filth… In the quiet that followed, Thorin pried a gleaming silver key from the ruin's depths…

Retrieval-augmented chat

Ask your campaign anything. See the receipts.

Hybrid search over your journal and sourcebooks. Replies cite their sources, and when the record is silent, the app says so.

Asked about lore that never happened

Who is the queen of the elven court in our campaign?


“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, so this reply is improvised.

Session co-planner

Next session, drafted from the record.

One click turns recent entries, open quests and your NPC roster into a plan that never contradicts what happened. The same grounding writes NPC bios, quest hooks and recaps.

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 and 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 from 12 game systems
  3. Merged and quantized to Q4 GGUF, about 4 GB
  4. Served locally by Ollama, on CPU or GPU

The grounding, making it tell the truth

  1. Journal and sourcebooks become embeddings in pgvector plus a full-text index
  2. Hybrid retrieval: semantic and keyword results fused by RRF, so paraphrases and rare names like “Dawnbreaker” both land
  3. A relevance gate whose threshold is measured on a labeled evaluation set
  4. The record goes into the prompt. Sources are cited, and a “How this answer was built” trace shows every candidate, its scores and the exact prompt
  5. Nothing relevant? The reply is labeled ungrounded instead of passing invention off as canon

Built with

Run it tonight.

Docker is the only requirement. It runs on a CPU or any GPU with about 5 GB of memory. Registration is open by default: host it free for yourself, your group, your company or a whole community. Running it as a gated, paid service is one checkbox in the admin portal.

  1. Open https://localhost and accept the one-time self-signed certificate warning.
  2. Register. The first account becomes the admin.
  3. Install the fine-tuned model from Admin → System → Model Library. It downloads straight from Hugging Face, no shell required.

Stuck? The same System tab has the logs and a one-click support bundle to send to hello@harrisonsmith.ai.

bash
# 1. get the app
git clone https://github.com/hsmith-dev/Lorekeeper.quest.git lorekeeper
cd lorekeeper && cp .env.example .env

# 2. edit .env and set two values:
#    SECRET_KEY (openssl rand -hex 32) and POSTGRES_PASSWORD

# 3. launch
docker compose -f docker-compose.prod.yml up -d --build