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§fn clone(&self) -> AgentRunState
fn clone(&self) -> AgentRunState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentRunState
impl Debug for AgentRunState
Source§impl Default for AgentRunState
impl Default for AgentRunState
Source§fn default() -> AgentRunState
fn default() -> AgentRunState
Returns the “default value” for a type. Read more
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.