AgentList - 查看机器人列表
更新时间:2025-10-21
API访问域名
| 请求方式 | GET |
|---|---|
| base url | https://keyue.cloud.baidu.com |
| 后缀接口 | /open/v1/api/v3/agents |
| Authentication | token为API Key |
说明
无
请求参数
Header参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| Content-Type | string | 是 | 内容类型 | 固定值:application/json |
| token | string | 是 | API KEY | 机器人API KEY。 详细获取方式参考:准备工作 |
| uid | string | 是 | 用户ID | 详细获取方式参考:准备工作 |
| username | string | 是 | 用户名 | 详细获取方式参考:准备工作 |
Parameter参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| keyword | string | 否 | AI agent的名称 | 可以根据这个字段模糊查询agent |
| status | string | 否 | agent上线状态,0:未上线,1:发布中,2:已上线 | 可以根据这个字段筛选查询agent |
| pn | integer | 否 | 页数 | 可以根据这个字段分页查询agent,默认是1 |
| ps | integer | 否 | 每页查询数据条数 | 可以根据这个字段分页查询agent,默认是20 |
| orderBy | string | 否 | 排序规则 | 默认按照agent的创建时间排序 |
| order | string | 否 | 排序顺序 | desc降序,asc升序。默认降序 |
| agentScene | integer | 否 | agent场景,0:无场景,1:售前,2:售中,3:售后,4:营销,5:客服 | 可以根据这个字段筛选查询agent |
| type | integer | 否 | agent类型 1:普通agent,2:ai agent | 可以根据这个字段筛选查询agent |
Body参数
无
响应参数
| 名称 | 类型 | 必填 | 中文名 | 说明 |
|---|---|---|---|---|
| time | integer | 是 | 时间 | 1722239381781 |
| data | object | 是 | 数据 | 数据对象,详见data子数据 |
| code | integer | 是 | 状态码 | 200 |
| msg | string | 是 | 状态信息 | OK |
data子数据
| 名称 | 类型 | 必填 | 中文名 | 说明 |
|---|---|---|---|---|
| total | integer | 是 | 列表agent总数 | 2 |
| pn | integer | 是 | 页数 | 1 |
| ps | integer | 是 | 每页包含agent数量 | 20 |
| list | object | 是 | 列表数据对象 | 详见list子数据 |
list子数据
| 名称 | 类型 | 必填 | 中文名 | 说明 |
|---|---|---|---|---|
| id | string | 是 | agent ID | 6536b73c-97b4-4b7b-8d14-1cb9d035354d |
| agentName | string | 是 | agent名称 | QAZgood |
| quickSceneType | integer | 是 | 快捷场景类型,1表示商品导购,2表示线索收集 | null |
| description | string | 是 | agent简介 | test——add |
| avatarUrl | string | 是 | agent图标 | null |
| tenantId | string | 是 | 租户id | 34363705908000000 |
| updated | string | 是 | 更新时间 | 2024-07-29 15:49:41 |
| created | string | 是 | 创建时间 | 2024-07-29 15:49:41 |
| createdUserId | string | 是 | 创建用户uid | dd6283a283df42998bab14607e23f38d |
| createdUsername | string | 是 | 创建用户名 | xxxxxxxx |
| lastEditId | string | 是 | 最后修改人uid | null |
| lastEditUsername | string | 是 | 最后修改人用户名 | null |
| published | string | 是 | 发布时间 | 1970-01-01 00:00:00 |
| status | string | 是 | agent上线状态,0:未上线,1:发布中,2:已上线 | null |
| agentStatus | string | 是 | agent编辑状态,0.可编辑,1.不可编辑 | null |
| agentDelete | string | 是 | agent删除状态,0.可用, 1.删除 | null |
| dataSetId | string | 是 | 数据集,每个agent对应一个dateSetSId | "1" |
| token | string | 是 | 开放接口:API Key | null |
| type | integer | 是 | agent类型 1:普通agent,2:ai agent | 1 |
| agentLabel | string | 是 | agent标签 | null |
| agentScene | integer | 是 | agent场景,0:无场景,1:售前,2:售中,3:售后,4:营销,5:客服 | 0 |
| multiQuery | string | 是 | 租户使用版本是否为标准版 | null |
| refresh | string | 是 | 判断是否有正在运行的agent任务,如果有则为true,否则为false |
请求示例
Bash
1curl --location 'https://keyue.cloud.baidu.com/open/v1/api/v3/agents?keyword=' \
2--header 'token: 7f3894e7-01d8-4e2e-88d0-ef437ffd3f63' \
3--header 'uid: dd6283a283df42998bab14607e23f38d' \
4--header 'username: xxxxxxxx' \
5--header 'Content-Type: application/json'
响应示例
1{
2 "time": 1722249505976,
3 "data": {
4 "total": 2,
5 "pn": 1,
6 "ps": 20,
7 "list": [
8 {
9 "id": "6536b73c-97b4-4b7b-8d14-1cb9d035354d",
10 "agentName": "QAZgood",
11 "quickSceneType": 0,
12 "description": "test——add",
13 "avatarUrl": "",
14 "tenantId": "34363705908000000",
15 "updated": "2024-07-29 15:49:41",
16 "created": "2024-07-29 15:49:41",
17 "createdUserId": "dd6283a283df42998bab14607e23f38d",
18 "createdUsername": "xxxxxxxx",
19 "lastEditId": null,
20 "lastEditUsername": null,
21 "published": "1970-01-01 00:00:00",
22 "status": 0,
23 "agentStatus": 0,
24 "agentDelete": 0,
25 "dataSetId": "1",
26 "token": null,
27 "type": 1,
28 "agentLabel": "",
29 "agentScene": 0,
30 "multiQuery": false
31 },
32 {
33 "id": "ae8b75e0-2e75-446a-b291-c6995c94c9e3",
34 "agentName": "Agent示例-旅游助手",
35 "quickSceneType": 0,
36 "description": "",
37 "avatarUrl": "",
38 "tenantId": "34363705908000000",
39 "updated": "2024-06-27 15:32:39",
40 "created": "2024-06-12 17:37:23",
41 "createdUserId": "system",
42 "createdUsername": "system",
43 "lastEditId": "system",
44 "lastEditUsername": "system",
45 "published": "1970-01-01 00:00:00",
46 "status": 0,
47 "agentStatus": 0,
48 "agentDelete": 0,
49 "dataSetId": "1",
50 "token": null,
51 "type": 1,
52 "agentLabel": "",
53 "agentScene": 0,
54 "multiQuery": false
55 }
56 ],
57 "refresh": false
58 },
59 "code": 200,
60 "msg": "OK"
61}
1
