CreateCustomAgent
Create a custom agent in your personal space or a workspace.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:CreateCustomAgent |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
No |
The ID of the workspace. |
56kv1pvl9uvt9**********bb |
| Name |
string |
No |
The name of the custom agent. |
Agent测试名称 |
| Description |
string |
No |
The description of the custom agent. |
Agent测试描述 |
| DataJson |
string |
No |
The data range, specified as a JSON string.
File type: Use the following parameters.
Database type: Use the following parameters.
|
{ "tableFlag" : true, "scope" : "personal", "personal" : { "DataSourceType" : "remote_data_center", "FileId" : "f-5qlrwaw10********s3gpw1z", "Database" : "测试表格******.xlsx", "Tables" : [ "Sheet1" ], "TableIds" : [ "******" ], "RegionId" : "cn-hangzhou" } } |
| Instruction |
string |
No |
The instruction for the custom agent.
|
核心指标定义: 1、GMV(成交总额)指订单金额总和,含已支付及未支付成功订单; 2、订单量为每日有效下单笔数; 3、UV(独立访客)指访问网站或APP的去重用户数; 4、转化率=支付订单数 / UV,反映流量转化效率; |
| Knowledge |
string |
No |
The knowledge for the custom agent.
|
核心指标定义: 1、GMV(成交总额)指订单金额总和,含已支付及未支付成功订单; 2、订单量为每日有效下单笔数; 3、UV(独立访客)指访问网站或APP的去重用户数; 4、转化率=支付订单数 / UV,反映流量转化效率; |
| KnowledgeConfigList |
array<object> |
No |
A list of external knowledge bases. |
|
|
object |
No |
The structure of an external knowledge base. |
||
| AccessType |
string |
No |
The access type.
Valid values:
|
mcp |
| McpServerId |
string |
No |
The ID of the MCP server. |
nhdpt9adf6ac**********ca |
| KbUuid |
string |
No |
||
| ExecutionConfig |
object |
No |
The execution configuration. |
|
| SkipPlan |
boolean |
No |
Specifies whether to skip the plan confirmation step. |
true |
| SkipSqlConfirm |
boolean |
No |
Specifies whether to skip all SQL confirmation steps. |
true |
| SkipWebReportConfirm |
boolean |
No |
Specifies whether to skip the web report confirmation step. |
true |
| SkipAskHuman |
boolean |
No |
Specifies whether to skip asking the user for input during execution. |
true |
| ScheduleTaskConfig |
object |
No |
The configuration for the scheduled task. |
|
| RelatedSessionId |
string |
No |
The ID of a previous session to use for reference. |
4m24*****mg7j2v |
| CronExpression |
string |
No |
The cron expression for the scheduled task. |
0 0 0 ? * 1-7 |
| Query |
string |
No |
The query for the scheduled task. |
分析一下这份数据,给出简报 |
| TextReportConfig |
string |
No |
The formatting requirements for the text report. |
文字报告要求所有数字不使用阿拉伯数字,全部转为中文数字 |
| WebReportConfig |
string |
No |
The formatting requirements for the web report. |
网页报告要求所有数字不使用阿拉伯数字,全部转为中文数字 |
| DMSUnit |
string |
No |
The ID of the DMS unit. |
cn-hangzhou |
| CallbackConfig |
object |
No |
||
| Type |
string |
No |
||
| ToolId |
string |
No |
||
| CallbackPrompt |
string |
No |
||
| CallbackArgs |
string |
No |
||
| CallbackTime |
integer |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
67E910F2-4B62-5B0C-ACA3-7547695C**** |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrorCode |
string |
The error code. |
success |
| ErrorMessage |
string |
The error message returned if the request fails. |
Specified parameter Tid is not valid. |
| Data |
object |
The response data. |
|
| CustomAgentId |
string |
The custom agent ID. |
ca-4y3ca4khkcu**********ysf |
| Name |
string |
The name of the custom agent. |
Agent测试名称 |
| Description |
string |
The description of the custom agent. |
Agent测试描述 |
| DataJson |
string |
The specified data scope, in a JSON string format. |
{ "tableFlag" : true, "scope" : "personal", "personal" : { "DataSourceType" : "remote_data_center", "FileId" : "f-5qlrwaw10********s3gpw1z", "Database" : "测试表格******.xlsx", "Tables" : [ "Sheet1" ], "TableIds" : [ "******" ], "RegionId" : "cn-hangzhou" } } |
| Instruction |
string |
The instruction for the agent. |
分析框架: 1、需按日、周、月维度监控核心指标(GMV、订单量、UV、转化率),分析趋势变化及同比/环比波动; 2、划分新老客、渠道、地域进行拆解,识别增长来源与短板; 3、结合用户行为路径(浏览→加购→支付)开展漏斗分析,定位流失环节; |
| Knowledge |
string |
The knowledge for the agent. |
核心指标定义: 1、GMV(成交总额)指订单金额总和,含已支付及未支付成功订单; 2、订单量为每日有效下单笔数; 3、UV(独立访客)指访问网站或APP的去重用户数; 4、转化率=支付订单数 / UV,反映流量转化效率; |
| Status |
string |
The status of the custom agent. Valid values:
|
NEW |
| ReleaseTime |
string |
The release time. |
2025-12-11T14:04:32.000+00:00 |
| OfflineTime |
string |
The offline time. |
2025-12-11T14:04:32.000+00:00 |
| Modifier |
string |
The ID of the user who last modified the agent. |
20372822******** |
| WorkspaceId |
string |
The workspace ID. |
20923*****7291 |
| Region |
string |
The region. |
cn-hangzhou |
| AliyunUid |
string |
The Alibaba Cloud account ID. |
20372822******** |
| AliyunParentUid |
string |
The primary Alibaba Cloud account ID. |
16738266******** |
| DmsUnit |
string |
The current DMS unit. |
cn-hangzhou |
| GmtCreated |
string |
The creation time. |
2025-12-11T14:04:32.000+00:00 |
| GmtModified |
string |
The modification time. |
2025-12-11T14:04:32.000+00:00 |
| KnowledgeConfigList |
array<object> |
A list of external knowledge bases. |
|
|
object |
The structure of the external knowledge base. |
||
| AccessType |
string |
The access method.
Valid values:
|
mcp |
| McpServerId |
string |
The ID of the MCP server. |
nhdpt9adf6ac**********ca |
| KbUuid |
string |
||
| ExecutionConfig |
object |
The execution configuration. |
|
| SkipPlan |
boolean |
Indicates whether to skip the plan confirmation step. |
true |
| SkipSqlConfirm |
boolean |
Indicates whether to skip all SQL confirmations. |
true |
| SkipWebReportConfirm |
boolean |
Indicates whether to skip the web report generation confirmation. |
true |
| SkipAskHuman |
boolean |
Indicates whether to prevent the agent from asking the user for clarification during execution. |
true |
| TextReportConfig |
string |
The format of the text report. |
文字报告要求所有数字不使用阿拉伯数字,全部转为中文数字 |
| WebReportConfig |
string |
The format of the web report. |
网页报告要求所有数字不使用阿拉伯数字,全部转为中文数字 |
| CreatorUserName |
string |
The username of the creator. |
HaoY***** |
| ModifierUserName |
string |
The username of the user who last modified the agent. |
HaoY***** |
| DMSUnit |
string |
The current DMS unit. |
cn-hangzhou |
| IsScheduleTask |
boolean |
Indicates whether a scheduled task is configured for the agent. |
false |
| NextRuntime |
integer |
The next run time of the scheduled task, formatted as a UNIX timestamp.
|
1767715200 |
| ScheduleTaskConfig |
object |
The configuration of the scheduled task. |
|
| RelatedSessionId |
string |
The ID of a previous session to be used as a template for the scheduled task. |
4m24*****mg7j2v |
| CronExpression |
string |
The cron expression for the scheduled task. |
0 0 0 ? * 1-7 |
| Query |
string |
The query for the scheduled task. |
分析一下这份数据,给出简报 |
| CallbackConfig |
object |
||
| Type |
string |
||
| ToolId |
string |
||
| CallbackPrompt |
string |
||
| CallbackArgs |
string |
||
| CallbackTime |
integer |
||
| RelatedSessionId |
string |
Examples
Success response
JSON format
{
"RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
"Success": true,
"ErrorCode": "success",
"ErrorMessage": "Specified parameter Tid is not valid.",
"Data": {
"CustomAgentId": "ca-4y3ca4khkcu**********ysf",
"Name": "Agent测试名称",
"Description": "Agent测试描述",
"DataJson": "{\n \"tableFlag\" : true,\n \"scope\" : \"personal\",\n \"personal\" : {\n \"DataSourceType\" : \"remote_data_center\",\n \"FileId\" : \"f-5qlrwaw10********s3gpw1z\",\n \"Database\" : \"测试表格******.xlsx\",\n \"Tables\" : [ \"Sheet1\" ],\n \"TableIds\" : [ \"******\" ],\n \"RegionId\" : \"cn-hangzhou\"\n }\n}",
"Instruction": "分析框架:\n1、需按日、周、月维度监控核心指标(GMV、订单量、UV、转化率),分析趋势变化及同比/环比波动;\n2、划分新老客、渠道、地域进行拆解,识别增长来源与短板;\n3、结合用户行为路径(浏览→加购→支付)开展漏斗分析,定位流失环节;",
"Knowledge": "核心指标定义:\n1、GMV(成交总额)指订单金额总和,含已支付及未支付成功订单;\n2、订单量为每日有效下单笔数;\n3、UV(独立访客)指访问网站或APP的去重用户数;\n4、转化率=支付订单数 / UV,反映流量转化效率;",
"Status": "NEW",
"ReleaseTime": "2025-12-11T14:04:32.000+00:00",
"OfflineTime": "2025-12-11T14:04:32.000+00:00",
"Modifier": "20372822********",
"WorkspaceId": "20923*****7291",
"Region": "cn-hangzhou",
"AliyunUid": "20372822********",
"AliyunParentUid": "16738266********",
"DmsUnit": "cn-hangzhou",
"GmtCreated": "2025-12-11T14:04:32.000+00:00",
"GmtModified": "2025-12-11T14:04:32.000+00:00",
"KnowledgeConfigList": [
{
"AccessType": "mcp",
"McpServerId": "nhdpt9adf6ac**********ca",
"KbUuid": ""
}
],
"ExecutionConfig": {
"SkipPlan": true,
"SkipSqlConfirm": true,
"SkipWebReportConfirm": true,
"SkipAskHuman": true
},
"TextReportConfig": "文字报告要求所有数字不使用阿拉伯数字,全部转为中文数字",
"WebReportConfig": "网页报告要求所有数字不使用阿拉伯数字,全部转为中文数字",
"CreatorUserName": "HaoY*****",
"ModifierUserName": "HaoY*****",
"DMSUnit": "cn-hangzhou",
"IsScheduleTask": false,
"NextRuntime": 1767715200,
"ScheduleTaskConfig": {
"RelatedSessionId": "4m24*****mg7j2v",
"CronExpression": "0 0 0 ? * 1-7",
"Query": "分析一下这份数据,给出简报"
},
"CallbackConfig": {
"Type": "",
"ToolId": "",
"CallbackPrompt": "",
"CallbackArgs": "",
"CallbackTime": 0
},
"RelatedSessionId": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.