google / google/adk-python

Feature Request: Expose rewind functionality via Agent Engine REST API

Đang mở
#4,121 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
agent engine needs review
Ngôn ngữ chính
Python
Star
21.5k
Fork
4k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
37

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.