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>,
}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§
§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.
Trait Implementations§
Source§impl Clone for AgentOutput
impl Clone for AgentOutput
Source§fn clone(&self) -> AgentOutput
fn clone(&self) -> AgentOutput
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 AgentOutput
impl Debug for AgentOutput
Source§impl<'de> Deserialize<'de> for AgentOutput
impl<'de> Deserialize<'de> for AgentOutput
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 AgentOutput
impl RefUnwindSafe for AgentOutput
impl Send for AgentOutput
impl Sync for AgentOutput
impl Unpin for AgentOutput
impl UnsafeUnpin for AgentOutput
impl UnwindSafe for AgentOutput
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