DescribeDataAgentSession

Updated at:

Retrieves the description of a DataAgent session.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:DescribeDataAgentSession

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

DMSUnit

string

No

The current DMS unit.

cn-hangzhou

SessionId

string

No

The DataAgent session ID. You can obtain this ID by calling CreateDataAgentSession.

c61n7gm******rj

WorkspaceId

string

No

The workspace ID.

12****

Response elements

Element

Type

Description

Example

object

Schema of Response

Data

object

The returned struct.

AgentId

string

The current agent ID.

cu0cs*******mf

AgentStatus

string

The current agent status.

RUNNING

Artifacts

array<object>

The list of artifacts generated by the session. Currently, only reports are included.

object

Description

string

The brief description of the artifact. This field may be empty.

a simple report

FinishTime

string

The time when the backend completed the artifact task. The value is a UNIX timestamp accurate to seconds.

1778743587

Id

string

The globally unique artifact ID. If the artifact is a report generated by specifying MessageType as REPORT in the SendChatMessage operation, the artifact ID is the same as the MessageId value returned by the SendChatMessage operation.

bab******33e1

Name

string

The artifact name. This is usually a concatenated string generated by the project and aligns with the name field in the ListFileUpload operation. You can use this field to query the download URL of the artifact file.

report_****_2026****

ReceiveTime

string

The time when the backend received the artifact request. The value is a UNIX timestamp accurate to seconds.

1778743587

StartTime

string

The time when the backend actually started running the artifact task. The value is a UNIX timestamp accurate to seconds.

1778743587

Status

string

The artifact status. Valid values:

  • PENDING: The backend has received the task but has not started it.

  • RUNNING: The backend has started the task but has not completed it.

  • SUCCESS: The task succeeded. You can query the file information by calling the ListFileUpload operation.

  • FAILED: The task failed.

PENDING

Type

string

The artifact type. Valid values: TextReport and WebReport.

WebReport

Capabilities

array<object>

The capabilities mounted to the session, such as knowledge bases and skills.

object

The capability mounted to the session.

Id

string

The ID of the mounted capability.

  • If Type is set to skill, this parameter indicates the skill ID.

  • If Type is set to dms_kb, this parameter indicates the knowledge base ID.

kb-HZ-s3df*******ld08d

Type

string

The capability type. Valid values:

  • skill: Skill.

  • dms_kb: Knowledge base.

dms_kb

ChatHistoryLocations

array<object>

The session playback history.

object

The session playback element.

Key

string

The key of the session playback history.

testKey1

Url

string

The OSS download URL of the session playback history.

****

CreateTime

integer

The time when the session was created.

1731645908000

DataSources

array<object>

The list of data sources used in the current session.

object

Category

string

The source of the data source. Valid values:

  • CHAT: The data source is specified in a conversation by calling the CreateDataAgentSession or SendChatMessage operation.

  • CUSTOM_AGENT: The data source is from the preset analysis data scope in a custom agent.

CHAT

Detail

string

The data source details. When Category is set to CHAT or CUSTOM_AGENT, the structure of Detail aligns with the structure of a single element in the DataSources parameter of the SendChatMessage operation.

{}

FavoriteInWorkspace

string

Indicates whether the session is favorited by the current logged-on user in the workspace.

true

File

string

The file ID.

f-8*******01m

Messages

array<object>

The list of historical session messages.

object

The historical session message.

Content

string

The content of the historical session message.

Show me the sales of restaurants in the UK in 2022

Id

string

The unique ID of the historical session message.

a5bb5ff643de4124afd4317f79417a81

SendTime

integer

The time when the historical session message was sent.

1790650646000

Status

string

The status of the historical session message.

SENT

RecallResults

array<object>

The recall results from the knowledge base and memory for the current session.

object

Content

string

The content of the recalled knowledge block.

sky is blue

Score

number

The similarity score of this data entry. The scoring algorithm is related to the algorithm specified when the index was created, such as l2, ip, or cosine.

0.65

Type

string

The category of the recalled knowledge.

memory

Saved

boolean

Indicates whether the session is favorited by the current logged-on user.

true

SessionConfig

object

The session configurations.

CustomAgentId

string

The custom agent ID.

ca-e*******ckd

CustomAgentStage

string

The usage stage of the custom agent. Valid values:

  • debug: Debugging stage.

  • prod: Production stage.

debug

EnableSearch

boolean

Specifies whether to enable web search.

True

EncryptKey

string

The encryption key for artifacts stored in OSS, including built-in and user OSS buckets. This key is usually specified in the CreateDataAgentSession operation.

ay***1Te

EncryptType

string

The encryption type for artifacts stored in OSS, including built-in and user OSS buckets.

null

KbUuidList

array

The list of knowledge base IDs for the current session.

string

The knowledge base ID.

asdf****zsdv

Language

string

The language. Valid values:

  • CHINESE: Chinese.

  • ENGLISH: English.

CHINESE

McpServerIds

array

The list of MCP server IDs in the session configurations.

string

The MCP server ID in the session configurations.

2q1tu90**********6uttu2nw

Mode

string

The mode. Valid values:

  • ASK_DATA: Data query mode.

  • ANALYSIS: Analysis mode.

  • INSIGHT: Insight mode.

ANALYSIS

ReportPageWidth

integer

The page width of the report.

300mm

ReportWaterMark

string

The watermark of the report.

""

UserOssBucket

string

The name of the user OSS bucket.

  • Files generated during the analysis process and report artifacts can be uploaded to the user-specified OSS bucket.

user-oss-bucket

SessionId

string

The agent session ID.

976*********p

SessionStatus

string

The session status.

RUNNING

Title

string

The title.

Analyze this file and generate a report

UserId

string

The ID of the session owner.

2096******

ErrorCode

string

The error code.

success

ErrorMessage

string

The error message returned when the call fails.

UnknownError

RequestId

string

Id of the request

18****-*****-*******7A3122F

Success

boolean

The return value description. Valid values:

  • true: The deletion succeeded.

  • false: The deletion failed.

true

Examples

Success response

JSON format

{
  "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"
      }
    ],
    "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": "Analyze this file and generate a report",
    "UserId": "2096******"
  },
  "ErrorCode": "success",
  "ErrorMessage": "UnknownError",
  "RequestId": "18****-*****-*******7A3122F",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.