LlmInvocationEvent

class LlmInvocationEvent(val agentProcess: AgentProcess, val invocation: LlmInvocation, val interactionId: String) : AbstractAgentProcessEvent

Emitted once per individual LLM invocation (per-call, not per-loop).

Survives CONCURRENT mode and validation/binding retries — each effective LLM call produces exactly one event. Listener exceptions are isolated by the underlying notifyAfterLlmCall try/catch, so a misbehaving listener cannot break the tool loop.

In CONCURRENT mode, this event may be emitted from multiple threads simultaneously. Stateful listeners (cost aggregation, rate caps, etc.) MUST use thread-safe structures.

Constructors

Link copied to clipboard
constructor(agentProcess: AgentProcess, invocation: LlmInvocation, interactionId: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

unique identifier of the parent LlmInteraction

Link copied to clipboard

per-call invocation record (model, usage, timestamp, cost)

Link copied to clipboard
open override val processId: String

ID of the process that this event relates to.

Link copied to clipboard
Link copied to clipboard
open val timestamp: Instant

Functions

Link copied to clipboard
open override fun toString(): String