pub struct MemoryCompactionConfig {
pub l0_max_episodes: usize,
pub l1_max_summaries: usize,
pub l0_age_threshold_secs: u64,
pub l1_age_threshold_secs: u64,
pub group_size: usize,
pub similarity_threshold: f32,
pub max_summary_tokens: usize,
pub reembed_summaries: bool,
pub check_interval_secs: u64,
}Expand description
Configuration for memory compaction
Fields§
§l0_max_episodes: usizeMaximum episodes in L0 before compaction
l1_max_summaries: usizeMaximum summaries in L1 before compaction
l0_age_threshold_secs: u64Age threshold for L0 → L1 compaction (seconds)
l1_age_threshold_secs: u64Age threshold for L1 → L2 compaction (seconds)
group_size: usizeNumber of episodes to group for summarization
similarity_threshold: f32Similarity threshold for grouping (0.0 to 1.0)
max_summary_tokens: usizeMaximum tokens per summary
reembed_summaries: boolWhether to re-embed summaries for retrieval
check_interval_secs: u64Compaction check interval (seconds)
Implementations§
Source§impl MemoryCompactionConfig
impl MemoryCompactionConfig
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create config for aggressive compaction (testing/demos)
Sourcepub fn long_running() -> Self
pub fn long_running() -> Self
Create config for long-running agents
Trait Implementations§
Source§impl Clone for MemoryCompactionConfig
impl Clone for MemoryCompactionConfig
Source§fn clone(&self) -> MemoryCompactionConfig
fn clone(&self) -> MemoryCompactionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryCompactionConfig
impl Debug for MemoryCompactionConfig
Auto Trait Implementations§
impl Freeze for MemoryCompactionConfig
impl RefUnwindSafe for MemoryCompactionConfig
impl Send for MemoryCompactionConfig
impl Sync for MemoryCompactionConfig
impl Unpin for MemoryCompactionConfig
impl UnsafeUnpin for MemoryCompactionConfig
impl UnwindSafe for MemoryCompactionConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more