List Agents

Updated at:

Lists agents in the current workspace with pagination, sorted by created_at in descending order. Archived items are excluded by default; pass include_archived=true to include them.

Prerequisites

Endpoint and authentication configured. For details, see Overview and authentication.

Endpoint

GET /agents

Query parameters

ParameterRequiredTypeDescription
limitNointNumber of items per page. Default: 20, maximum: 100
pageNostringPagination cursor. Omit for the first request; pass the next_page value from the previous response to fetch the next page
include_archivedNoboolWhether to include archived agents. Default: false

Request example

curl "$AGENTSTUDIO_URL/agents?limit=20&include_archived=true" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
for agent in client.agents.list(limit=20, include_archived=True):
    print(agent.id, agent.name, agent.model['id'])
CursorPage<Agent> page = client.agents().list(AgentListParam.builder()
    .limit(20).includeArchived(true).build());
for (Agent a : page.getData()) System.out.println(a.getId() + " " + a.getName());

Response

The response contains data (an array of Agent objects) and next_page (cursor for the next page; null when no more data). Each Agent object has the same fields as the Create Agent response. Field descriptions:

Agent object fields

FieldTypeDescription
idstringAgent ID, format: agent_&lt;ULID&gt;
typestringAlways agent
versionintCurrent version number, auto-incremented on each update
name / description / systemstringAgent name, description, and system prompt
model / tools / mcp_servers / skills / multiagent / metadataobject / arrayModel, toolkits, MCP references, skills, multi-agent collaboration, and business metadata
archived_atstring | nullArchive timestamp; null if not archived
created_at / updated_atstringCreation / last update time, ISO 8601
workspace_idstringWorkspace ID