pub struct ReflectionConfig {
pub enabled: bool,
pub quality_threshold: f32,
pub max_injected_reflections: usize,
pub max_retry_attempts: usize,
pub promotion_confidence: f32,
}Expand description
Configuration for the experiential reflection system.
The settings map the ERL-inspired design onto Gestura’s runtime behavior:
enabledkeeps the feature opt-in because it adds an extra LLM call on weak turns and can therefore increase latency/cost.quality_thresholdmaps to ERL’s τ-style gate for deciding when a turn is poor enough to merit reflection.max_injected_reflectionslimits how much cross-episode corrective memory can be injected back into future prompts.max_retry_attemptsbounds same-turn corrective retries. A retry may be a text-only revision or one safe read-only re-execution driven by the reflection strategy, but the runtime still caps it to a single retry.promotion_confidencegates whether a reflection is strong enough to move from short-term/session memory into long-term memory-bank storage.
Fields§
§enabled: boolEnable the reflection phase in the agent loop.
quality_threshold: f32Quality threshold (0.0–1.0). Reflection only triggers when the response quality score falls below this value. Maps to ERL’s τ parameter (gated reflection).
max_injected_reflections: usizeMaximum number of past reflections to inject into prompt context.
max_retry_attempts: usizeMaximum number of reflection-guided corrective retries per turn.
The runtime currently applies at most one bounded retry. That retry may be a text-only revision or one safe re-execution with read-only tool policy.
promotion_confidence: f32Minimum confidence for a reflection to be promoted to long-term memory.
Trait Implementations§
Source§impl Clone for ReflectionConfig
impl Clone for ReflectionConfig
Source§fn clone(&self) -> ReflectionConfig
fn clone(&self) -> ReflectionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReflectionConfig
impl Debug for ReflectionConfig
Source§impl Default for ReflectionConfig
impl Default for ReflectionConfig
Source§impl<'de> Deserialize<'de> for ReflectionConfig
impl<'de> Deserialize<'de> for ReflectionConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ReflectionConfig
impl RefUnwindSafe for ReflectionConfig
impl Send for ReflectionConfig
impl Sync for ReflectionConfig
impl Unpin for ReflectionConfig
impl UnwindSafe for ReflectionConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].