Skip to main content

Crate mw_memory

Crate mw_memory 

Source
Expand description

mw-memory — explainable retrieval for MemoryWhale.

The differentiator: retrieval that returns not just which memories, but why — a blended score over interpretable signals (similarity, recency, importance, reinforcement, task-relevance), each with a human-readable reason.

Everything is behind a engine::MemoryEngine interface that MemoryWhale owns, so the storage/retrieval backend is pluggable: the built-in scorer by default, or — with the off-by-default mempalace feature — an engine::MemPalaceEngine that talks to a local mempalace-mcp server over MCP. Callers never change.

Modules§

embed
Pluggable text embedding — so similarity can be semantic, not just lexical.
engine
The pluggable retrieval backend.
scorer
The explainable scorer: turn a (memory, query) pair into a blended score plus the interpretable signals behind it.
sqlite
The one loader: build scorable Memory items from a MemoryWhale SQLite DB.

Structs§

Memory
A single memory item. (The built-in engine scores over these; the MemPalace adapter maps its hits into the same shape.)
Query
A retrieval request plus the context that makes scoring explainable.
ScoredMemory
A memory with its blended score and the signals that produced it.
Signal
One interpretable scoring signal and its contribution.
Weights
How much each signal counts toward the blended score.