Loreweaver
AI-Native Persistent Storytelling
Overview
Loreweaver is an AI-native persistent storytelling and memory platform built for worlds that refuse to reset. It combines semantic retrieval, persistent memory, relationship state, lore ingestion, timeline continuity, and retrieval-augmented generation into a single cohesive narrative engine.
Whether you are running a tabletop campaign, authoring interactive fiction, or building a persistent NPC ecosystem, Loreweaver ensures every conversation, decision, and revelation is remembered, contextualized, and woven back into the ongoing story.
Features
Semantic Memory
Persistent vector-backed memory that captures entities, themes, and narrative arcs across unlimited sessions.
RAG Pipeline
Retrieval-augmented generation with hybrid search and reranking for deeply contextual responses.
Timeline Continuity
Event-driven timeline engine ensuring every story beat, decision, and consequence remains canonical.
Relationship State
Dynamic relationship graph tracking affinity, trust, and history between characters and factions.
Lore Ingestion
Ingest rulebooks, world bibles, and source documents to ground the narrative in a rich, established universe.
Session Resumption
Resume any story at any point with full context restoration—no recap required.
Architecture
- Narrative API: Fastify-based HTTP and WebSocket endpoints for real-time story state and agent interaction
- Vector Memory: pgvector and ChromaDB dual-store for dense semantic retrieval and fast entity lookup
- Timeline Engine: PostgreSQL-backed event log with branching support and canonical state reconciliation
- Lore Ingestion: Document chunking pipeline with hierarchical summarization and cross-reference linking
- Relationship Graph: Property-graph model for tracking dynamic NPC and faction affinity over time
- Deployment: Docker Compose stack with one-command setup for local worlds or cloud hosting