List all agents in the current account, with pagination and ordering.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
Query parameters
|
Parameter |
Type |
Required |
Default |
Description |
|
|
integer |
No |
20 |
Number of results per page, between 1 and 100. |
|
|
string |
No |
|
Sort direction. Either |
|
|
string |
No |
- |
Cursor. Return records after this ID. |
|
|
string |
No |
- |
Cursor. Return records before this ID. |
See Pagination for cursor semantics.
Example request
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/agents?limit=2&order=desc" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"data": [
{
"type": "agent",
"id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"name": "doc-test-agent",
"description": "",
"model": "ultimate",
"system": "You are a documentation test assistant.",
"instructions": "You are a documentation test assistant.",
"tools": [],
"mcp_servers": [],
"default_environment": "",
"version": 1,
"archived": false,
"archived_at": null,
"created_at": "2026-05-18T15:26:39.61669Z",
"updated_at": "2026-05-18T15:26:39.61669Z"
},
{
"type": "agent",
"id": "agent_019eYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
"name": "test-agent-e2e",
"description": "Agent used for E2E testing.",
"model": "ultimate",
"system": "You are a test assistant.",
"instructions": "You are a test assistant.",
"tools": [],
"mcp_servers": [],
"default_environment": "",
"version": 2,
"archived": false,
"archived_at": null,
"created_at": "2026-05-18T03:04:33.952256Z",
"updated_at": "2026-05-18T03:05:28.023697Z"
}
],
"first_id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"last_id": "agent_019eYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
"has_more": true
}
Response fields
|
Field |
Type |
Description |
|
|
array |
Array of agent objects. |
|
|
string |
ID of the first record on the current page. |
|
|
string |
ID of the last record on the current page. |
|
|
boolean |
Whether additional records are available. |
Pagination
Forward pagination (next page):
curl "https://api.qoder.com.cn/api/v1/cloud/agents?limit=20&after_id=agent_019eYYYY..." \
-H "Authorization: Bearer $QODER_PAT"
Backward pagination (previous page):
curl "https://api.qoder.com.cn/api/v1/cloud/agents?limit=20&before_id=agent_019eXXXX..." \
-H "Authorization: Bearer $QODER_PAT"
Errors
|
HTTP |
Type |
Trigger |
|
400 |
|
|
|
401 |
|
PAT is invalid or has expired. |
|
403 |
|
Caller is not authorized for this operation. |
See Errors for the full error envelope.
Notes
-
Results are ordered by creation time in descending order by default (newest first).
-
Archived agents do not appear in the default list.
-
Cursor-based pagination is used; offset pagination is not supported.