Hermes Agent 09511a78e0 docs: v1.1 — extensibility, multi-store, microservice decomposition
New docs (1623 lines):
- 11-extensibility.md: polymorphic DomainEntity + TypeTemplate model.
  Adding a new domain (thieves-guild missions, war campaigns, etc.) is
  a YAML exercise, not a Go change. ~200 lines of Cypher, stable forever.
- 12-storage-strategy.md: split into 5 stores (Neo4j, Postgres, pgvector,
  Redis, S3/MinIO). Each store holds what it's good at. Cross-store queries
  compose at the handler layer. Sagas handle multi-store write consistency.
- 13-microservice-decomposition.md: split mcp-server's 1144-line main.go
  into a small gateway + pluggable handlers. Generic tool-handler protocol
  (GET /tools, POST /invoke). Macro/micro iteration at three speeds.
- 14-examples.md: three end-to-end worked examples showing the v1.1
  architecture in action. Thieves-guild mission (DomainEntity + Postgres),
  war-campaign tracker (DomainEntity + Postgres event log), black-market
  economy (NPC-tier-gated data + Postgres trade log).

Updates to v1 docs:
- 01-ontology: adds Plane, NPC, PC, Human labels (per Kay's Q2, Q3).
  Adds DomainEntity, Relation, TypeTemplate labels for v1.1.
- 02-time-model: year-level precision is the default (Kay's Q1).
- 09-roadmap: v1.1 phases (11-14), 20-day scope, recommended build order.
- 10-critique: open questions all resolved; 4 new S1/S2 risks recorded
  (closed-world ontology, single-binary iteration, polymorphic overhead,
  cross-store consistency). Polymorphic extension added to 'good at' list.

Design now v1.1: 14 docs, 4293 lines, ~280KB.
2026-06-16 05:25:21 +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.

v1.1 (current): adds polymorphic DomainEntity extension model, multi-store storage strategy, and a microservice decomposition plan. See 11-extensibility.md, 12-storage-strategy.md, 13-microservice-decomposition.md, 14-examples.md.


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
11 Extensibility v1.1 — polymorphic DomainEntity + TypeTemplate model. New domains as YAML, not code.
12 Storage Strategy v1.1 — which data goes in Neo4j, Postgres, pgvector, Redis, S3. Why and when.
13 Microservice Decomposition v1.1 — split the mcp-server monolith. Macro/micro iteration speeds.
14 Worked Examples v1.1 — three end-to-end examples: thieves-guild missions, war campaigns, black-market economy.

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%