Skip to main content

Crate memrust

Crate memrust 

Source

Re-exports§

pub use engine::MemoryEngine;
pub use types::MemoryFilter;
pub use types::MemoryKind;
pub use types::MemoryRecord;
pub use types::RecallHit;
pub use types::RecallRequest;
pub use types::RecallStrategy;
pub use types::RememberRequest;

Modules§

embed
Pluggable embeddings. The engine never assumes a specific model. Four ways to get vectors in:
engine
The memory engine: an agent-native facade (remember / recall / forget) over hybrid retrieval. Recall fans out to the HNSW vector index and the BM25 lexical index, fuses both rankings with reciprocal-rank fusion, then applies recency decay and importance boosts. Scores are returned decomposed per signal so callers can see why something surfaced.
index
rerank
Pluggable reranking — the quality tier above rank fusion. RRF merges rankings; a reranker actually reads the query against each candidate. Same pattern as embedder/summarizer: optional, and the OpenAI-compatible implementation works with hosted APIs or local models (Ollama, LM Studio, vLLM). Reranking failures degrade to fused order, never to an error.
server
store
summarize
Pluggable summarization for memory consolidation, mirroring the embedder design: an offline default that always works, and an OpenAI-compatible remote client for LLM-quality output (OpenAI, or local models via Ollama / LM Studio / vLLM — same /chat/completions protocol).
types