#[non_exhaustive]pub struct AgentOutput {
pub value: Value,
pub session_id: Option<String>,
pub cost_usd: Option<f64>,
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub model: Option<String>,
pub duration_ms: u64,
pub debug_messages: Option<Vec<DebugMessage>>,
}Expand description
Raw output returned by an AgentProvider after a successful invocation.
Carries the agent’s response value together with usage and billing metadata.
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.value: ValueThe agent’s response. A plain Value::String for text mode, or an
arbitrary JSON value when a JSON schema was requested.
session_id: Option<String>Provider-assigned session identifier, useful for resuming conversations.
cost_usd: Option<f64>Total cost in USD for this invocation, if reported by the provider.
input_tokens: Option<u64>Number of input tokens consumed, if reported.
output_tokens: Option<u64>Number of output tokens generated, if reported.
model: Option<String>The concrete model identifier used (e.g. "claude-sonnet-4-20250514").
duration_ms: u64Wall-clock duration of the invocation in milliseconds.
debug_messages: Option<Vec<DebugMessage>>Conversation trace captured when AgentConfig::verbose is true.
Contains every assistant message and tool call made during the
invocation, in chronological order. None when verbose mode is off.
Implementations§
Trait Implementations§
Source§impl Clone for AgentOutput
impl Clone for AgentOutput
Source§fn clone(&self) -> AgentOutput
fn clone(&self) -> AgentOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more