Memory
Four interlocking stores — session memory, personalization, role reflection, and the learning system
"Memory" in Minara is four distinct stores that share the same SQLite database but have independent lifecycles and different consumers. They are orthogonal: a single turn can pull from all four without any one store knowing about the others.
Why four stores?
| Store | Scope | Lifecycle | Written by |
|---|---|---|---|
| Memory System | Per-user context (observations, preferences, trade notes, strategy notes) | Frozen per session, soft-refreshed on write threshold | LLM via memory_write tool |
| Personalization | User profile: financial tags, custom prompt, persona files | Persistent; mixed manual + auto-rebuilt | User (REPL, CLI, REST); inferrer cron |
| Role Memory | Per-role analysis decision cases + failure modes | Write-on-decision, reconcile async with outcomes | Analysis skills; reflector async |
| Learning System | Tool-sequence learnings + methodology store + scenario learning | Write on successful turn / trade reconciliation | skill_learn; backtest runner; scenario bootstrapper |
The separation matters because each store has different trust + recency semantics:
- Memory System is fresh but unvetted.
- Personalization is authoritative but sparse.
- Role Memory has hard statistical gates (only
logic_error/missing_datacases surface). - Learning System has Wilson-LB graduation (a methodology needs ≥10 uses at ≥55% correctness before it's trusted).
Pages in this section
- Minara Memory — What it is and how it compares to OpenClaw, Hermes, and mem0, plus the frozen-snapshot store: FTS5 search, categories, and how the session snapshot is built.
- Personalization & Workspace — Hand-edited persona files, auto-rebuilt financial profile, user-tag dimensions, and the three rebuild flows.
- Role Memory —
Per-role decision reflection: the two-stage LLM classifier
(
logic_error/missing_data/exogenous/variance),PostHocProbeevidence gathering,failureModesfallback. - Learning System — Tool-sequence learnings, methodology store + Wilson graduation, scenario learning pipeline, backtest feedback loop.
How they compose on a turn
┌─────────────────────────────────────────────────────────┐
│ USER TURN ARRIVES │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 1. Session memory snapshot injected as │ │
│ │ <memory-context> block (frozen-per-session) │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 2. Personalization snapshot — user_profile │ │
│ │ tags + custom prompt + financial_profile │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 3. Role memory hints — BM25 case recall scoped │ │
│ │ to active-skill roles; failureModes fallback │ │
│ │ when zero hits │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 4. Learning system — methodology placeholder │ │
│ │ resolution in scenario playbooks + on-demand │ │
│ │ `methodology_lookup` tool │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ LLM call │
└─────────────────────────────────────────────────────────┘See this in use
- Features → Memory & Personalization — user-facing summary
- Features → Self-Improving Agent — how learning loops feel from the chat side
Related
- Scenario Classifier — the L0.5 intent layer that triggers playbook injection + methodology placeholder resolution.
- Agent Loop — the turn orchestrator that composes all four memory stores.