google / google/adk-python

Feature Request: Expose rewind functionality via Agent Engine REST API

Abierto
#4,121 3 comentarios 0 reacciones 0 asignados Ver en GitHub
agent engine needs review
Lenguaje dominante
Python
Estrellas
21.5k
Forks
4k
Merge medio
1 d 14 h
PR fusionados (30 d)
37

Descripción

## 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.