Represents an interaction event in an agent session.
Events are the core unit of communication in ADK's event-sourced architecture. Each event captures content, metadata, and side-effect actions produced during agent execution.
Summary
Functions
Determines if this event represents a final response.
Creates a new event with a generated UUID and current timestamp.
Types
@type t() :: %ADK.Event{ actions: ADK.Event.Actions.t(), author: String.t() | nil, branch: String.t() | nil, citation_metadata: map() | nil, content: ADK.Types.Content.t() | nil, custom_metadata: map() | nil, error_code: String.t() | nil, error_message: String.t() | nil, finish_reason: String.t() | nil, grounding_metadata: map() | nil, id: String.t(), interrupted: boolean(), invocation_id: String.t() | nil, long_running_tool_ids: [String.t()], partial: boolean(), timestamp: DateTime.t(), turn_complete: boolean(), usage_metadata: map() | nil }
Functions
Determines if this event represents a final response.
Mirrors Go ADK's IsFinalResponse() logic:
- Returns true if skip_summarization is set or long_running_tool_ids present
- Returns false if content has function calls/responses or event is partial
- Returns true otherwise (it's a final text response)
Creates a new event with a generated UUID and current timestamp.
Accepts a keyword list of fields to set on the event.