Skip to content

Handling next page token in VertexAISessionService list sessions response #2860

@ankursharmas

Description

@ankursharmas

Discussed in #2838

Originally posted by mdailey September 3, 2025
Hello everyone,

I am working on an ADK agent that makes use of the VertexAISessionService. In adk-python, this service is represented by class VertexAiSessionService, which has a method list_sessions that retrieves a list of sessions from the Agent Engine reasoning engine, filtered by user ID.

The documentation for the reasoning engine list sessions API endpoint says that the session list may contain a nextPageToken if the list of sessions is long.

However, the list_sessions method of the adk-python wrapper for this endpoint seems to ignore the possibility of a long paginated session list.

My question is whether there is a valid reason for this, such as some inside knowledge that Agent Engine will never paginate the resulting session list? If not, this could be a problem as we move our agent into production, so I might contribute a PR.

Matt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions