google / google/adk-python

ADK Session should have display_name and align with AgentEngine Sessions interface

未关闭
#4,164 1 条评论 1 个 reaction 已指派 1 人 已被 @wuliang229 认领 在 GitHub 查看
agent engine
主要语言
Python
星标
21.5k
派生
4k
平均合并
1 天 14 小时
30 天内合并 PR
37

描述

**Is your feature request related to a problem? Please describe.**
VertexAI AgentEngine Sessions supports properties which help in naming the session `displayName` and filtering `labels`. These are not present in ADK, making it hard to filter/name the session.

`DisplayName` is very basic as it serves like the title of the session, otherwise the user sees a list of ids in the list. Which is not friendly at all.

Image

These are the ones present in ADK:
https://github.com/google/adk-python/blob/main/src/google/adk/sessions/session.py

```python
id: str
"""The unique identifier of the session."""
app_name: str
"""The name of the app."""
user_id: str
"""The id of the user."""
state: dict[str, Any] = Field(default_factory=dict)
"""The state of the session."""
events: list[Event] = Field(default_factory=list)
"""The events of the session, e.g. user input, model response, function
call/response, etc."""
last_update_time: float = 0.0
"""The last update time of the session."""
```

Look at this for the complete structure:

https://docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/projects.locations.reasoningEngines.sessions#Session

**Describe the solution you'd like**
The ADK Session object should support `display_name` and `labels` as additional optional properties.

**Describe alternatives you've considered**
Patching the ADK classes with additional fields, but it seems might break in certain places. Also, will not be validated/serialized by Pydantic.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。