pub struct AgentContinuation {
pub thread_id: ThreadId,
pub turn: usize,
pub total_usage: TokenUsage,
pub turn_usage: TokenUsage,
pub pending_tool_calls: Vec<PendingToolCallInfo>,
pub awaiting_index: usize,
pub completed_results: Vec<(String, ToolResult)>,
pub state: AgentState,
}Expand description
Continuation state that allows resuming the agent loop.
This contains all the internal state needed to continue execution after receiving a confirmation decision. Pass this back when resuming.
Fields§
§thread_id: ThreadIdThread ID (used for validation on resume)
turn: usizeCurrent turn number
total_usage: TokenUsageTotal token usage so far
turn_usage: TokenUsageToken usage for this specific turn (from the LLM call that generated tool calls)
pending_tool_calls: Vec<PendingToolCallInfo>All pending tool calls from this turn
awaiting_index: usizeIndex of the tool call awaiting confirmation
completed_results: Vec<(String, ToolResult)>Tool results already collected (for tools before the awaiting one)
state: AgentStateAgent state snapshot
Trait Implementations§
Source§impl Clone for AgentContinuation
impl Clone for AgentContinuation
Source§fn clone(&self) -> AgentContinuation
fn clone(&self) -> AgentContinuation
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 AgentContinuation
impl Debug for AgentContinuation
Source§impl<'de> Deserialize<'de> for AgentContinuation
impl<'de> Deserialize<'de> for AgentContinuation
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 AgentContinuation
impl RefUnwindSafe for AgentContinuation
impl Send for AgentContinuation
impl Sync for AgentContinuation
impl Unpin for AgentContinuation
impl UnwindSafe for AgentContinuation
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