Crate zeroclaw_memory
Expand description
Memory subsystem: backends, embeddings, consolidation, retrieval.
Re-exports§
pub use agent_scoped::AgentScopedMemory;pub use agent_scoped_markdown::AgentScopedMarkdownMemory;pub use agent_scoped_markdown::MarkdownPeer;pub use audit::AuditedMemory;pub use backend::MemoryBackendKind;pub use backend::MemoryBackendProfile;pub use backend::classify_memory_backend;pub use backend::default_memory_backend_key;pub use backend::memory_backend_profile;pub use backend::selectable_memory_backends;pub use embeddings::EmbeddingIdentity;pub use lucid::LucidMemory;pub use markdown::MarkdownMemory;pub use none::NoneMemory;pub use policy::PolicyEnforcer;pub use qdrant::QdrantMemory;pub use rerank::RerankConfig;pub use rerank::RerankStrategy;pub use response_cache::ResponseCache;pub use retrieval::RetrievalConfig;pub use retrieval::RetrievalPipeline;pub use scanned::ScannedMemory;pub use sqlite::SqliteMemory;
Modules§
- agent_
scoped - agent_
scoped_ markdown - Cross-agent path-walk variant for Markdown-backed agents.
- audit
- Audit trail for memory operations.
- backend
- budget
- chunker
- classify
- Memory kind classification for consolidation writes.
- conflict
- Conflict resolution for memory entries.
- consolidation
- LLM-driven memory consolidation.
- decay
- dedup
- embeddings
- hygiene
- importance
- Heuristic importance scorer for non-LLM paths.
- knowledge_
graph - Knowledge graph for capturing, organizing, and reusing expertise.
- lucid
- markdown
- merge
- none
- normalize
- Score normalization helpers for recall candidates.
- policy
- Policy engine for memory operations.
- policy_
gate - qdrant
- redact
- Category-based redaction for durable memory content.
- rerank
- Query-time rerank machinery for recalled memory candidates.
- response_
cache - Response cache — avoid burning tokens on repeated prompts.
- retrieval
- Optional read-cache decorator over a single backend recall.
- scanned
- Write- and read-boundary content screening for durable memory.
- snapshot
- Memory snapshot — export/import core memories as human-readable Markdown.
- sqlite
- threat
- Content scanning for durable memory entries.
- traits
- vector
Structs§
- Embedding
Settings - Export
Filter - Filter criteria for bulk memory export (GDPR Art. 20 data portability).
- Memory
Entry - A single memory entry
- Procedural
Message - A single message in a conversation trace for procedural memory.
Enums§
- Memory
Category - Memory categories for organization
Constants§
- MEMORY_
CONTEXT_ CLOSE - Closing delimiter for recalled memory injected into provider context.
- MEMORY_
CONTEXT_ OPEN - Opening delimiter for recalled memory injected into provider context.
Traits§
- Memory
- Core memory trait — implement for any persistence backend
Functions§
- backend_
kind_ from_ dotted - Extract the backend kind from a V3 dotted reference (
<kind>.<alias>). Bare names ("sqlite") are returned as-is. Returned lowercase. - create_
memory - create_
memory_ for_ agent - Build the per-agent memory wrapper for
agent_alias. - create_
memory_ for_ migration - create_
memory_ from_ config - Construct memory from the canonical loaded configuration.
- create_
memory_ with_ storage_ and_ routes - create_
response_ cache - Factory: create an optional response cache from config.
- is_
assistant_ autosave_ key - Legacy auto-save key used for model-authored assistant summaries. These entries are treated as untrusted context and should not be re-injected.
- is_
recent_ recall_ query - Returns true when a recall query should be interpreted as recent/time-only recall.
- is_
user_ autosave_ key - normalize_
recent_ recall_ query - Normalizes recent/time-only recall queries to the backend-neutral empty query.
- resolve_
embedding_ settings - should_
skip_ autosave_ content - Filter known synthetic autosave noise patterns that should not be persisted as user conversation memories.