#[non_exhaustive]pub struct AgentOutput {
pub result: String,
pub tool_calls_made: usize,
pub tokens_used: TokenUsage,
pub structured: Option<Value>,
pub estimated_cost_usd: Option<f64>,
pub model_name: Option<String>,
pub tool_call_results: Vec<ToolCallRecord>,
pub goal_met: Option<bool>,
}Expand description
Output of a completed agent run.
Returned by AgentRunner::execute on success. Contains the agent’s
final text response and usage accounting for the entire run.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.result: StringThe agent’s final text response.
tool_calls_made: usizeTotal number of tool calls made during the run.
tokens_used: TokenUsageAggregate token usage for the entire run.
structured: Option<Value>Structured output when the agent was configured with a response schema. Contains the validated JSON conforming to the schema.
estimated_cost_usd: Option<f64>Estimated cost in USD based on model pricing. None if the model is
unknown or cost estimation is not available.
model_name: Option<String>The model name used for this run. For cascading providers, this is the last model that produced a response.
tool_call_results: Vec<ToolCallRecord>Per-tool-call records with full input + untruncated output. Empty when no tools were called or for composite agents that don’t track per-tool detail. Order matches dispatch order (which may differ from completion order due to parallel execution). Counts only tools that were actually executed — denied/blocked calls do not appear here.
goal_met: Option<bool>Whether the run’s GoalCondition was met,
as decided by the independent goal judge. None when no goal was set;
Some(true) when the judge confirmed the objective; Some(false) when
the continuation cap was exhausted without the objective being met.
Trait Implementations§
Source§impl Clone for AgentOutput
impl Clone for AgentOutput
Source§fn clone(&self) -> AgentOutput
fn clone(&self) -> AgentOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more