Event
Represents an event in a session.
Constructors
Properties
Optional actions associated with this event.
The average log probabilities of the generated tokens.
A human-readable error message if an error occurred.
The reason the LLM generation finished.
The grounding metadata of the event.
True if the generation of this event was interrupted.
Id of the invocation that this event belongs to.
Returns true if this event is the final response of an agent turn — i.e. it terminates the per-turn model loop in com.google.adk.kt.agents.LlmAgent.executeTurns. Matches ADK Python's Event.is_final_response(): skipSummarization or a non-empty longRunningToolIds set both mark the event as final, otherwise the event is final iff it carries no function calls, no function responses, is not a partial streaming chunk, and has no trailing code-execution-result part.
Set of ids of the long running function calls. Agent client will know from this field about which function call is long running.
The model version used to generate the response.
True if this event marks the completion of a turn.
Metadata about the token usage for the LLM call.
Functions
Returns all function calls from this event.
Returns all function responses from this event.
Returns true if the last part of this event is a code-execution result. Mirrors ADK Java's Event.hasTrailingCodeExecutionResult().
Scans a model response event's parts for function calls missing an ID and generates one for them.