Expand description
High-level semantic memory orchestrator.
SemanticMemory is the primary entry point used by zeph-core. It wires
together crate::store::SqliteStore (relational persistence) and
crate::embedding_store::EmbeddingStore (Qdrant vector index) into a single
object with remember / recall / summarize operations.
§Construction
Use SemanticMemory::new for the default 0.7/0.3 vector/keyword weights, or
SemanticMemory::with_qdrant_ops inside AppBuilder to share a single gRPC
channel across all subsystems.
§Hybrid recall
Recall uses reciprocal-rank fusion of BM25 (SQLite FTS5) and cosine-similarity
(Qdrant) results, with optional temporal decay, MMR diversity reranking, and
per-tier score boosts.
Re-exports§
pub use persona::PersonaExtractionConfig;pub use persona::contains_self_referential_language;pub use persona::extract_persona_facts;pub use trajectory::TrajectoryEntry;pub use trajectory::TrajectoryExtractionConfig;pub use trajectory::extract_trajectory_entries;pub use tree_consolidation::TreeConsolidationConfig;pub use tree_consolidation::TreeConsolidationResult;pub use tree_consolidation::run_tree_consolidation_sweep;pub use tree_consolidation::start_tree_consolidation_loop;
Modules§
- persona
- Persona fact extraction from conversation history (#2461).
- trajectory
- Trajectory-informed memory extraction (#2498).
- tree_
consolidation TiMemtemporal-hierarchical memory tree consolidation (#2262).
Structs§
- Backfill
Progress - Progress state for embed backfill.
- Embed
Context - Tool execution metadata stored as Qdrant payload fields alongside embeddings.
- Extraction
Result - Result returned from
extract_and_store, combining stats with entity IDs needed for linking. - Extraction
Stats - Stats returned from a completed extraction.
- Graph
Extraction Config - Config for the spawned background extraction task.
- Linking
Stats - Stats returned from a completed note-linking pass.
- Note
Linking Config - Runtime config for A-MEM dynamic note linking.
- Recalled
Message - Semantic
Memory - High-level semantic memory orchestrator combining
SQLiteand Qdrant. - Session
Summary Result - Structured
Summary - Summary
- Write
Buffer - Session-scoped write buffer.
Enums§
- Buffered
Write - A single buffered write operation waiting to be flushed to the store.
Functions§
- apply_
mmr - apply_
temporal_ decay - build_
summarization_ prompt - extract_
and_ store - Extract entities and edges from
contentand persist them to the graph store. - link_
memory_ notes - Link newly extracted entities to semantically similar entities in the graph.
Type Aliases§
- Post
Extract Validator - Callback type for post-extraction validation.