pub struct TierConfig {
pub enabled: bool,
pub promotion_min_sessions: u32,
pub similarity_threshold: f32,
pub sweep_interval_secs: u64,
pub sweep_batch_size: usize,
pub scene_enabled: bool,
pub scene_similarity_threshold: f32,
pub scene_batch_size: usize,
pub scene_provider: ProviderName,
pub scene_sweep_interval_secs: u64,
}Expand description
Configuration for the AOI three-layer memory tier promotion system ([memory.tiers]).
When enabled = true, a background sweep promotes frequently-accessed episodic messages
to semantic tier by clustering near-duplicates and distilling them via an LLM call.
§Validation
Constraints enforced at deserialization time:
similarity_thresholdin[0.5, 1.0]promotion_min_sessions >= 2sweep_batch_size >= 1scene_similarity_thresholdin[0.5, 1.0]scene_batch_size >= 1
Fields§
§enabled: boolEnable the tier promotion system. When false, all messages remain episodic.
Default: false.
promotion_min_sessions: u32Minimum number of distinct sessions a fact must appear in before promotion.
Must be >= 2. Default: 3.
similarity_threshold: f32Cosine similarity threshold for clustering near-duplicate facts during sweep.
Must be in [0.5, 1.0]. Default: 0.92.
sweep_interval_secs: u64How often the background promotion sweep runs, in seconds. Default: 3600.
sweep_batch_size: usizeMaximum number of messages to evaluate per sweep cycle. Must be >= 1. Default: 100.
scene_enabled: boolEnable MemScene consolidation of semantic-tier messages. Default: false.
scene_similarity_threshold: f32Cosine similarity threshold for MemScene clustering. Must be in [0.5, 1.0]. Default: 0.80.
scene_batch_size: usizeMaximum unassigned semantic messages processed per scene consolidation sweep. Default: 50.
scene_provider: ProviderNameProvider name from [[llm.providers]] for scene label/profile generation.
Falls back to the primary provider when empty. Default: "".
scene_sweep_interval_secs: u64How often the background scene consolidation sweep runs, in seconds. Default: 7200.
Trait Implementations§
Source§impl Clone for TierConfig
impl Clone for TierConfig
Source§fn clone(&self) -> TierConfig
fn clone(&self) -> TierConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TierConfig
impl Debug for TierConfig
Source§impl Default for TierConfig
impl Default for TierConfig
Source§impl<'de> Deserialize<'de> for TierConfigwhere
TierConfig: Default,
impl<'de> Deserialize<'de> for TierConfigwhere
TierConfig: Default,
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 TierConfig
impl RefUnwindSafe for TierConfig
impl Send for TierConfig
impl Sync for TierConfig
impl Unpin for TierConfig
impl UnsafeUnpin for TierConfig
impl UnwindSafe for TierConfig
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> 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>
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