pub struct AgentOutcome {
pub response: ModelResponse,
pub transcript: Vec<Message>,
pub turns: u32,
pub tool_calls: u32,
pub delegations: u32,
pub usage: Usage,
}Expand description
Successful terminal state of an agent run.
Fields§
§response: ModelResponseFinal model response.
transcript: Vec<Message>Complete canonical transcript, including tool calls and results.
turns: u32Model turns performed by this agent.
tool_calls: u32Tool calls attempted by this agent.
delegations: u32Successful direct child-agent delegations performed by this agent.
usage: UsageShared run-tree usage snapshot at completion.
Implementations§
Source§impl AgentOutcome
impl AgentOutcome
Sourcepub fn into_text(self) -> String
pub fn into_text(self) -> String
Consumes the outcome and returns only model-visible terminal text.
Use this only when the transcript, usage, counters, warnings, and provider-specific response data are no longer needed.
Sourcepub fn terminal_repairs(&self) -> u32
pub fn terminal_repairs(&self) -> u32
Returns the number of bounded terminal repair turns in this execution.
Sourcepub fn into_structured<T>(
self,
) -> Result<StructuredAgentOutcome<T>, StructuredOutputError>where
T: DeserializeOwned,
pub fn into_structured<T>(
self,
) -> Result<StructuredAgentOutcome<T>, StructuredOutputError>where
T: DeserializeOwned,
Locally validates and decodes the final model response while preserving the complete canonical outcome.
§Errors
Returns StructuredOutputError when the response is missing textual
output, contains a refusal, or does not deserialize as T.
Trait Implementations§
Source§impl Clone for AgentOutcome
impl Clone for AgentOutcome
Source§fn clone(&self) -> AgentOutcome
fn clone(&self) -> AgentOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more