EventActions

@Serializable
data class EventActions(var skipSummarization: Boolean = false, val stateDelta: MutableMap<String, Any> = concurrentMutableMapOf(), val artifactDelta: MutableMap<String, Int> = concurrentMutableMapOf(), var transferToAgent: String? = null, var escalate: Boolean = false, var endOfAgent: Boolean = false, val requestedToolConfirmations: MutableMap<String, ToolConfirmation> = concurrentMutableMapOf(), var rewindBeforeInvocationId: String? = null, var agentState: TypedData? = null, var compaction: EventCompaction? = null)

Represents the actions attached to an event.

Constructors

Link copied to clipboard
constructor(skipSummarization: Boolean = false, stateDelta: MutableMap<String, Any> = concurrentMutableMapOf(), artifactDelta: MutableMap<String, Int> = concurrentMutableMapOf(), transferToAgent: String? = null, escalate: Boolean = false, endOfAgent: Boolean = false, requestedToolConfirmations: MutableMap<String, ToolConfirmation> = concurrentMutableMapOf(), rewindBeforeInvocationId: String? = null, agentState: TypedData? = null, compaction: EventCompaction? = null)

Properties

Link copied to clipboard

The state of the agent for resumability.

Link copied to clipboard

Indicates that the event is updating an artifact. The key is the filename, and the value is the version.

Link copied to clipboard

If set, this event carries a context-compaction summary that replaces the compacted range of events when the next LLM prompt is built. See EventCompaction.

Link copied to clipboard

If true, the current agent has finished its current run. Note that there can be multiple events with endOfAgent set to true for the same agent within one invocation when there is a loop. The ADK workflow sets this when an agent's run completes naturally. In addition, tools and callbacks may set this on an event they produce to request the current LLM agent's per-step loop to stop after the current step, mirroring Java ADK's EventActions.setEndInvocation(true) / setEndOfAgent(true). Note: this only stops the current LLM agent's step loop; it does not terminate an enclosing workflow agent (SequentialAgent, LoopAgent, ParallelAgent). To break out of a LoopAgent, set escalate instead. CallbackContext.endInvocation() / ToolContext.endInvocation() are convenience helpers for the same per-agent stop signal via InvocationContext.isEndOfInvocation.

Link copied to clipboard

The agent is escalating to a higher level agent.

Link copied to clipboard

A map of tool confirmations requested by this event, keyed by function call ID.

Link copied to clipboard

If set, the agent will rewind history before the specified invocation ID.

Link copied to clipboard

If true, it won't call the model to summarize the function response. Only used for a function response event.

Link copied to clipboard

Indicates that the event is updating the state with the given delta.

Link copied to clipboard

If set, the event transfers to the specified agent.

Functions

Link copied to clipboard

Merges this EventActions with another one.

Link copied to clipboard

Removes a key from the state delta.