pub struct TreeConfig {
pub enabled: bool,
pub consolidation_provider: ProviderName,
pub sweep_interval_secs: u64,
pub batch_size: usize,
pub similarity_threshold: f32,
pub max_level: u32,
pub context_budget_tokens: usize,
pub recall_top_k: usize,
pub min_cluster_size: usize,
}Expand description
TiMem temporal-hierarchical memory tree configuration (#2262).
When enabled = true, memories are stored as leaf nodes and periodically consolidated
into hierarchical summaries by a background loop. Context assembly uses tree traversal
for complex queries.
Fields§
§enabled: boolEnable the memory tree and background consolidation loop. Default: false.
consolidation_provider: ProviderNameProvider name from [[llm.providers]] for node consolidation.
Should be a fast/cheap model. Falls back to the primary provider when empty.
sweep_interval_secs: u64Interval between consolidation sweeps in seconds. Default: 300.
batch_size: usizeMaximum leaf nodes loaded per sweep batch. Default: 20.
similarity_threshold: f32Cosine similarity threshold for clustering leaves. Default: 0.8.
max_level: u32Maximum tree depth (levels above leaves). Default: 3.
context_budget_tokens: usizeToken budget allocated to tree memory in context assembly. Default: 400.
recall_top_k: usizeNumber of tree nodes retrieved for context. Default: 5.
min_cluster_size: usizeMinimum cluster size before triggering LLM consolidation. Default: 2.
Trait Implementations§
Source§impl Clone for TreeConfig
impl Clone for TreeConfig
Source§fn clone(&self) -> TreeConfig
fn clone(&self) -> TreeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more