pub struct AgentEvent {Show 20 fields
pub event_id: String,
pub occurred_at: DateTime<Utc>,
pub device: DeviceContext,
pub agent: AgentContext,
pub session_id: String,
pub turn_id: Option<String>,
pub naming_thread: bool,
pub stream_id: Option<String>,
pub response_id: Option<String>,
pub previous_response_id: Option<String>,
pub purpose: Option<EventPurpose>,
pub session_title: Option<String>,
pub llm: LlmContext,
pub side: AgentEventSide,
pub text: Option<String>,
pub conversation: Option<Conversation>,
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: StringStable event identifier assigned by the event producer.
occurred_at: DateTime<Utc>Time at which the broker observed the logical event.
device: DeviceContextDevice context observed by the broker.
agent: AgentContextAgent product context inferred from traffic.
session_id: StringProvider or collector session identifier.
turn_id: Option<String>The user turn this request works for, as the Agent declares it in its request headers; unique within the session. Absent when the request works for no particular turn.
naming_thread: boolWhether the request comes from a thread the Agent opened only to name another session.
stream_id: Option<String>The thread that sent this exchange’s request, as the Agent declares it. Requests with the same value continue one conversation. Absent when the Agent declares none.
response_id: Option<String>Provider identity of the response this exchange produced. Both events of the exchange carry it, and later requests continue after it by this value.
previous_response_id: Option<String>The response this exchange’s request continues after; the request then carries only the messages added since that response.
purpose: Option<EventPurpose>What the Agent made this provider call for, when its traffic says so.
session_title: Option<String>Title the Agent generated for the session this event belongs to;
response side of a EventPurpose::SessionTitle call only.
llm: LlmContextProvider and model context.
side: AgentEventSideRequest or response side represented by this event.
text: Option<String>Policy-retained request or response text.
conversation: Option<Conversation>Role-aware request or response messages.
token_usage: TokenUsageToken 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.