Hermes Agent 7c4ed58a5b docs: initial Lore Engine design (11 docs, ~140KB)
- 00-overview: goals, what we inherit from GraphMCP-Example, naming
- 01-ontology: 14 node labels, 40+ edge types, time-bound properties
- 02-time-model: era hierarchy, {era}.{year} canonical format, time_in_window UDF
- 03-macro-micro: 3 association patterns, lookup+active context, expand_context
- 04-consistency: Contradiction/Anachronism/Orphan/OntologyViolation, 4 rule categories
- 05-mcp-tools: 30 tools (8 inherited + 22 new), 5 composition patterns, 10 starter rules
- 06-ingestion: 3 paths (prose, structured YAML, dialogue), YAML schemas for 6 source types
- 07-reasoning-harness: 5 question types, system prompt, failure modes, worked example
- 08-architecture: system diagram, services layout, UDFs, schema bootstrap
- 09-roadmap: 11 phases, MVP = 19 days end of phase 4
- 10-critique: pressure-test, S1-S4 severity, open questions
2026-06-16 04:59:12 +00:00

Lore Engine

A Neo4j-backed world ontology and modular MCP tool surface that lets an LLM reason about a high-fantasy world with historical accuracy, temporal consistency, and macro↔micro association.

Built on top of the existing GraphMCP-Example stack (Neo4j + Redis Streams + Go MCP server), with extensions for the things a world needs that a message archive does not.


Read in this order

# Doc What it covers
00 Overview Goals, design philosophy, what we inherit vs. what we add
01 Ontology Node labels, edge types, properties — the full world model
02 Time Model Eras, calendars, temporal validity, "was X true at time T?"
03 Macro↔Micro Association How lineage chains, location hierarchies, and faction membership bind micro details to macro context
04 Consistency Engine Rules, anachronism detection, contradiction pattern extensions
05 MCP Tool Catalog One section per tool — purpose, signature, returns, when to use
06 Ingestion Pipelines How to ingest structured lore (timelines, family trees, gazetteers, bestiary) and free prose
07 Reasoning Harness LLM prompt patterns + tool-chaining recipes for the most important question types
08 Architecture System diagram, data flow, service layout
09 Roadmap Phased build plan — MVP first, then layers
10 Critique Self-pressure-test: what could break, where this could fail

The 30-second pitch

A Lore Engine has four jobs, and only four:

  1. Remember. Capture the world as a typed, temporal, source-attributed graph — not a bag of facts.
  2. Scope. When the LLM asks about Aldric, it gets Aldric's context — not the world's. When it asks about Aldric-in-340-TA, it gets the right slice of his life.
  3. Reason. Provide tools that compose: was_allied_with + at_time + as_far_as = "Were House Vyr and the Crimson Pact allied in 340 TA?"
  4. Verify. Flag anachronisms, contradictions, and missing lineages before the LLM hallucinates around them.

Everything else is implementation detail.

Status

Design phase. No code yet. This repo is the design contract — read it, red-team it, then we build.

The underlying graph infrastructure (Neo4j, Redis, MCP transport) is already production in GraphMCP-Example. The Lore Engine adds ontology, time model, consistency rules, and ~12 new MCP tools on top of that substrate.

Description
Lore engine: Neo4j-backed world ontology + modular MCP tools for historically-accurate LLM reasoning about a high-fantasy world
Readme 697 KiB
Languages
Markdown 100%