How LoreMind Works

The mental model behind LoreMind, on one page: how documents, tags, Entity Minds, context, memory, and credits fit together. Everything here is covered in depth on its own page. This is the map.

At a Glance

flowchart LR
  docs["Lore Documents<br/><small>world knowledge</small>"]:::world
  tags["Tags<br/><small>what an NPC may reference</small>"]:::world
  mind["Entity Mind<br/><small>personality and speaking style</small>"]:::world
  interact["POST /npc/interact"]:::runtime
  resp["NPC response"]:::runtime
  mem[("Long-Term Memory<br/><small>remembers the player</small>")]:::memory
  ctx["context<br/><small>the scene</small>"]:::neutral
  pid["playerId<br/><small>who's asking</small>"]:::neutral

  docs -- tagged --> tags
  tags -- filter --> mind
  mind --> interact
  ctx --> interact
  pid --> interact
  interact --> resp
  resp -- stores memories --> mem
  mem -- recalled on later requests --> interact

  classDef world fill:#2aa3af,stroke:#1d747d,color:#082326
  classDef runtime fill:#d96a57,stroke:#a03f37,color:#2b0e0a
  classDef memory fill:#a76bc4,stroke:#7a4599,color:#1f0e2b
  classDef neutral fill:transparent,stroke-dasharray:4 3

Every NPC response consumes credits from your team balance.

Lore Documents

Your game's world knowledge (locations, history, factions, items), uploaded as documents. NPCs are generated from this lore and reference it when they respond. You can upload documents by hand or bulk-import them with the Lore Scanner.

→ Lore Documents

Tags

Tags connect documents to NPCs. Each document carries tags (village, blacksmithing, quest-dragon-slayer); each Entity Mind is assigned Knowledge Tags and can only reference documents whose tags match. This is how a blacksmith knows about metalwork but not the thieves' guild.

→ Organizing with Tags

Entity Minds

An Entity Mind is an NPC: name, personality, backstory, speaking style, and its Knowledge Tags. Create one manually or let LoreMind generate it from your lore.

Two related structures add depth:

  • Relationships: how NPCs know each other, so they can mention one another naturally
  • Locations: where NPCs live and work

→ Entity Minds · Relationships · Locations

The Interact Request

At runtime, your game (via your backend or a game engine SDK) sends the player's message to POST /npc/interact with:

  • entityMindId: which NPC is speaking
  • playerId: a stable identifier for the player (enables memory and per-player rate limits)
  • context: optional scene information (see below)
  • activeKnowledgeTags: optionally narrow the NPC's knowledge per request (e.g., quest-gated lore)

This is the stable integration surface; everything else in the API is editor tooling.

→ POST /npc/interact · API Quickstart

Context

Context is the scene at the moment of conversation: location, time of day, weather, the NPC's mood and activity, what the NPC observes about the player, recent world events. Without it, NPCs respond generically; with it, they feel present in your world.

→ Runtime Context

Long-Term Memory

With a stable playerId and memory enabled, NPCs store what players tell them and recall it in later sessions: a merchant remembers your past purchases, a guard recognizes a returning troublemaker.

→ Long-Term Memory

Credits

Usage is billed in credits: your subscription plan's monthly allotment is consumed first, then top-up credits (which never expire). Response length settings, memory, and the Lore Scanner all affect cost.

→ Credits & Billing

Where Everything Lives

ConceptConfigure inUse at runtime via
Lore DocumentsDashboard → Documentsused automatically on every request
TagsDocuments + Entity Mind configactiveKnowledgeTags (optional)
Entity MindsDashboard → Entity MindsentityMindId
ContextNot configured (runtime-only)context object
Memoryturned on by LoreMind support (off by default)playerId + memory.retrieve
CreditsDashboard → Billing402 when exhausted

Next Steps