pub struct ReasoningConfig {Show 13 fields
pub enabled: bool,
pub extract_provider: ProviderName,
pub distill_provider: ProviderName,
pub top_k: usize,
pub store_limit: usize,
pub max_messages: usize,
pub max_message_chars: usize,
pub context_budget_tokens: usize,
pub min_messages: usize,
pub extraction_timeout_secs: u64,
pub distill_timeout_secs: u64,
pub self_judge_window: usize,
pub min_assistant_chars: usize,
}Expand description
ReasoningBank: distilled reasoning strategy memory configuration (#3342).
When enabled = true, each completed agent turn is evaluated by a self-judge LLM call.
Successful and failed reasoning chains are compressed into short, generalizable strategy
summaries. At context-build time, top-k strategies are retrieved by embedding similarity
and injected into the prompt preamble.
All LLM work (self-judge, distillation) runs asynchronously — never on the turn thread.
§Example
[memory.reasoning]
enabled = true
extract_provider = "fast"
distill_provider = "fast"
top_k = 3
store_limit = 1000Fields§
§enabled: boolEnable the reasoning-bank pipeline. Default: false.
extract_provider: ProviderNameProvider name from [[llm.providers]] for the self-judge step.
Falls back to the primary provider when empty. Default: "".
distill_provider: ProviderNameProvider name from [[llm.providers]] for the distillation step.
Falls back to the primary provider when empty. Default: "".
top_k: usizeNumber of strategies retrieved per turn for context injection. Default: 3.
store_limit: usizeMaximum stored strategies; oldest unused are evicted when limit is reached. Default: 1000.
max_messages: usizeMaximum number of recent messages passed to the self-judge LLM. Default: 6.
max_message_chars: usizePer-message content truncation limit (chars) before building the judge transcript. Default: 2000.
context_budget_tokens: usizeMaximum token budget for injected reasoning strategies in context. Default: 500.
min_messages: usizeMinimum number of messages required before self-judge fires. Default: 2.
extraction_timeout_secs: u64Timeout in seconds for the self-judge LLM call. Default: 30.
distill_timeout_secs: u64Timeout in seconds for the distillation LLM call. Default: 30.
self_judge_window: usizeMaximum number of recent messages passed to the self-judge evaluator.
Narrowing to the last user+assistant pair improves classification accuracy.
Default: 2.
min_assistant_chars: usizeMinimum characters in the assistant response to trigger self-judge.
Short or trivial responses are skipped. Default: 50.
Trait Implementations§
Source§impl Clone for ReasoningConfig
impl Clone for ReasoningConfig
Source§fn clone(&self) -> ReasoningConfig
fn clone(&self) -> ReasoningConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more