AgentDuplictae - 复制机器人
更新时间:2025-10-21
API访问域名
| 请求方式 | POST |
|---|---|
| base url | https://keyue.cloud.baidu.com |
| 后缀接口 | /open/v1/api/v2/task/create/agent_copy |
| Authentication | token为API Key |
说明
每个agent名称都是唯一的
请求参数
Header参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| Content-Type | string | 是 | 内容类型 | 固定值:application/json |
| token | string | 是 | API KEY | 机器人API KEY。 详细获取方式参考:准备工作 |
| uid | string | 是 | 用户ID | 详细获取方式参考:准备工作 |
| username | string | 是 | 用户名 | 详细获取方式参考:准备工作 |
Body参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| agentId | string | 是 | AI agent ID |
响应参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| time | integer | 是 | 时间 | 1717469424958 |
| data | object | 是 | 数据 | 数据对象,详见data子数据 |
| code | integer | 是 | 状态码 | 200 |
| msg | string | 是 | 状态信息 | OK |
data子数据
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| id | string | 是 | 任务ID | |
| agentId | string | 是 | AI Agent ID | |
| agentName | string | 是 | AI Agent 名称 | |
| agentType | integer | 是 | ||
| userId | string | 是 | uid | |
| userName | string | 是 | username | |
| created | string | 是 | ||
| updated | string | 是 | ||
| module | string | 是 | ||
| taskType | string | 是 | ||
| taskStatus | integer | 是 | ||
| taskResult | null | 否 | ||
| errorMsg | null | 否 | ||
| filePath | string | 是 | 文件路径 | |
| fileUrl | null | 否 | 文件URL | null |
| taskUrl | string | 是 | 任务URL | /api/v2/llm/document/import |
| deleted | integer | 是 | 是否删除 | 0 |
| reportFilePath | null | 否 | 报告文件路径 | null |
| reportFileUrl | null | 否 | 报告文件URL | null |
| taskExtend | string | 是 | 任务扩展 | |
| commonExtend | null | 否 | 通用扩展 | null |
| tenantId | string | 是 | 租户ID | 3156952326602753 |
| appName | null | 否 | 应用名称 | null |
| platform | string | 是 | 平台 | NGD |
| requestSource | string | 是 | 请求来源 | UNIT |
请求示例
Bash
1curl --location --request POST 'https://keyue.cloud.baidu.com/open/v1/api/v2/task/create/agent_copy' \
2--header 'token: 7f3894e7-01d8-4e2e-88d0-ef437ffd3f63' \
3--header 'uid: dd6283a283df42998bab14607e23f38d' \
4--header 'username: xxxxxxxx' \
5--header 'Content-Type: application/json' \
6--data '{"agentId":"c24ce952-8355-457e-a997-51995167c0ae"}'
响应示例
1{
2 "time": 1723099087330,
3 "data": {
4 "id": "84646c8f-24f7-43ab-b0ca-c64f35981804",
5 "agentId": "19e6d697-0e48-4ea8-9c75-e809113fa10b",
6 "agentName": "v(导入luukR)",
7 "agentType": 1,
8 "userId": "cf792c9e41d44eabb44d667edc71529e",
9 "userName": "ldd2024",
10 "created": "2024-08-08 14:38:07",
11 "updated": "2024-08-08 14:38:07",
12 "module": "agent",
13 "taskType": "copy",
14 "taskStatus": 0,
15 "taskResult": null,
16 "errorMsg": null,
17 "filePath": null,
18 "fileUrl": null,
19 "taskUrl": "/api/v2/agents/copy",
20 "deleted": 0,
21 "reportFilePath": null,
22 "reportFileUrl": null,
23 "taskExtend": null,
24 "commonExtend": null,
25 "tenantId": "34398019464000000",
26 "appName": null,
27 "platform": "NGD",
28 "requestSource": "UNIT"
29 },
30 "code": 200,
31 "msg": "OK"
32}
1每个agent名称都是唯一的
2
3{
4 "msg": "机器人名称重复",
5 "tip": "",
6 "code": 4001001,
7 "requestId": "a289b124a6b84c4e84264bed06c9c149"
8}
