pub struct CompressionSpectrumConfig {
pub enabled: bool,
pub promotion_output_dir: Option<String>,
pub promotion_provider: ProviderName,
pub promotion_window: usize,
pub min_occurrences: u32,
pub min_sessions: u32,
pub cluster_threshold: f32,
pub retrieval_low_budget_ratio: f32,
pub retrieval_mid_budget_ratio: f32,
}Expand description
Experience compression spectrum configuration, nested under [memory.compression_spectrum].
When enabled = true, the agent uses a three-tier memory retrieval policy
(Episodic → Procedural → Declarative) keyed on remaining token budget, and
runs a background promotion engine that converts recurring episodic patterns
into generated SKILL.md files.
§Example (TOML)
[memory.compression_spectrum]
enabled = true
promotion_output_dir = "~/.config/zeph/skills/promoted"
promotion_provider = "quality"Fields§
§enabled: boolEnable the compression spectrum. Default: false.
promotion_output_dir: Option<String>Directory where promoted SKILL.md files are written.
promotion_provider: ProviderNameProvider name for SKILL.md generation during promotion. Empty = primary provider.
promotion_window: usizeMaximum number of recent episodic messages to scan for promotion candidates.
Default: 200.
min_occurrences: u32Minimum number of times a pattern must appear across all sessions to be promoted.
Default: 3.
min_sessions: u32Minimum number of distinct sessions containing the pattern. Default: 2.
cluster_threshold: f32Cosine similarity threshold for clustering episodic messages. Default: 0.85.
retrieval_low_budget_ratio: f32Remaining-token ratio below which only episodic recall is used. Default: 0.20.
retrieval_mid_budget_ratio: f32Remaining-token ratio below which episodic + procedural recall is used. Default: 0.50.
Trait Implementations§
Source§impl Debug for CompressionSpectrumConfig
impl Debug for CompressionSpectrumConfig
Source§impl Default for CompressionSpectrumConfig
impl Default for CompressionSpectrumConfig
Source§impl<'de> Deserialize<'de> for CompressionSpectrumConfig
impl<'de> Deserialize<'de> for CompressionSpectrumConfig
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 CompressionSpectrumConfig
impl RefUnwindSafe for CompressionSpectrumConfig
impl Send for CompressionSpectrumConfig
impl Sync for CompressionSpectrumConfig
impl Unpin for CompressionSpectrumConfig
impl UnsafeUnpin for CompressionSpectrumConfig
impl UnwindSafe for CompressionSpectrumConfig
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> 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