rig-memory-policy
Backend-agnostic memory-policy primitives shared across Rig
memory-store adapters (e.g. rig-memvid
and future SQLite / LanceDB / Qdrant / filesystem backends).
This crate has no dependency on memvid-core or any specific storage
engine. Adapters wrap these primitives in their own backend-specific code.
Phase 1 surface
dedup— in-process content-hash dedup for hooks/compactors that must satisfyrig::memory::{DemotionHook, Compactor}'s idempotency contract on(conversation_id, messages).metadata— typed envelope (FrameMetadata+FrameKind) written into a backend's per-entry metadata map so downstream tools (evals, memory inspectors, RAG pipelines) can reason about the lifecycle that produced each entry.error::PolicyError— neutral error type for the helpers above.
Trait surface (MemoryStore, capability sub-traits, generic
PersistHook/DemotionHook/StoringCompactor) lands in subsequent phases —
see the tracking issue in
rig-memvid#28.
License
MIT