Method: projects.locations.collections.engines.assistants.agents.list

Lists all Agents under an Assistant which were created by the caller.

HTTP request

GET https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*}/agents

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

Query parameters

Parameters
pageSize

integer

Optional. Maximum number of Agents to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.

pageToken

string

Optional. A page token ListAgentsResponse.next_page_token, received from a previous AgentService.ListAgents call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to agents.list must match the call that provided the page token.

orderBy

string

Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:

  • updateTime
  • isPinned

Example:

  • "updateTime desc"
  • "isPinned desc,updateTime desc": list agents by isPinned first, then by updateTime.
filter

string

Optional. Filters the Agents list. Supported fields:

  • displayName: display name of the agent. Supports =, :.
  • id: ID of the agent. Supports =.
  • state: state of the agent. Supports =.
  • createTime: timestamp when the agent was created. Supports =, >, <, >=, <=.
  • updateTime: timestamp when the agent was last updated. Supports =, >, <, >=, <=.

Examples:

  • displayName = "My Agent"
  • createTime > "2023-01-01T00:00:00Z"

Request body

The request body must be empty.

Response body

Response message for the AgentService.ListAgents method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "agents": [
    {
      object (Agent)
    }
  ],
  "nextPageToken": string
}
Fields
agents[]

object (Agent)

The agents visible to the caller under the parent Assistant.

nextPageToken

string

A token that can be sent as ListAgentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • discoveryengine.agents.list

For more information, see the IAM documentation.