Description
Is your feature request related to a problem? Please describe.
I’m building a chat-UI application using the adk api_server
List Sessions endpoint (GET /apps/{app_name}/users/{user_id}/sessions
). I need to display each session’s state or metadata (e.g. an auto-generated title) in a sidebar so users can quickly see past conversations. However, while the single-session endpoint (GET /apps/{app_name}/users/{user_id}/sessions/{session_id}
) correctly returns the state
field, the List Sessions API always returns state
as empty—making it impossible to show any session metadata in the list.
Describe the solution you’d like
Modify the List Sessions API to include the state
field for each session in its response, just as the single-session endpoint does. That way, any metadata stored in state
(such as a short summary or title generated by a small, fast model) will be available directly in the list response.
Describe alternatives you’ve considered
- Fetching every session individually using
GET /apps/{app_name}/users/{user_id}/sessions/{session_id}
, which adds extra HTTP requests and latency. - Storing session metadata in a separate external database and managing synchronization manually, which complicates the overall architecture.
Additional context
The current implementations explicitly clear or omit the state
field when listing sessions:
- Database Sessions:
adk-python/src/google/adk/sessions/database_session_service.py
Lines 437 to 457 in 3b5232c
- In-Memory Sessions:
adk-python/src/google/adk/sessions/in_memory_session_service.py
Lines 207 to 222 in 3b5232c
Including state
in the List Sessions response would enable native support for recording and displaying session metadata without extra workarounds.