List agents in the current workspace with pagination.
Endpoint
GET /agents
Returns 200 and a list envelope. data is an array of Agent objects.
Request parameters
| Field | Required | Type | Description |
|---|---|---|---|
limit | No | integer | Number of items per page, default 20; recommended range 1..100 |
order | No | string | Sort direction, asc or desc, default desc |
after | No | string | The last_id from the previous page; the cursor item is excluded |
before | No | string | The first_id from the previous page, for reverse pagination; cannot be used with after; the cursor must be a valid agent in the current workspace |
after and before returns 400. For the first page, omit after. For later pages, pass the last_id from the previous response. For reverse pagination, pass the first_id as before. has_more indicates whether the current scan direction has more results. The list is sorted lexicographically by agent ID, is not guaranteed to sort stably by created_at, and does not provide snapshot isolation under concurrent writes.
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
object | string | List object type, fixed as list |
data | array | Agent objects on this page; [] when empty |
first_id | string / null | ID of the first item; null for an empty page |
last_id | string / null | ID of the last item; null for an empty page |
has_more | boolean | Whether the current scan direction has another page |
Agent fields
| Field | Type | Description |
|---|---|---|
id | string | Agent ID. Treat it as an opaque string |
object | string | Agent object type, fixed as agent |
created_at | integer | Creation time as a Unix timestamp in seconds |
updated_at | integer | Last modification time as a Unix timestamp in seconds; not a version number |
name | string / null | Display name |
metadata | object / null | Metadata, stored string key-value pairs |
model | string | Stored model ID |
reasoning | object / null | Reasoning configuration. Either subfield can be null. |
reasoning.effort | string / null | Reasoning effort: none, minimal, low, medium, high, xhigh, max |
reasoning.summary | string / null | Reasoning summary: concise, detailed, auto |
text | object / null | Text output configuration. |
text.format | object | Output format. |
text.format.type | string / null | Output format type, fixed as text |
text.verbosity | string / null | Output verbosity, low, medium, high |
instructions | string / null | Stored custom instructions |
tools | array / null | Stored tool configuration; each branch returns only its own fields |
tools[].function | object | Function tool configuration; returns name, description, and parameters |
tools[].mcp | object | MCP tool configuration; returns server_label, transport, allowed_tools, required, and connection_origin; transport is http or stdio |
tools[].web_search | object | Web search tool configuration; returns type and the saved configuration |
multi_agent | object / null | Subagent configuration. |
multi_agent.enabled | boolean | Whether subagent tools are enabled |
multi_agent.max_concurrent_subagents | integer / null | Maximum number of concurrent subagents; no default is applied |
null.
Error codes
Business errors return an error object with type, code, message, and param. Common errors:
| HTTP status | Error type / code | Solution |
|---|---|---|
400 | invalid_request_error / invalid_request_error | Fix limit and order as described in the query parameters |
401 | authentication_error / invalid_api_key | Send a valid Authorization: Bearer $DASHSCOPE_API_KEY header |
404 | not_found_error / not_found_error | Use the last_id returned by the previous page as after |
500 | server_error / server_error | Retry later. If it keeps failing, submit a ticket with x-request-id |