Documentation
Nity Memory
Overview

Nity Memory — Overview

The memory subsystem provides persistent context across sessions. Located at extensions/nity-memory/.

Components

  • Session Brain — Loads/persists brain.md context from .voyager/ directory
  • Episode Recording — Records task outcomes with task, approach, outcome, adapter, timestamp
  • Ralph Universal — Tracks adapter effectiveness per task category, generates recommendations
  • SimpleMem Bridge — Python CLI bridge for semantic memory operations
  • Memory Recall — Similarity-based episode search

Data Flow

session_start
  → load brain (.voyager/brain.md)
  → recall episodes (similarity search)
  → inject context into system prompt
  → task execute
  → record episode (task, approach, outcome, adapter, timestamp)
  → update adapter effectiveness (ralph-universal)
  → persist brain

Memory is identity. Every episode recorded shapes how Nity approaches future tasks. The brain file is the single source of truth for session-level context.

Architecture

The memory subsystem is designed as a layered stack:

LayerComponentResponsibility
PersistenceSimpleMem BridgePython CLI for storage operations
ContextSession BrainSession-scoped context management
LearningRalph UniversalCross-adapter effectiveness tracking
RecordingEpisode RecorderTask outcome capture and retrieval
RecallMemory RecallSimilarity-based search across episodes

Each layer is independent and can be tested in isolation. The coordinator.ts orchestrates the flow between layers during session lifecycle events.