** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.
🔴 Required Information
Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A
Is your feature request related to a specific problem?
Agents may sometimes exhibit a heavy tool use, resulting in long processing times. In such a situation, one often wants to abort the generation, return to the last state, and rephrase the query. When interacting with our agents, we heavily rely on the ADK API (adk api_server), which doesn't seem to support a clean way to abort a generation and rewind the session to the previous state.
Describe the Solution You'd Like
The Debug Web UI (adk web) provides a button that allows to cancel the generation and rewind the session to the previous state. An analogous feature for the ADK API (adk api_server) is needed.
Impact on your work
Since we are currently not able to abort generation in a clean way, users often get frustrated when the agents take a wrong path and get lost in the various tools.
Willingness to contribute
N/A
🟡 Recommended Information
Describe Alternatives You've Considered
The only alternative we see with the ADK API so far would be save the session before every turn, delete it upon cancellation, and regenerate the session with the previous copy (create with id), but this seems overly excessive, especially since the ADK Web UI already has the functionality we are looking for.
Proposed API / Implementation
I'd expect that something like runner.rewind_async would be present in the api_server.py and accessible through one of the endpoints.
Additional Context
N/A
** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.
🔴 Required Information
Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A
Is your feature request related to a specific problem?
Agents may sometimes exhibit a heavy tool use, resulting in long processing times. In such a situation, one often wants to abort the generation, return to the last state, and rephrase the query. When interacting with our agents, we heavily rely on the ADK API (
adk api_server), which doesn't seem to support a clean way to abort a generation and rewind the session to the previous state.Describe the Solution You'd Like
The Debug Web UI (
adk web) provides a button that allows to cancel the generation and rewind the session to the previous state. An analogous feature for the ADK API (adk api_server) is needed.Impact on your work
Since we are currently not able to abort generation in a clean way, users often get frustrated when the agents take a wrong path and get lost in the various tools.
Willingness to contribute
N/A
🟡 Recommended Information
Describe Alternatives You've Considered
The only alternative we see with the ADK API so far would be save the session before every turn, delete it upon cancellation, and regenerate the session with the previous copy (create with id), but this seems overly excessive, especially since the ADK Web UI already has the functionality we are looking for.
Proposed API / Implementation
I'd expect that something like
runner.rewind_asyncwould be present in theapi_server.pyand accessible through one of the endpoints.Additional Context
N/A