Skip to content

feat: adding resume / event management primitives#813

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_864541719
Feb 6, 2026
Merged

feat: adding resume / event management primitives#813
copybara-service[bot] merged 1 commit intomainfrom
test_864541719

Conversation

@copybara-service
Copy link

feat: adding resume / event management primitives

This is a step towards implementing pause/resume/rewind. This change introduce several features related to resumability and event management within the Google ADK core.

Here's a summary of the changes:

  1. InvocationContext.java:

    • A new public method resumabilityConfig() is added to provide access to the invocation's ResumabilityConfig.
    • A method populateAgentStates(ImmutableList<Event> events) is introduced to initialize or update the agentStates and endOfAgents maps within the InvocationContext by processing events associated with the current invocation ID.
  2. EventActions.java:

    • The EventActions class now extends JsonBaseModel.
    • A new field deletedArtifactIds (a Set<String>) is added to track artifacts that should be deleted. This field is included in JSON serialization/deserialization, equality checks, and the EventActions.Builder's merge logic.
  3. Event.java:

    • The finalResponse() logic is updated. Previously, an event with longRunningToolIds was always considered a final response. This check has been removed, meaning the presence of longRunningToolIds alone no longer makes an event a finalResponse.

@copybara-service copybara-service bot force-pushed the test_864541719 branch 3 times, most recently from 7fe4841 to 94c8130 Compare February 6, 2026 22:06
This is a step towards implementing pause/resume/rewind.  This change introduce several features related to resumability and event management within the Google ADK core.

Here's a summary of the changes:

1.  **`InvocationContext.java`**:
    *   A new public method `resumabilityConfig()` is added to provide access to the invocation's `ResumabilityConfig`.
    *   A method `populateAgentStates(ImmutableList<Event> events)` is introduced to initialize or update the `agentStates` and `endOfAgents` maps within the `InvocationContext` by processing events associated with the current invocation ID.

2.  **`EventActions.java`**:
    *   The `EventActions` class now extends `JsonBaseModel`.
    *   A new field `deletedArtifactIds` (a `Set<String>`) is added to track artifacts that should be deleted. This field is included in JSON serialization/deserialization, equality checks, and the `EventActions.Builder`'s merge logic.

3.  **`Event.java`**:
    *   The `finalResponse()` logic is updated. Previously, an event with `longRunningToolIds` was always considered a final response. This check has been removed, meaning the presence of `longRunningToolIds` alone no longer makes an event a `finalResponse`.

PiperOrigin-RevId: 866611243
@copybara-service copybara-service bot merged commit 2de03a8 into main Feb 6, 2026
@copybara-service copybara-service bot deleted the test_864541719 branch February 6, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant