pub struct ReflectionSettings {
pub enabled: bool,
pub quality_threshold_percent: u8,
pub max_injected: usize,
pub max_retry_attempts: usize,
pub promotion_confidence_percent: u8,
}Expand description
Settings for ERL-inspired experiential reflection.
When enabled, the agent generates structured reflections on suboptimal turns, may attempt one bounded same-turn corrective retry, and stores the resulting corrective knowledge for future context injection.
The feature defaults to enabled so new installs and sessions benefit from corrective retries and durable reflection without extra setup.
Fields§
§enabled: boolEnable the experiential reflection phase.
quality_threshold_percent: u8Quality threshold percentage (0–100). Reflection triggers when the
response quality score falls below threshold / 100.
max_injected: usizeMaximum number of past reflections to inject into prompt context.
max_retry_attempts: usizeMaximum number of bounded reflection-guided corrective retries.
promotion_confidence_percent: u8Minimum confidence percentage (0–100) for promoting a reflection to long-term memory.
Implementations§
Source§impl ReflectionSettings
impl ReflectionSettings
Sourcepub fn quality_threshold(&self) -> f32
pub fn quality_threshold(&self) -> f32
Get quality threshold as a float (0.0–1.0).
Sourcepub fn promotion_confidence(&self) -> f32
pub fn promotion_confidence(&self) -> f32
Get promotion confidence as a float (0.0–1.0).
Trait Implementations§
Source§impl Clone for ReflectionSettings
impl Clone for ReflectionSettings
Source§fn clone(&self) -> ReflectionSettings
fn clone(&self) -> ReflectionSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReflectionSettings
impl Debug for ReflectionSettings
Source§impl Default for ReflectionSettings
impl Default for ReflectionSettings
Source§fn default() -> ReflectionSettings
fn default() -> ReflectionSettings
Source§impl<'de> Deserialize<'de> for ReflectionSettingswhere
ReflectionSettings: Default,
impl<'de> Deserialize<'de> for ReflectionSettingswhere
ReflectionSettings: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReflectionSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReflectionSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ReflectionSettings
impl PartialEq for ReflectionSettings
Source§impl Serialize for ReflectionSettings
impl Serialize for ReflectionSettings
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ReflectionSettings
impl StructuralPartialEq for ReflectionSettings
Auto Trait Implementations§
impl Freeze for ReflectionSettings
impl RefUnwindSafe for ReflectionSettings
impl Send for ReflectionSettings
impl Sync for ReflectionSettings
impl Unpin for ReflectionSettings
impl UnwindSafe for ReflectionSettings
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>,
Layered].§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().