pub struct AgentCost {
pub turns: u64,
pub input_tokens: u64,
pub output_tokens: u64,
pub tool_calls: u64,
pub steps_failed: u64,
pub suspensions: u64,
}Expand description
What a run’s agent steps cost, absent for runs that had none.
Totals across every step node (spawned instances included). Token counts are what the providers reported; a mock provider reports whatever it likes, so zeros here mean “nothing reported”, not free.
Fields§
§turns: u64Total step turns taken.
input_tokens: u64Prompt tokens, as reported by the providers.
output_tokens: u64Completion tokens, as reported by the providers.
tool_calls: u64Tool invocations across all steps.
steps_failed: u64Steps that ended in an error — their cost is included above.
suspensions: u64Times a step suspended for external input.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentCost
impl<'de> Deserialize<'de> for AgentCost
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
impl Eq for AgentCost
impl StructuralPartialEq for AgentCost
Auto Trait Implementations§
impl Freeze for AgentCost
impl RefUnwindSafe for AgentCost
impl Send for AgentCost
impl Sync for AgentCost
impl Unpin for AgentCost
impl UnsafeUnpin for AgentCost
impl UnwindSafe for AgentCost
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