pub enum EventLine {
ToolStart {
calls: Vec<ToolCallTrace>,
ts: String,
},
ToolResult {
call_id: String,
duration_ms: u64,
ts: String,
},
Done {
model: String,
iterations: usize,
stop_reason: String,
usage: Usage,
ts: String,
},
UserSteered {
content: String,
ts: String,
},
}Expand description
A trace entry persisted alongside messages.
Captures the how of agent execution (which tools ran, how long they took, why the agent stopped, what it cost) — information that doesn’t fit in the message stream itself but is invaluable for debugging.
Variants§
ToolStart
One round of tool calls dispatched by the model.
ToolResult
A single tool call completed.
Done
Agent run finished — final metadata and token usage.
UserSteered
User steered the agent mid-stream.
Implementations§
Source§impl EventLine
impl EventLine
Sourcepub fn from_agent_event(event: &AgentEvent) -> Option<Self>
pub fn from_agent_event(event: &AgentEvent) -> Option<Self>
Build a trace entry from an AgentEvent. Returns None for
events that don’t carry useful trace information.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventLine
impl<'de> Deserialize<'de> for EventLine
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 EventLine
impl RefUnwindSafe for EventLine
impl Send for EventLine
impl Sync for EventLine
impl Unpin for EventLine
impl UnsafeUnpin for EventLine
impl UnwindSafe for EventLine
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