AgentService
Agents
List agents
Lists all agents in the workspace
get/v1/workspaces/{workspaceId}/agents
Path parameters
workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q
Workspace ID.
Query parameters
limitinteger
Maximum number of results to return
cursorstring
Pagination cursor from previous response
prefixstring
Filter expression (query param: prefix)
querystring
Free-form search query
state'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED' enum
Filter by agent lifecycle state
variationSelectionMode'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED' enum
Filter by variation selection mode
labelsstring
Filters by metadata labels. Comma-separated key=value pairs, e.g. "env=prod,team=ai". A resource matches only if every pair matches exactly (AND semantics).
sortOrderstring
Sort order for results (asc or desc by creation time)
includeInfoboolean
When true, the info field on each returned agent is populated. Requests with this flag count more against your rate limit.
Response
OK
Example response
{
"items": [
{
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
},
"info": {
"createdBy": {
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
}
}
}
}
]
}