pub struct AgentEvent {Show 19 fields
pub event_id: String,
pub observed_at: DateTime<Utc>,
pub device: DeviceContext,
pub agent: AgentContext,
pub session_id: String,
pub response_id: Option<String>,
pub previous_response_id: Option<String>,
pub subagent_id: Option<String>,
pub parent_subagent_id: Option<String>,
pub turn_id: Option<String>,
pub purpose: Option<EventPurpose>,
pub llm: LlmContext,
pub side: AgentEventSide,
pub omitted: Vec<ContentCategory>,
pub conversation: Option<Conversation>,
pub path: String,
pub headers: Vec<HttpHeader>,
pub token_usage: TokenUsage,
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.
observed_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.
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.
subagent_id: Option<String>Id of the subagent this exchange belongs to, as the client declared it; absent for the main agent and for side requests.
Each declared id is read only from the request headers (for a WebSocket connection, its upgrade request’s), taken verbatim, and absent when no header declares it; no value is substituted. Both events of an exchange carry it.
parent_subagent_id: Option<String>Id of the subagent that spawned this exchange’s subagent, declared like
subagent_id; absent when the main agent spawned it.
turn_id: Option<String>Root turn the client declares, like subagent_id: the user input this
exchange ultimately works for. A subagent’s exchanges carry the value
of the turn that spawned it; an exchange the client makes for no turn
carries none.
purpose: Option<EventPurpose>What the Agent made this provider call for, when its traffic says so.
llm: LlmContextProvider and model context.
side: AgentEventSideRequest or response side represented by this event.
omitted: Vec<ContentCategory>Content categories the effective content policy omitted from this event; empty when everything was retained.
conversation: Option<Conversation>Role-aware request or response entries, one per protocol block or item; the only carrier of the side’s content.
path: StringThe exchange’s request target: its path and query as the request named them (for a WebSocket connection, its upgrade request’s), verbatim. Both events of an exchange carry it.
headers: Vec<HttpHeader>Captured headers of this event’s side: request headers on a request event, response headers on a response event. In capture order, duplicates kept, verbatim except that credential values are redacted.
token_usage: TokenUsageToken counters attributed to this event side.
attachments: Vec<ImageAttachment>Policy-retained image attachments.