Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Memory

Veyyon can remember durable project context across sessions. Memory is off by default; pick a backend in config.yml or /settings.

Backends (built)

BackendStorageBest for
offNo memory injection or retention
localMarkdown under the agent memories dir (MEMORY.md, memory_summary.md, skills/)Curated summaries from past session files
mnemopiSQLite via @veyyon/pi-mnemopiVector + FTS recall, auto-retain, compaction hooks
hindsightHindsight backend (when configured)Alternative structured memory

Enable in config:

memory:
  backend: mnemopi   # or local, hindsight, off

With memory.backend: mnemopi, Veyyon:

  1. Opens scoped SQLite banks (global, per-project, or per-project-tagged).
  2. Recalls relevant memories into a <memories> block on the first turn (and refreshes the base prompt when recall runs from agent_start).
  3. Retains completed turns on a configurable interval (mnemopi.retainEveryNTurns, default 4).
  4. Supplies pre-compaction context from the memory backend when compaction runs.

Key settings: mnemopi.scoping, mnemopi.recallLimit, mnemopi.autoRecall, mnemopi.autoRetain, mnemopi.polyphonicRecall, mnemopi.noEmbeddings. See docs/mnemosyne-memory-backend.md.

Dedicated tools when enabled: memory_recall, memory_retain, memory_reflect, memory_edit. The /memory slash command exposes view, stats, diagnose, clear, and enqueue.

Local summary pipeline

With memory.backend: local, a background pipeline at startup extracts durable signal from past session JSONL files, then consolidates into MEMORY.md, memory_summary.md, and optional skills/. The agent reads artifacts via memory:// URLs on the read tool.

Engineering detail: docs/memory.md.

Compaction (three knobs)

Context compaction is separate from durable memory. Settings → Compaction (or config.yml) exposes exactly three fields:

SettingKeyValues
Thresholdcompaction.thresholdPercent (docs alias: compaction.threshold)percent of the context window
Typecompaction.strategy (docs alias: compaction.type)handoff or snap
Modelcompaction.modelmodel id; unset uses the interactive model

handoff writes a structured session transfer; snap archives history via the snapcompact engine. Run on demand with /compact. See Compaction and project memory.

What the model sees

Recalled or summarized memory is background context, not instructions. Current user messages, tool output, and repo state win on conflict. The agent should cite memory paths when memory changes a plan and pair citations with fresh repo evidence.

Configuration

Use /memory or /settings (Memory group), or set keys under memory.*, mnemopi.*, hindsight.*, or memories.* depending on the active backend.

Per-profile: the active backend, its settings, and its stored data (mnemopi SQLite path, local Markdown artifacts, hindsight bank id) are all scoped to the active profile (VEYYON_PROFILE). Two profiles never share memory — switching profiles switches to an independent memory.backend and an independent database/artifact set under that profile’s agent directory.

Spec — not shipped: rollout-DB memory phases, <oai-mem-citation> blocks, rollout_summaries/, and a /memories settings pane. Veyyon uses the backends above instead.