Skip to main content

Module event

Module event 

Source
Expand description

Core traits and types.

Always available regardless of feature flags. Includes:

  • Agent - The fundamental trait for all agents
  • Tool / Toolset - For extending agents with capabilities
  • Session / State - For managing conversation context
  • Event - For streaming agent responses
  • AdkError / Result - Unified error handling Event types representing agent interactions in a conversation.

Structs§

Event
Event represents a single interaction in a conversation. This struct embeds LlmResponse to match ADK-Go’s design pattern.
EventActions
Actions to apply as side effects of an event.
EventCompaction
Metadata for a compacted (summarized) event. When context compaction is enabled, older events are summarized into a single compacted event containing this metadata.
ToolCallView
A typed, borrowed view of a single tool call carried by an Event.
ToolResultView
A typed, borrowed view of a single tool result carried by an Event.

Constants§

KEY_PREFIX_APP
Key prefix for application-scoped state (persists across sessions).
KEY_PREFIX_TEMP
Key prefix for temporary state (cleared each turn).
KEY_PREFIX_USER
Key prefix for user-scoped state (persists across sessions).
TOOL_PROGRESS_CALL_ID_KEY
Event-level provider_metadata key carrying the originating tool’s function-call id on a tool-progress event.
TOOL_PROGRESS_STREAM_KEY
Event-level provider_metadata key marking a tool-progress event and naming its output stream (e.g. "stdout", "stderr"). Present only on events produced by ToolContext::emit_progress.

Functions§

event_belongs_to_branch
Whether an event is visible from a given conversation branch.