All Products
Search
Document Center

:List agents

Last Updated:Jul 03, 2026

List all agents in the current account, with pagination and ordering.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Query parameters

Parameter

Type

Required

Default

Description

limit

integer

No

20

Number of results per page, between 1 and 100.

order

string

No

desc

Sort direction. Either "asc" or "desc".

after_id

string

No

-

Cursor. Return records after this ID.

before_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

data

array

Array of agent objects.

first_id

string

ID of the first record on the current page.

last_id

string

ID of the last record on the current page.

has_more

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

invalid_request_error

limit is out of range or a parameter is malformed.

401

authentication_error

PAT is invalid or has expired.

403

permission_error

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.