Skip to main content

AgentEvent

Struct AgentEvent 

Source
pub struct AgentEvent {
Show 13 fields pub event_id: String, pub occurred_at: DateTime<Utc>, pub device: DeviceContext, pub agent: AgentContext, pub session_id: String, pub turn_index: NonZeroU32, pub llm: LlmContext, pub side: AgentEventSide, pub text: Option<String>, pub token_usage: TokenUsage, pub tool_calls: Vec<ToolCall>, pub tool_results: Vec<ToolResult>, pub attachments: Vec<ImageAttachment>,
}
Expand description

One event decoded with the contract defined by the active plugin protocol.

Fields§

§event_id: String

Stable event identifier assigned by the event producer.

§occurred_at: DateTime<Utc>

Time at which the broker observed the logical event.

§device: DeviceContext

Device context observed by the broker.

§agent: AgentContext

Agent product context inferred from traffic.

§session_id: String

Provider or collector session identifier.

§turn_index: NonZeroU32

One-based collector turn index within the session.

§llm: LlmContext

Provider and model context.

§side: AgentEventSide

Request or response side represented by this event.

§text: Option<String>

Policy-retained request or response text.

§token_usage: TokenUsage

Token counters attributed to this event side.

§tool_calls: Vec<ToolCall>

Normalized tool calls associated with this event side.

§tool_results: Vec<ToolResult>

Normalized tool results associated with this event side.

§attachments: Vec<ImageAttachment>

Policy-retained image attachments.

Trait Implementations§

Source§

impl Debug for AgentEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AgentEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AgentEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.