google / google/adk-python

Feature Request: Expose rewind functionality via Agent Engine REST API

Ouverte
#4,121 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
agent engine needs review
Langage dominant
Python
Étoiles
21.5k
Forks
4k
Merge moyen
1 j 14 h
PR mergées (30 j)
37

Description

## Feature Request

**Is your feature request related to a problem?**

Yes. The `runner.rewind_async()` method works great for local development, but when deploying to **Agent Engine (managed)**, there's no REST API endpoint to call the rewind functionality.

When trying to use the `appendEvent` endpoint with `rewind_before_invocation_id` in the actions object, the API returns:

```
Invalid JSON payload received. Unknown name "rewind_before_invocation_id" at 'event.actions': Cannot find field.
```

This means apps deployed to Agent Engine cannot implement "edit message" functionality that rewinds the conversation.

**Describe the solution you'd like**

Expose the rewind functionality via the Agent Engine REST API. Either:

1. Accept `rewind_before_invocation_id` in the `appendEvent` endpoint's `actions` object, OR
2. Add a dedicated `:rewind` endpoint like: `POST /sessions/{session_id}:rewind`

**Describe alternatives you've considered**

- **Self-hosting with `adk api_server`** - Works but loses the benefits of managed Agent Engine
- **UI-only fake rewind** - Just hide old messages and send new one, but AI still sees old context
- **Starting new sessions** - Poor UX, loses conversation history

**Additional context**

The rewind feature is documented at https://google.github.io/adk-docs/sessions/rewind/ and the Python SDK has `runner.rewind_async()` since v1.17.0. It would be great to have parity in the REST API for managed deployments.

**Environment**
- ADK version: 1.22.0
- Deployment: Vertex AI Agent Engine
- Region: us-central1

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.