pub struct LearningConfig {
pub enabled: bool,
pub min_tool_sequence: usize,
pub min_success_ratio: f64,
pub priority_boost_on_success: i32,
pub priority_decay_on_failure: i32,
pub max_learned_skills: usize,
pub stale_procedural_days: u32,
pub dead_skill_priority_threshold: i64,
}Expand description
Configuration for the procedural-memory learning loop.
When sessions close, the governor analyses tool-call sequences and
synthesises reusable skill documents for patterns that meet the
min_tool_sequence and min_success_ratio thresholds.
§Priority asymmetry (intentional)
priority_decay_on_failure (default 10) is 2× larger than
priority_boost_on_success (default 5). This deliberate asymmetry
ensures that a single failure erases roughly two prior successes,
which means unreliable procedures decay to zero and are eventually
superseded by better alternatives. Skills start at priority 50,
giving a new procedure ten consecutive failures of runway before it
drops off the active set (with no successes to counteract).
Fields§
§enabled: bool§min_tool_sequence: usizeMinimum number of tools in a successful sequence to consider it a procedure.
min_success_ratio: f64Minimum tool success ratio in a session (0.0–1.0) to trigger learning.
priority_boost_on_success: i32Priority points added when a learned skill is observed succeeding again.
Default: 5. See struct-level docs for the intentional 2:1 asymmetry
with priority_decay_on_failure.
priority_decay_on_failure: i32Priority points subtracted when a learned skill’s procedure fails.
Default: 10 (2× priority_boost_on_success). The asymmetry
causes unreliable skills to decay faster than reliable skills
accumulate trust, preventing low-quality procedures from
persisting in the active set.
max_learned_skills: usizeCap on total learned skills to prevent unbounded growth.
stale_procedural_days: u32Days of zero-activity before a procedural-memory entry is pruned.
Entries in procedural_memory that have never been observed
succeeding or failing (success_count = 0 AND failure_count = 0)
and are older than this many days are removed during the
retrieval-hygiene sweep. Default: 30.
dead_skill_priority_threshold: i64Learned-skill priority at or below which a skill is considered dead and removed during retrieval-hygiene. Default: 0.
The corresponding .md file on disk is also deleted. Raise this
threshold to be more aggressive about culling low-value skills.
Trait Implementations§
Source§impl Clone for LearningConfig
impl Clone for LearningConfig
Source§fn clone(&self) -> LearningConfig
fn clone(&self) -> LearningConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more