#[non_exhaustive]pub struct AgentOutput {
pub value: Value,
pub session_id: Option<String>,
pub cost_usd: Option<f64>,
pub input_tokens: Option<u64>,
pub cache_read_input_tokens: Option<u64>,
pub cache_creation_input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub model: Option<String>,
pub duration_ms: u64,
pub debug_messages: Option<Vec<DebugMessage>>,
pub account_id: Option<String>,
pub environment_id: Option<String>,
}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>Uncached input tokens (excludes cache reads and writes), if reported.
cache_read_input_tokens: Option<u64>Input tokens served from the prompt cache, if reported.
cache_creation_input_tokens: Option<u64>Input tokens written to the prompt cache, 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.
account_id: Option<String>Identifier of the Provider Account the invocation ran under, if any.
environment_id: Option<String>Persistent environment the invocation ran in, if any.
The name of the PersistentVolumeClaim mounted in the agent pod. Only
the K8s ephemeral provider configured with an environment volume sets
it. Pass it to AgentConfig::resume_environment in a later step to
find the same files again.