Projects
Mnemosyne app icon.

Project

Mnemosyne

Local-first memory architecture for persistent AI characters.

Active AlphaGitHubDevlogs

Problem

LLM characters lose continuity because normal chat is the wrong storage layer.

Raw chat history looks simple at first: keep sending the conversation back to the model and let the context window do the work. That fails as the session grows. Old prose gets the same weight as current state, completed actions can replay, hidden-state residue can leak back into the prompt, and the most dramatic line can overpower the most accurate fact.

Summaries fail in the opposite direction. They are smaller, but they flatten emotional rhythm. A summary can say trust improved or the scene moved to the kitchen without preserving the pressure, hesitation, timing, and last exchange that made the next response feel alive.

Mnemosyne also had to solve a harder split: character memory and world state are not the same thing. A Soul should remember subjective history, fear, trust, shame, attachment, and changed expectations. A World Log should remember locations, objects, plot threads, time, and objective continuity. If those buckets mix, characters become omniscient or world facts start behaving like emotional memories.

Fresh sessions add another failure mode. A new setup can inherit stale relationship warmth, old props, previous locations, or scenario-specific memories unless the app knows what should persist and what should reset.

Then there is the prompt problem. Every bug invites another rule. Too many prompt rules can make the narrator worse: cautious, overexplained, less alive. Mnemosyne’s job is not to bury the model under machinery. It is to put the right machinery in the right layer.

Core Idea

The narrator writes. The state map remembers.

Mnemosyne separates visible narration from memory, world state, relationship state, and debugging machinery. The model writes the next scene from a compiled brief. The app carries the continuity, records what changed, and keeps the machine-readable parts out of the player’s transcript.

That means the narrator can focus on prose while the engine handles state: Soul memory, World Log facts, relationship pressure, recent events, hidden patches, payload history, and repair trails.

Architecture

User input Context Compiler Narrator model Visible narration + hidden state Parser / validator Soul / World / relationship updates Payload inspector / debug logs Next turn

The loop is intentionally inspectable. If a response goes wrong, the failure can be traced to the compiled input, the model output, the hidden-state parse, the applied patch, or stale state carried into the next turn.

Core Systems

Soul Memory

Subjective character continuity: what the character experienced, misread, feared, wanted, trusted, resisted, and emotionally carried forward.

World Log

Objective story continuity: location, active objects, plot threads, time pressure, recent events, and facts the narrator needs without making the character omniscient.

Context Compiler

Builds the model payload from clean recent chat plus structured state, avoiding raw-chat bloat while preserving immediate scene texture.

Hidden State / Patch Protocol

Separates visible prose from machine-readable state changes so memory, world, and relationship updates can be traced, rejected, regenerated, or restored.

Payload Inspector

Shows the exact prompt and state packet sent to the model, turning continuity bugs into debuggable input/output problems.

Regenerate / Fix / Variants

Recovery workflows for bad generations, including the harder state question: discarded responses should not quietly mutate the Soul.

Fresh Scenario State

Lets long-term Soul continuity persist while clearing volatile scenario residue: stale locations, old props, recent events, and relationship temperature from prior tests.

Prompt Cleanup V2 / Action Doctrine

Refines the narrator brief so characters can initiate pressure and act decisively without resolving the user's reaction or stealing user agency.

State Map Direction

A mode-aware visibility layer for player, reader, GM, and developer views, with redaction instead of deleting useful state.

Technical Highlights

  • Designed a separation between subjective character memory and objective world continuity.
  • Built a context compiler to avoid raw-chat bloat while preserving recent scene texture.
  • Added payload inspection to debug exact model inputs instead of guessing why continuity failed.
  • Added recovery workflows for bad generations: regenerate, fix, variants, restore pressure, and patch traceability.
  • Added fresh-session boundaries to prevent cross-session contamination.
  • Refined narrator prompting so characters can act without resolving user reactions.
  • Designed a paper/terminal UI split for fiction surfaces and developer tools.

Development Journal

Current Status

Mnemosyne is a working alpha, not a polished public release.

The core memory/state/payload/debug loop exists: local desktop shell, structured continuity concepts, compiled model payloads, hidden-state parsing, inspection surfaces, recovery flows, and fresh-session boundaries.

The active work is long-session stability, memory provenance, cleaner entity separation, safer state import/export, and State Map V1. The product direction is becoming clearer too: fiction surfaces should feel paper/editorial; developer surfaces should feel terminal and inspectable.

Roadmap

  • State Map V1 with mode-aware visibility and redaction.
  • Memory Inspector and provenance trails for why a memory exists.
  • Entity separation so characters, objects, scenes, and world facts do not blur together.
  • Safer import/export for local sessions, Souls, and state bundles.
  • Local model runtime later, after the state loop is reliable.
  • Better alpha documentation for setup, limits, and debugging workflows.

What This Demonstrates

LLM systems design Stateful app architecture Local-first desktop development Debugging and instrumentation Prompt/context engineering Product thinking under ambiguity
User inputContext CompilerNarrator modelVisible narration + hidden stateParser / validatorSoul / World / relationship updatesPayload inspector / debug logsNext turn
Mnemosyne home dashboard showing living worlds, recent sessions, and engine status.

Home dashboard

available

App shell and session entry point for persistent worlds, recent sessions, and engine status.

Mnemosyne play view with the turn pipeline, message composer, model mode, and dev controls.

Play view

available

The main writing surface where the user interacts with the narrator while the engine maintains state behind the scene.

Mnemosyne State Map showing scene state, characters, relationships, objects, timeline, and memory inspector.

State Map / Continuity View

available

Inspectable continuity state separated from the visible transcript.

Mnemosyne terminal developer UI showing pipeline logs, memory cycle, API debug, LLM payload counts, repair controls, and benchmark runner.

Payload inspector

available

Developer view for model payload, pipeline state, repair controls, and benchmark diagnostics.

Mnemosyne library launcher showing scene selection, primary character selection, and session start controls.

Library scene launcher

available

Scenario and session launch flow with explicit world, character, and isolated-session boundaries.

placeholderRepair / regenerate flow

Repair / regenerate flow

planned

Planned screenshot slot for recovery workflows around bad generations and state repair.

placeholderSettings / provider profile

Settings / provider profile

planned

Planned screenshot slot for model/provider configuration once the public UI is capture-ready.

  • Devlogs document the design evolution from raw state blocks to inspectable session architecture.
  • GitHub repo contains the working alpha source.
  • README documents current implemented systems and known limitations.