pub struct MemoryConfig {Show 48 fields
pub compression_guidelines: CompressionGuidelinesConfig,
pub sqlite_path: String,
pub history_limit: u32,
pub qdrant_url: String,
pub semantic: SemanticConfig,
pub summarization_threshold: usize,
pub context_budget_tokens: usize,
pub soft_compaction_threshold: f32,
pub hard_compaction_threshold: f32,
pub compaction_preserve_tail: usize,
pub compaction_cooldown_turns: u8,
pub auto_budget: bool,
pub prune_protect_tokens: usize,
pub cross_session_score_threshold: f32,
pub vector_backend: VectorBackend,
pub token_safety_margin: f32,
pub redact_credentials: bool,
pub autosave_assistant: bool,
pub autosave_min_length: usize,
pub tool_call_cutoff: usize,
pub sqlite_pool_size: u32,
pub sessions: SessionsConfig,
pub documents: DocumentConfig,
pub eviction: EvictionConfig,
pub compression: CompressionConfig,
pub sidequest: SidequestConfig,
pub graph: GraphConfig,
pub shutdown_summary: bool,
pub shutdown_summary_min_messages: usize,
pub shutdown_summary_max_messages: usize,
pub shutdown_summary_timeout_secs: u64,
pub structured_summaries: bool,
pub tiers: TierConfig,
pub admission: AdmissionConfig,
pub digest: DigestConfig,
pub context_strategy: ContextStrategy,
pub crossover_turn_threshold: u32,
pub consolidation: ConsolidationConfig,
pub forgetting: ForgettingConfig,
pub database_url: Option<String>,
pub store_routing: StoreRoutingConfig,
pub persona: PersonaConfig,
pub trajectory: TrajectoryConfig,
pub category: CategoryConfig,
pub tree: TreeConfig,
pub microcompact: MicrocompactConfig,
pub autodream: AutoDreamConfig,
pub key_facts_dedup_threshold: f32,
}Fields§
§compression_guidelines: CompressionGuidelinesConfig§sqlite_path: String§history_limit: u32§qdrant_url: String§semantic: SemanticConfig§summarization_threshold: usize§context_budget_tokens: usize§soft_compaction_threshold: f32§hard_compaction_threshold: f32§compaction_preserve_tail: usize§compaction_cooldown_turns: u8§auto_budget: bool§prune_protect_tokens: usize§cross_session_score_threshold: f32§vector_backend: VectorBackend§token_safety_margin: f32§redact_credentials: bool§autosave_assistant: bool§autosave_min_length: usize§tool_call_cutoff: usize§sqlite_pool_size: u32§sessions: SessionsConfig§documents: DocumentConfig§eviction: EvictionConfig§compression: CompressionConfig§sidequest: SidequestConfig§graph: GraphConfig§shutdown_summary: boolStore a lightweight session summary to the vector store on shutdown when no session
summary exists yet for this conversation. Enables cross-session recall for short or
interrupted sessions that never triggered hard compaction. Default: true.
shutdown_summary_min_messages: usizeMinimum number of user-turn messages required before a shutdown summary is generated.
Sessions below this threshold are considered trivial and skipped. Default: 4.
shutdown_summary_max_messages: usizeMaximum number of recent messages (user + assistant) sent to the LLM for shutdown
summarization. Caps token cost for long sessions that never triggered hard compaction.
Default: 20.
shutdown_summary_timeout_secs: u64Per-attempt timeout in seconds for each LLM call during shutdown summarization.
Applies independently to the structured call and to the plain-text fallback.
Default: 10.
structured_summaries: boolUse structured anchored summaries for context compaction.
When enabled, hard compaction requests a JSON schema from the LLM
instead of free-form prose. Falls back to prose if the LLM fails
to produce valid JSON. Default: false.
tiers: TierConfigAOI three-layer memory tier promotion system.
When tiers.enabled = true, a background sweep promotes frequently-accessed episodic
messages to a semantic tier by clustering near-duplicates and distilling via LLM.
admission: AdmissionConfigA-MAC adaptive memory admission control.
When admission.enabled = true, each message is evaluated before saving and rejected
if its composite admission score falls below the configured threshold.
digest: DigestConfigSession digest generation at session end. Default: disabled.
context_strategy: ContextStrategyContext assembly strategy. Default: full_history (current behavior).
crossover_turn_threshold: u32Number of turns at which Adaptive strategy switches to MemoryFirst. Default: 20.
consolidation: ConsolidationConfigAll-Mem lifelong memory consolidation sweep.
When consolidation.enabled = true, a background loop clusters semantically similar
messages and merges them into consolidated entries via LLM.
forgetting: ForgettingConfigSleepGate forgetting sweep (#2397).
When forgetting.enabled = true, a background loop periodically decays importance
scores and prunes memories below the forgetting floor.
database_url: Option<String>PostgreSQL connection URL.
Used when the binary is compiled with --features postgres.
Can be overridden by the vault key ZEPH_DATABASE_URL.
Example: postgres://user:pass@localhost:5432/zeph
Default: None (uses sqlite_path instead).
store_routing: StoreRoutingConfigCost-sensitive store routing (#2444).
When store_routing.enabled = true, query intent is classified and routed to
the cheapest sufficient backend instead of querying all stores on every turn.
persona: PersonaConfigPersona memory layer (#2461).
When persona.enabled = true, user preferences and domain knowledge are extracted
from conversation history and injected into context after the system prompt.
trajectory: TrajectoryConfigTrajectory-informed memory (#2498).
category: CategoryConfigCategory-aware memory (#2428).
tree: TreeConfigTiMem temporal-hierarchical memory tree (#2262).
microcompact: MicrocompactConfigTime-based microcompact (#2699).
When microcompact.enabled = true, stale low-value tool outputs are cleared
from context when the session has been idle longer than gap_threshold_minutes.
autodream: AutoDreamConfigautoDream background memory consolidation (#2697).
When autodream.enabled = true, a constrained consolidation subagent runs
after a session ends if both min_sessions and min_hours gates pass.
key_facts_dedup_threshold: f32Cosine similarity threshold for deduplicating key facts in zeph_key_facts (#2717).
Before inserting a new key fact, its nearest neighbour is looked up in the
zeph_key_facts collection. If the best score is ≥ this threshold the fact is
considered a near-duplicate and skipped. Set to a value greater than 1.0 (e.g.
2.0) to disable dedup entirely. Default: 0.95.
Trait Implementations§
Source§impl Debug for MemoryConfig
impl Debug for MemoryConfig
Source§impl<'de> Deserialize<'de> for MemoryConfig
impl<'de> Deserialize<'de> for MemoryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request