From b04d72d3925f5d80a7cfaaf257070ff310d7a401 Mon Sep 17 00:00:00 2001 From: Shangjie Chen Date: Sat, 21 Jun 2025 17:02:46 -0700 Subject: [PATCH] chore: Clarify the behavior of Event.invocation_id PiperOrigin-RevId: 774235097 --- src/google/adk/events/event.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/google/adk/events/event.py b/src/google/adk/events/event.py index c3b8b8699..6dd617fff 100644 --- a/src/google/adk/events/event.py +++ b/src/google/adk/events/event.py @@ -34,9 +34,10 @@ class Event(LlmResponse): taken by the agents like function calls, etc. Attributes: - invocation_id: The invocation ID of the event. - author: "user" or the name of the agent, indicating who appended the event - to the session. + invocation_id: Required. The invocation ID of the event. Should be non-empty + before appending to a session. + author: Required. "user" or the name of the agent, indicating who appended + the event to the session. actions: The actions taken by the agent. long_running_tool_ids: The ids of the long running function calls. branch: The branch of the event. @@ -55,9 +56,8 @@ class Event(LlmResponse): ) """The pydantic model config.""" - # TODO: revert to be required after spark migration invocation_id: str = '' - """The invocation ID of the event.""" + """The invocation ID of the event. Should be non-empty before appending to a session.""" author: str """'user' or the name of the agent, indicating who appended the event to the session."""