pub struct MemCotConfig {
pub enabled: bool,
pub distill_provider: ProviderName,
pub distill_timeout_secs: u64,
pub min_assistant_chars: usize,
pub min_distill_interval_secs: u64,
pub max_distills_per_session: u64,
pub max_state_chars: usize,
pub recall_view: RecallViewConfig,
pub zoom_out_neighbor_cap: usize,
pub fast_tier_models: Vec<String>,
}Expand description
MemCoT semantic-state distillation configuration.
When enabled = true, the agent maintains a short rolling “semantic state” buffer
summarizing conceptual progress across turns. This buffer is injected into graph
recall queries to improve retrieval relevance.
All LLM work (distillation) runs asynchronously — never on the turn thread.
When enabled = false, this is a complete no-op: no allocation, no LLM calls.
§Config example
[memory.memcot]
enabled = true
distill_provider = "fast"
distill_timeout_secs = 5
min_assistant_chars = 200
min_distill_interval_secs = 30
max_distills_per_session = 50
max_state_chars = 800
recall_view = "head"Fields§
§enabled: boolEnable the MemCoT semantic state pipeline. Default: false.
When false, the accumulator is never allocated and no LLM calls are made.
distill_provider: ProviderNameProvider name from [[llm.providers]] for distillation.
Must reference a fast-tier provider (e.g. gpt-4o-mini, qwen3:8b).
A startup warning is emitted when the resolved model does not look fast-tier.
Falls back to the primary provider when empty. Default: "".
distill_timeout_secs: u64Timeout in seconds for each distillation LLM call. Default: 5.
min_assistant_chars: usizeMinimum characters in the assistant response to trigger distillation.
Short or trivial replies are skipped. Default: 200.
min_distill_interval_secs: u64Minimum elapsed seconds between successive distillation spawns. Default: 30.
Prevents runaway costs on long sessions with rapid turns.
Clearing /new resets this counter.
max_distills_per_session: u64Maximum distillation spawns per conversation session. Default: 50.
Once this cap is reached the accumulator stops distilling for the rest of the
session. Counter is reset when the user sends /new.
max_state_chars: usizeMaximum characters for the semantic state buffer (UTF-8 char boundary truncation).
Default: 800.
recall_view: RecallViewConfigRecall view applied when MemCoT is active. Default: Head.
head: standard retrieval, no enrichment (suitable for low-latency setups).zoom_in: adds source-message provenance to each returned fact.zoom_out: expands 1-hop neighbors per returned fact.
TODO(F3): add a per-call override parameter on recall_graph_view.
zoom_out_neighbor_cap: usizeMaximum 1-hop neighbor facts per head fact in zoom_out view. Default: 3.
fast_tier_models: Vec<String>Optional model name allowlist for the fast-tier soft validator (lowercase substring match).
Empty (default) → falls back to the built-in FAST_TIER_MODEL_HINTS list.
Trait Implementations§
Source§impl Clone for MemCotConfig
impl Clone for MemCotConfig
Source§fn clone(&self) -> MemCotConfig
fn clone(&self) -> MemCotConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more