pub struct RunSummary {
pub rounds: usize,
pub tool_calls: usize,
pub usage: Usage,
}Expand description
Execution summary for one run (business-facing data; carried with the
streaming MessageChunk::Done chunk).
rounds: number of conversation rounds. One conversation plus the tool executions that follow counts as one round, matching the tool-round limit (AgentConfig::max_tool_rounds); error paths (cancellation, exceeding the round limit, etc.) don’t produce aDone, so there is no summary;tool_calls: total number of tool executions;usage: sum of token usage across rounds; rounds where the streaming endpoint didn’t return usage count as zero.
The summary is for business display (“how many rounds / how many
tokens”); observability metrics like latency and call hierarchy don’t
enter the message-chunk stream. The non-streaming run
returns plain text without a summary — use the streaming entry point
when you need one.
§Examples
use molo::agent::RunSummary;
let summary = RunSummary { rounds: 3, tool_calls: 2, ..Default::default() };
assert_eq!(summary.rounds, 3);Fields§
§rounds: usizeNumber of conversation rounds.
tool_calls: usizeTotal number of tool executions.
usage: UsageSum of token usage across rounds.
Trait Implementations§
Source§impl Clone for RunSummary
impl Clone for RunSummary
Source§fn clone(&self) -> RunSummary
fn clone(&self) -> RunSummary
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 moreimpl Copy for RunSummary
Source§impl Debug for RunSummary
impl Debug for RunSummary
Source§impl Default for RunSummary
impl Default for RunSummary
Source§fn default() -> RunSummary
fn default() -> RunSummary
Returns the “default value” for a type. Read more
impl Eq for RunSummary
Source§impl PartialEq for RunSummary
impl PartialEq for RunSummary
impl StructuralPartialEq for RunSummary
Auto Trait Implementations§
impl Freeze for RunSummary
impl RefUnwindSafe for RunSummary
impl Send for RunSummary
impl Sync for RunSummary
impl Unpin for RunSummary
impl UnsafeUnpin for RunSummary
impl UnwindSafe for RunSummary
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.