Expand description
Native memory coprocessor for persistent recall across sessions.
Inspired by Mnemo Cortex, this module provides:
- SQLite + FTS5 storage for messages and summaries
- Background compaction via LLM summarization
- Context injection at agent bootstrap
- DAG-based summary lineage for expansion
§Trait Architecture
Follows existing RustyClaw patterns:
MemoryStore— storage abstraction (SQLite, in-memory, remote)Summarizer— summarization backend (LLM, deterministic)
Structs§
- Compaction
Stats - Statistics from a compaction pass.
- Deterministic
Summarizer - Deterministic fallback summarizer (truncation-based).
- LlmSummarizer
- LLM-backed summarizer using provider infrastructure.
- Memory
Entry - A single memory entry (message or summary).
- Memory
Hit - Search result with relevance score.
- Mnemo
Config - Configuration for the memory coprocessor.
- Sqlite
Memory Store - SQLite-backed memory store with FTS5 support.
- Summarization
Config - Summarization backend configuration.
Enums§
- Summary
Kind - Kind of summary being generated.
Traits§
- Memory
Store - Core memory storage trait.
- Summarizer
- Summarization backend for memory compaction.
Functions§
- create_
memory_ store - Create a shared memory store from configuration.
- create_
summarizer - Create a summarizer based on configuration.
- estimate_
tokens - Estimate token count for a string (rough heuristic: ~4 chars per token).
- generate_
context_ md - Generate context markdown for bootstrap injection.
- run_
compaction - Run compaction in a background loop.
Type Aliases§
- Shared
Memory Store - Shared mnemo store for concurrent access.