获取DataAgent会话描述信息
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
dms:DescribeDataAgentSession |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DMSUnit |
string |
否 |
当前 DMS 单元 |
cn-hangzhou |
| SessionId |
string |
否 |
DataAgent 会话 ID,可通过 CreateDataAgentSession 获取。 |
c61n7gm******rj |
| WorkspaceId |
string |
否 |
工作空间 ID。 |
12**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| Data |
object |
返回的结构体 |
|
| AgentId |
string |
当前 Agent Id |
cu0cs*******mf |
| AgentStatus |
string |
当前 Agent 状态 |
RUNNING |
| Artifacts |
array<object> |
会话产出的产物列表。当前只包含报告。 |
|
|
object |
|||
| Description |
string |
产物的简要描述,可能为空。 |
a simple report |
| FinishTime |
string |
后端完成该产物任务的时间。UNIX 时间戳,精确到秒 |
1778743587 |
| Id |
string |
产物 ID,全局唯一。如果是通过 SendChatMessage 指定 MessageType 为 REPORT 产出的报告,则产物 ID 会和 SendChatMessage 接口返回值中的 MessageId 保持一致。 |
bab******33e1 |
| Name |
string |
产物名称,通常为工程拼接的字符串,会和 LIstFileUpload 接口的 name 字段对齐,可以通过该字段关联查询到产物文件的下载链接。 |
report_****_2026**** |
| ReceiveTime |
string |
后端收到该产物请求的时间,UNIX 时间戳,精确到秒 |
1778743587 |
| StartTime |
string |
后端实际开始运行该产物任务的时间。UNIX 时间戳,精确到秒 |
1778743587 |
| Status |
string |
产物状态。当前可能为如下枚举之一:
|
PENDING |
| Type |
string |
产物类型。当前可能为:[TextReport, WebReport] |
WebReport |
| Capabilities |
array<object> |
会话挂载的能力(知识库、技能等) |
|
|
object |
会话挂载的能力 |
||
| Id |
string |
挂载的能力 ID
|
kb-HZ-s3df*******ld08d |
| Type |
string |
类型
|
dms_kb |
| ChatHistoryLocations |
array<object> |
会话回放历史 |
|
|
object |
会话回放的元素 |
||
| Key |
string |
会话回放历史的 Key |
testKey1 |
| Url |
string |
会话回放历史的 OSS 下载链接 |
**** |
| CreateTime |
integer |
会话创建时间 |
1731645908000 |
| DataSources |
array<object> |
当前会话用到的数据源列表。 |
|
|
object |
|||
| Category |
string |
数据源来源。当前包含如下枚举
|
CHAT |
| Detail |
string |
数据源详情。 当 Category 是 CHAT 或者 CUSTOM_AGENT 的时候,Detail 的结构和 SendChatMessage 接口的 DataSources 中单个元素的结构是对齐的。 |
{} |
| FavoriteInWorkspace |
string |
是否在工作空间中被当前登录人收藏 |
true |
| File |
string |
文件 Id |
f-8*******01m |
| Messages |
array<object> |
会话历史对话消息列表 |
|
|
object |
会话历史对话消息 |
||
| Content |
string |
会话历史对话消息内容 |
帮我看看2022年英国各餐厅的销售情况 |
| Id |
string |
会话历史对话消息唯一 Id |
a5bb5ff643de4124afd4317f79417a81 |
| SendTime |
integer |
会话历史对话消息发送时间 |
1790650646000 |
| Status |
string |
会话历史对话消息状态 |
SENT |
| PreviewCustomAgent |
object |
智能开发会话预览的自定义 Agent |
|
| AliyunParentUid |
string |
阿里云主账号 ID |
16738266******** |
| AliyunUid |
string |
阿里云账户 ID |
20372822******** |
| CallbackConfig |
object |
回调功能配置项 |
|
| CallbackArgs |
string |
回调工具调用参数 |
{ "ID": "test" } |
| CallbackPrompt |
string |
回调工具调用参数生成 prompt |
send web report to 123456@163.com |
| CallbackTime |
integer |
回调工具调用时机 |
0 |
| ToolId |
string |
回调工具标志符 |
Mcp serverId (6te...g7a) |
| Type |
string |
回调工具类型 |
Mcp |
| CreatorUserName |
string |
创建者名称 |
HaoY*** |
| CustomAgentId |
string |
自定义 Agent Id。 |
ca-ozq551*******jphnqfu |
| DMSUnit |
string |
当前 DMS 单元 |
cn-hangzhou |
| DataJson |
string |
指定的数据范围,JSON 字符串格式 |
{ "tableFlag": true, "scope": "personal", "personal": { "DataSourceType": "remote_data_center", "FileId": "f-5qlrwaw10********s3gpw1z", "Database": "test-table******.xlsx", "Tables": [ "Sheet1" ], "TableIds": [ "******" ], "RegionId": "cn-hangzhou" } } |
| DefaultAgent |
integer |
是否为默认显示的 Agent |
0 |
| Description |
string |
自定义 Agent 描述 |
Description for the test agent. |
| DmsUnit |
string |
当前 DMS 单元 |
cn-hangzhou |
| ExecutionConfig |
object |
执行配置 |
|
| ClarificationTendency |
number |
Agent 为弄清需求而追问的倾向性,仅当 SkipAskHuman=false 并且 SkipPlan=false 时生效,取值范围:[0, 1] 以下是部分倾向值说明:
|
1.0 |
| ForbiddenAppendDataSource |
boolean |
是否禁止会话中追加数据源 |
true |
| SkipAskHuman |
boolean |
是否禁止过程中用户询问 |
true |
| SkipPlan |
boolean |
是否跳过计划确认步骤 |
true |
| SkipSqlConfirm |
boolean |
是否跳过所有 SQL 确认 |
true |
| SkipWebReportConfirm |
boolean |
是否跳过绘制网页报告确认 |
true |
| GmtCreated |
string |
创建时间 |
2025-12-11T14:04:32.000+00:00 |
| GmtModified |
string |
修改时间 |
2025-12-11T14:04:32.000+00:00 |
| Instruction |
string |
指示 |
Analytical framework: Monitor core metrics (GMV, order volume, UV, and conversion rate) on a daily, weekly, and monthly basis to analyze trends and identify year-over-year and month-over-month fluctuations. Segment by new vs. returning customers, channels, and regions to identify growth drivers and areas of weakness. Conduct funnel analysis based on user behavior paths (browse → add to cart → purchase) to pinpoint stages where user drop-off occurs. |
| IsScheduleTask |
boolean |
是否配置周期运行任务 |
true |
| Knowledge |
string |
知识 |
Core metric definitions: GMV (Gross Merchandise Volume) refers to the total sum of order amounts, including both paid and unpaid orders. Order volume refers to the number of valid orders placed per day. UV (Unique Visitors) refers to the deduplicated number of users who visit the website or app. Conversion rate = paid orders / UV, reflecting the efficiency of traffic conversion. |
| KnowledgeConfigList |
array<object> |
外部知识库 |
|
|
object |
外部知识库结构 |
||
| AccessType |
string |
接入类型。若不指定该参数,默认为 mcp。
|
mcp |
| KbUuid |
string |
知识库 ID |
kb-HZ-rtcdseb*****pmyt |
| McpServerId |
string |
MCP Server 的 Id |
7shre9b6x*******djz3q7jya |
| KnowledgeSemanticConfigList |
array<object> |
知识语义配置结构体 |
|
|
object |
知识语义配置列表 |
||
| DbId |
string |
DMS 数据库 ID |
69942325 |
| InstanceId |
string |
DMS 实例 ID |
2952387 |
| KnowledgeUuid |
string |
知识 Uuid |
7ca8f50d7823********02e87 |
| Type |
string |
知识语义类型
|
sql_template |
| Modifier |
string |
修改人 |
20372822******** |
| ModifierUserName |
string |
修改者名称 |
HaoY*** |
| Name |
string |
自定义 Agent 名称 |
Test agent name |
| NextRuntime |
integer |
周期任务下次运行时间 |
1767715200 |
| OfflineTime |
string |
下线时间 |
2025-12-11T14:04:32.000+00:00 |
| RecommendQuestionList |
array |
推荐问题列表
|
|
|
string |
推荐问题 |
Help me find some business insight from this data |
|
| Region |
string |
地域 |
cn-hangzhou |
| RelatedSessionId |
string |
参考历史会话 Id |
5xyz... |
| ReleaseTime |
string |
发布时间 |
2025-12-11T14:04:32.000+00:00 |
| ScheduleTaskConfig |
object |
周期任务配置 |
|
| CronExpression |
string |
周期运行表达式 |
0 0 0 ? * 1-7 |
| Query |
string |
周期运行的问题 |
Analyze the data and provide the report |
| RelatedSessionId |
string |
参考的会话 id |
4m24*****mg7j2v |
| Status |
string |
自定义 Agent 状态 |
RELEASE |
| TextReportConfig |
string |
文字报告格式 |
The text report requires that all numbers be written in Chinese numerals rather than Arabic numerals. |
| UserSpecifiedSkillList |
array |
用户指定的技能列表 |
|
|
string |
技能 ID |
ski-sldk8v******3owd |
|
| WebReportConfig |
string |
网页报告格式 |
The web report requires that all numbers be written in Chinese numerals rather than Arabic numerals. |
| WebReportTheme |
string |
网页报告主题:
|
default |
| WorkspaceId |
string |
工作空间 ID |
56kv1pvl9uvt9**********bb |
| RecallResults |
array<object> |
本次会话在知识库、记忆召回的结果 |
|
|
object |
|||
| Content |
string |
召回知识块内容 |
sky is blue |
| Score |
number |
此条数据的相似度分数,其分数算法和创建索引时指定的算法(l2/ip/cosine)相关。 |
0.65 |
| Type |
string |
召回知识类别 |
memory |
| Saved |
boolean |
是否被当前登录人收藏 |
true |
| SessionConfig |
object |
会话的配置项 |
|
| CustomAgentId |
string |
自定义 Agent Id |
ca-e*******ckd |
| CustomAgentStage |
string |
自定义 Agent 的使用阶段:
|
debug |
| EnableSearch |
boolean |
是否开启联网搜索。 |
True |
| EncryptKey |
string |
产物存放到 OSS(含内置和用户)的加密秘钥,通常在 CreateDataAgentSession 中指定 |
ay***1Te |
| EncryptType |
string |
产物存放到 OSS(含内置和用户)的加密类型 |
null |
| KbUuidList |
array |
本次会话的知识库 ID 列表 |
|
|
string |
单个知识库 ID |
asdf****zsdv |
|
| Language |
string |
语言
|
CHINESE |
| McpServerIds |
array |
会话配置中的 MCP 服务器 ID 列表 |
|
|
string |
会话配置中的 MCP 服务器 ID |
2q1tu90**********6uttu2nw |
|
| Mode |
string |
模式:
|
ANALYSIS |
| ReportPageWidth |
integer |
报告页面宽度 |
300mm |
| ReportWaterMark |
string |
报告水印 |
"" |
| UserOssBucket |
string |
用户 OSS Bucket 名称
|
user-oss-bucket |
| SessionId |
string |
Agent 会话 Id |
976*********p |
| SessionStatus |
string |
会话状态 |
RUNNING |
| Title |
string |
标题 |
分析一下这份文件,给出报告。 |
| UserId |
string |
会话拥有人 Id |
2096****** |
| ErrorCode |
string |
错误码。 |
success |
| ErrorMessage |
string |
调用失败时,返回的错误信息。 |
UnknownError |
| RequestId |
string |
Id of the request |
18****-*****-*******7A3122F |
| Success |
boolean |
返回值说明。
|
true |
示例
正常返回示例
JSON格式
{
"Data": {
"AgentId": "cu0cs*******mf",
"AgentStatus": "RUNNING",
"Artifacts": [
{
"Description": "a simple report",
"FinishTime": "1778743587",
"Id": "bab******33e1",
"Name": "report_****_2026****",
"ReceiveTime": "1778743587",
"StartTime": "1778743587",
"Status": "PENDING",
"Type": "WebReport"
}
],
"Capabilities": [
{
"Id": "kb-HZ-s3df*******ld08d",
"Type": "dms_kb"
}
],
"ChatHistoryLocations": [
{
"Key": "testKey1",
"Url": "****"
}
],
"CreateTime": 1731645908000,
"DataSources": [
{
"Category": "CHAT",
"Detail": "{}"
}
],
"FavoriteInWorkspace": "true",
"File": "f-8*******01m",
"Messages": [
{
"Content": "帮我看看2022年英国各餐厅的销售情况",
"Id": "a5bb5ff643de4124afd4317f79417a81",
"SendTime": 1790650646000,
"Status": "SENT"
}
],
"PreviewCustomAgent": {
"AliyunParentUid": "16738266********",
"AliyunUid": "20372822********",
"CallbackConfig": {
"CallbackArgs": "{\n \"ID\": \"test\"\n}",
"CallbackPrompt": "send web report to 123456@163.com",
"CallbackTime": 0,
"ToolId": "Mcp serverId (6te...g7a)",
"Type": "Mcp"
},
"CreatorUserName": "HaoY***",
"CustomAgentId": "ca-ozq551*******jphnqfu",
"DMSUnit": "cn-hangzhou",
"DataJson": "{\n \"tableFlag\": true,\n \"scope\": \"personal\",\n \"personal\": {\n \"DataSourceType\": \"remote_data_center\",\n \"FileId\": \"f-5qlrwaw10********s3gpw1z\",\n \"Database\": \"test-table******.xlsx\",\n \"Tables\": [\n \"Sheet1\"\n ],\n \"TableIds\": [\n \"******\"\n ],\n \"RegionId\": \"cn-hangzhou\"\n }\n}",
"DefaultAgent": 0,
"Description": "Description for the test agent.",
"DmsUnit": "cn-hangzhou",
"ExecutionConfig": {
"ClarificationTendency": 1,
"ForbiddenAppendDataSource": true,
"SkipAskHuman": true,
"SkipPlan": true,
"SkipSqlConfirm": true,
"SkipWebReportConfirm": true
},
"GmtCreated": "2025-12-11T14:04:32.000+00:00",
"GmtModified": "2025-12-11T14:04:32.000+00:00",
"Instruction": "Analytical framework:\n\nMonitor core metrics (GMV, order volume, UV, and conversion rate) on a daily, weekly, and monthly basis to analyze trends and identify year-over-year and month-over-month fluctuations.\nSegment by new vs. returning customers, channels, and regions to identify growth drivers and areas of weakness.\nConduct funnel analysis based on user behavior paths (browse → add to cart → purchase) to pinpoint stages where user drop-off occurs.",
"IsScheduleTask": true,
"Knowledge": "Core metric definitions:\n\nGMV (Gross Merchandise Volume) refers to the total sum of order amounts, including both paid and unpaid orders.\nOrder volume refers to the number of valid orders placed per day.\nUV (Unique Visitors) refers to the deduplicated number of users who visit the website or app.\nConversion rate = paid orders / UV, reflecting the efficiency of traffic conversion.",
"KnowledgeConfigList": [
{
"AccessType": "mcp",
"KbUuid": "kb-HZ-rtcdseb*****pmyt",
"McpServerId": "7shre9b6x*******djz3q7jya"
}
],
"KnowledgeSemanticConfigList": [
{
"DbId": "69942325",
"InstanceId": "2952387",
"KnowledgeUuid": "7ca8f50d7823********02e87",
"Type": "sql_template"
}
],
"Modifier": "20372822********",
"ModifierUserName": "HaoY***",
"Name": "Test agent name",
"NextRuntime": 1767715200,
"OfflineTime": "2025-12-11T14:04:32.000+00:00",
"RecommendQuestionList": [
"Help me find some business insight from this data"
],
"Region": "cn-hangzhou",
"RelatedSessionId": "5xyz...",
"ReleaseTime": "2025-12-11T14:04:32.000+00:00",
"ScheduleTaskConfig": {
"CronExpression": "0 0 0 ? * 1-7\t",
"Query": "Analyze the data and provide the report",
"RelatedSessionId": "4m24*****mg7j2v"
},
"Status": "RELEASE",
"TextReportConfig": "The text report requires that all numbers be written in Chinese numerals rather than Arabic numerals.",
"UserSpecifiedSkillList": [
"ski-sldk8v******3owd"
],
"WebReportConfig": "The web report requires that all numbers be written in Chinese numerals rather than Arabic numerals.",
"WebReportTheme": "default",
"WorkspaceId": "56kv1pvl9uvt9**********bb"
},
"RecallResults": [
{
"Content": "sky is blue",
"Score": 0.65,
"Type": "memory"
}
],
"Saved": true,
"SessionConfig": {
"CustomAgentId": "ca-e*******ckd",
"CustomAgentStage": "debug",
"EnableSearch": true,
"EncryptKey": "ay***1Te",
"EncryptType": "null",
"KbUuidList": [
"asdf****zsdv"
],
"Language": "CHINESE",
"McpServerIds": [
"2q1tu90**********6uttu2nw"
],
"Mode": "ANALYSIS",
"ReportPageWidth": 0,
"ReportWaterMark": "\"\"",
"UserOssBucket": "user-oss-bucket"
},
"SessionId": "976*********p",
"SessionStatus": "RUNNING",
"Title": "分析一下这份文件,给出报告。",
"UserId": "2096******"
},
"ErrorCode": "success",
"ErrorMessage": "UnknownError",
"RequestId": "18****-*****-*******7A3122F",
"Success": true
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。