pub struct MeditateConfig {
pub prune_threshold: f64,
pub decay_factor: f64,
pub max_notes_before_trigger: usize,
pub max_failures_before_trigger: usize,
pub use_llm: bool,
pub max_notes_after_consolidation: usize,
pub max_failures_after_prune: usize,
}Expand description
Configuration for the meditate (memory consolidation) operation.
Meditate is the agent’s “sleep cycle” — it prunes stale notes, decays relevance, consolidates related notes, and optionally uses an LLM for deeper synthesis. All fields have sensible defaults for typical agent workloads.
§Example
use pe_core::cognitive_memory::MeditateConfig;
let config = MeditateConfig::default();
assert_eq!(config.prune_threshold, 0.1);
assert!(config.use_llm);Fields§
§prune_threshold: f64Relevance threshold below which notes are pruned.
Notes with relevance < prune_threshold are removed during the prune phase.
decay_factor: f64Decay factor applied to all notes during prune (0.0-1.0). Lower values are more aggressive. Applied before the threshold check.
max_notes_before_trigger: usizeMax working notes before meditate auto-triggers (for MeditateLobe).
max_failures_before_trigger: usizeMax failure records before meditate auto-triggers.
use_llm: boolWhether to use an LLM for consolidation and indexing phases. When false, uses algorithmic fallback (group-by-category, truncate).
max_notes_after_consolidation: usizeMax notes to keep after consolidation. Excess pruned by relevance.
max_failures_after_prune: usizeMax failure records to keep after pruning. Oldest resolved go first.
Trait Implementations§
Source§impl Clone for MeditateConfig
impl Clone for MeditateConfig
Source§fn clone(&self) -> MeditateConfig
fn clone(&self) -> MeditateConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MeditateConfig
impl Debug for MeditateConfig
Source§impl Default for MeditateConfig
impl Default for MeditateConfig
Source§impl<'de> Deserialize<'de> for MeditateConfig
impl<'de> Deserialize<'de> for MeditateConfig
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>,
Source§impl PartialEq for MeditateConfig
impl PartialEq for MeditateConfig
Source§fn eq(&self, other: &MeditateConfig) -> bool
fn eq(&self, other: &MeditateConfig) -> bool
self and other values to be equal, and is used by ==.