Event
Represents an event in a session.
Constructors
Types
Properties
Optional actions associated with this event.
The author of the event, such as the name of the agent or node or "user"; defaults to "" and is stamped with the workflow or node name when emitted from a workflow node.
The average log probabilities of the generated tokens.
Context cache metadata associated with this event's LLM response, used to carry cache state across turns. null when context caching is disabled.
A human-readable error message if an error occurred.
The reason the LLM generation finished.
The grounding metadata of the event.
The event id.
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.
Identifies the workflow-node activation that emitted this event; null outside a workflow.
True if this event marks the completion of a turn.
Metadata about the token usage for the LLM call.
Functions
Returns this event's content text joined with separator (none by default), or "" when the event has no content; forwards includeThoughts to Content.text.
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(), keeping such an event out of isFinalResponse so the turn loop runs again to let the model act on the result.
Scans a model response event's parts for function calls missing an ID and generates one for them.
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.