Skip to main content
GenosOS has persistent memory across all sessions. Your assistant remembers your preferences, projects, and context — and carries that knowledge forward across restarts, long breaks, and new conversations.

Storage backends

The memory system uses two backends in tandem:
BackendPurpose
QMDPrimary session transcript storage (structured)
SQLiteIndex and metadata (via bun:sqlite)
Vector search is provided by sqlite-vec — an embedded extension that runs inside SQLite with no external service required. Long-term recall uses the memory-lancedb extension (LanceDB) for high-dimensional vector similarity.

TOON compaction

After a session grows long, GenosOS compacts it into a TOON-format summary. TOON (a deterministic 11-section encoding format) reduces session size by approximately 40% compared to raw markdown while preserving meaning with zero information degradation.

What TOON does

  • Deterministic structure. 11 sections per summary covering both technical state (tools used, config changes, decisions made) and relational context (tone, preferences, recurring topics).
  • Cold-restart prevention. Reentry after a long break feels like picking up a mid-sentence conversation — not starting fresh. The compacted summary injects full context before the first token of the new session.
  • Iterative validation. Compaction has been validated across 4 successive rounds with zero information degradation.
  • Benchmark: 13µs per TOON encode call — negligible overhead.

Triggering compaction

Compaction runs automatically when a session reaches its configured size threshold. You can also trigger it manually at any time:
/compact
Or ask the agent:
"Compact this session"
"Summarize what we've done so far"

Semantic prefetch

Before every agent response, GenosOS automatically queries the memory system for relevant context and injects it into the prompt.
  • The query embedding from the prefetch is reused for semantic tool filtering — zero extra API calls.
  • Relevant memory documents (from past sessions, structured notes, and workspace files) are ranked by vector similarity and injected selectively.
  • Users do not configure this. It is always on.

Semantic tool filtering

Tools are filtered by embedding similarity to the user’s intent before being sent to the model.
Tool categoryVisibility rule
Core toolsAlways visible (read, write, exec, bash)
Domain toolsAppear only when semantically relevant to the request
Domain tool examples:
ToolAppears when user asks about…
browserWeb pages, links, scraping, research
canvasVisual output, diagrams, images
cronScheduling, reminders, recurring tasks
imageImage generation, visual tasks
Filtering typically saves 2,000–3,000 tokens per request by removing tool definitions the model does not need for the current request.

Structured memory documents

Long-term notes are stored as structured markdown files in the agent workspace:
~/.genosv1/agents/{uuid}/memory/YYYY-MM-DD.md
Each file follows an 8-section schema covering facts, preferences, decisions, context, and open questions. The agent reads and writes these files using standard file tools — they are encrypted at rest with NYXENC1.
The memory-lancedb extension provides vector search for long-term recall:
  • Embeddings are generated from session content and stored in LanceDB
  • Similarity search retrieves relevant past sessions, notes, and context
  • Runs entirely on your machine — no embeddings are sent to external services beyond the LLM API call that generates them

Memory system summary

FeatureImplementationNotes
Session transcriptsQMD + SQLite (encrypted)Per-channel-peer isolation
Vector searchsqlite-vec (embedded) + LanceDB extensionNo external service required
CompactionTOON format (11 sections, ~40% token reduction)13µs/call, validated 4× iterative
Semantic prefetchEmbedding similarity → context injectionZero extra API calls
Tool filteringEmbedding similarity → tool subsetReuses prefetch embedding, 2K–3K token savings
Structured notesmemory/YYYY-MM-DD.md (8-section schema)Encrypted at rest
Long-term recallLanceDB (memory-lancedb extension)High-dimensional vector similarity