Skip to main content

List Agents

Paginated query of Agents under the current tenant

POST
/api/v1/indices/rag/app/list
# Use the returned agent_id for Wiki retrieval, not the knowledge base ID
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/app/list" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_scene": "search",
    "search_type": "wiki",
    "pipeline_id": "pipeline-xxxxxx",
    "page_number": 1,
    "page_size": 20
  }'
{
  "request_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "status_code": 200,
  "code": "Success",
  "message": "",
  "status": "SUCCESS",
  "success": true,
  "data": {
    "page_number": 1,
    "page_size": 20,
    "total_count": 2,
    "rows": [
      {
        "agent_id": "aid-8f3a1b2c4d5e6f70",
        "agent_name": "Customer Service Q&A Assistant",
        "agent_scene": "chat",
        "agent_status": "deployed",
        "agent_version": "2",
        "create_time": "2026-07-10T14:30:00",
        "modify_time": "2026-07-15T09:15:00",
        "pipeline_list": [
          {
            "pipeline_id": "pipeline-xxxxxx",
            "pipeline_name": "Product Documentation Knowledge Base"
          }
        ]
      },
      {
        "agent_id": "aid-1a2b3c4d5e6f7a8b",
        "agent_name": "Technical Documentation Search Assistant",
        "agent_scene": "chat",
        "agent_status": "draft",
        "agent_version": "beta",
        "create_time": "2026-07-12T10:00:00",
        "modify_time": "2026-07-12T10:00:00",
        "pipeline_list": [
          {
            "pipeline_id": "pipeline-yyyyyy",
            "pipeline_name": "Technical Documentation Knowledge Base"
          },
          {
            "pipeline_id": "pipeline-zzzzzz",
            "pipeline_name": "FAQ Knowledge Base"
          }
        ]
      }
    ]
  }
}
Paginated query of Agents under the current tenant, supports filtering by scene, status, name, Knowledge Base ID, and retrieval type.
When agent_scene is search, use search_type to filter by retrieval type: chunk (vector retrieval) or wiki (Wiki retrieval). Omit search_type for no type filter. Wiki retrieval services are created automatically when a knowledge base enables Wiki. Use agent_scene=search + search_type=wiki (optionally with pipeline_id) to obtain their agent_id for Knowledge Search. This is a Wiki retrieval service ID, not a knowledge base ID or a regular chunk retrieval service ID.Disabling Wiki does not delete the existing Wiki retrieval service; the original agent_id becomes usable again after re-enabling Wiki. This does not restore old pages or imply immediate completion of data cleanup.

Error codes

This endpoint may return the following error codes; for detailed triggers and message, see the error reference.
codestatus_codeTrigger
InvalidParameter400agent_scene missing or invalid; search_type invalid

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
enum<string>
required

Agent scene: chat (knowledge Q&A) or search (knowledge retrieval).

chat,search
string

Filter by status: draft / deployed (includes edited) / deleted.

string

Fuzzy search by name.

string

Exact match by Agent ID.

string

Filter by associated knowledge base Pipeline ID.

integer
default1

Page number, default 1.

integer
default10

Number of items per page, default 10, maximum 100.

x <= 100
enum<string>

Filter by retrieval type; meaningful only when agent_scene is search: chunk (vector retrieval) or wiki (Wiki retrieval). Omitted means no type filter. Wiki retrieval services are created automatically when a knowledge base enables Wiki; use search_type=wiki to find them and obtain their agent_id.

chunk,wiki

Response

200-application/json
string

Unique request identifier. Provide this ID when troubleshooting issues.

integer

Business status code in the response body, not the transport-layer HTTP status. See the error reference.

string

Response code. Success on success.

string

Informational message.

enum<string>

Request status: SUCCESS or ERROR.

SUCCESS,ERROR
boolean

Whether the request succeeded.

object