pub struct AgentRunState {
pub tool_iterations: usize,
pub total_tool_calls: usize,
pub total_tool_errors: usize,
pub consecutive_tool_errors: usize,
pub consecutive_invalid_arguments: usize,
pub consecutive_malformed_arguments: usize,
pub consecutive_unknown_tools: usize,
pub last_tool_signature: Option<String>,
pub repeated_tool_calls: usize,
pub last_failure_kind: Option<ToolFailureKind>,
}Expand description
Mutable state tracked across tool-loop iterations for detecting repetition and enforcing iteration limits.
Fields§
§tool_iterations: usizeTotal tool-loop iterations so far.
total_tool_calls: usizeTotal tool calls requested so far.
total_tool_errors: usizeTotal failed tool calls so far.
consecutive_tool_errors: usizeConsecutive failed tool calls.
consecutive_invalid_arguments: usizeConsecutive invalid-argument tool calls.
consecutive_malformed_arguments: usizeConsecutive malformed-argument tool calls.
consecutive_unknown_tools: usizeConsecutive unknown-tool calls.
last_tool_signature: Option<String>Hash of the last exact tool invocation signature, for repetition detection.
repeated_tool_calls: usizeConsecutive count of the same repeated tool call.
last_failure_kind: Option<ToolFailureKind>Last classified tool failure kind.
Trait Implementations§
Source§impl Clone for AgentRunState
impl Clone for AgentRunState
Source§impl Debug for AgentRunState
impl Debug for AgentRunState
Source§impl Default for AgentRunState
impl Default for AgentRunState
impl Eq for AgentRunState
Source§impl PartialEq for AgentRunState
impl PartialEq for AgentRunState
impl StructuralPartialEq for AgentRunState
Auto Trait Implementations§
impl Freeze for AgentRunState
impl RefUnwindSafe for AgentRunState
impl Send for AgentRunState
impl Sync for AgentRunState
impl Unpin for AgentRunState
impl UnsafeUnpin for AgentRunState
impl UnwindSafe for AgentRunState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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