Struct MemoryInjectConfig
pub struct MemoryInjectConfig {
pub limit: usize,
pub min_relevance_score: f64,
pub max_entries: usize,
pub entry_max_chars: usize,
pub max_total_chars: usize,
pub rerank_enabled: bool,
pub candidate_multiplier: usize,
pub rerank: RerankConfig,
}Expand description
The stable, per-agent-config half of the injection policy. Callers build
it from the agent’s resolved memory config; the per-turn half (origin,
session scope, spawn-site suppression) arrives via
resolve_inject_policy’s arguments.
Fields§
§limit: usizeEntries requested from each recall call.
min_relevance_score: f64Entries scoring below this (post-decay) are dropped; entries without
a score (non-vector backends) are kept. Callers supply the agent’s
configured memory.min_relevance_score.
max_entries: usizeCap on rendered entries.
entry_max_chars: usizePer-entry character cap (ellipsis-truncated beyond it).
max_total_chars: usizeTotal character budget for the block.
rerank_enabled: boolGate for the rerank stage. Off (the default) keeps the pipeline on the time-decay arm, byte-identical to the pre-rerank renderer.
candidate_multiplier: usizeCandidate pool multiplier over limit when reranking: the stage
over-fetches so blend/dedup/MMR have a pool to trim back down.
rerank: RerankConfigRerank stage parameters (strategy, threshold, blend weights, floor,
final trim). Only consulted when rerank_enabled is set.
Implementations§
Source§impl MemoryInjectConfig
impl MemoryInjectConfig
Sourcepub fn from_memory_config(memory: &MemoryConfig, limit: usize) -> Self
pub fn from_memory_config(memory: &MemoryConfig, limit: usize) -> Self
Build the injection config from the agent’s resolved memory config plus the effective recall limit. Threads the relevance floor and the rerank stage settings; budgets stay at the renderer defaults.
Trait Implementations§
Source§impl Clone for MemoryInjectConfig
impl Clone for MemoryInjectConfig
Source§fn clone(&self) -> MemoryInjectConfig
fn clone(&self) -> MemoryInjectConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryInjectConfig
impl Debug for MemoryInjectConfig
Source§impl Default for MemoryInjectConfig
impl Default for MemoryInjectConfig
Source§impl PartialEq for MemoryInjectConfig
impl PartialEq for MemoryInjectConfig
Source§fn eq(&self, other: &MemoryInjectConfig) -> bool
fn eq(&self, other: &MemoryInjectConfig) -> bool
self and other values to be equal, and is used by ==.impl Copy for MemoryInjectConfig
impl StructuralPartialEq for MemoryInjectConfig
Auto Trait Implementations§
impl Freeze for MemoryInjectConfig
impl RefUnwindSafe for MemoryInjectConfig
impl Send for MemoryInjectConfig
impl Sync for MemoryInjectConfig
impl Unpin for MemoryInjectConfig
impl UnsafeUnpin for MemoryInjectConfig
impl UnwindSafe for MemoryInjectConfig
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more