google / google/adk-python

Feature Request: Expose rewind functionality via Agent Engine REST API

オープン
#4,121 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
agent engine needs review
主要言語
Python
スター
21.5k
フォーク
4k
平均マージ
1日 14時間
マージ済み PR(30日)
37

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。