GetAgentTaskResult

Updated at:

Retrieves the task result of an agent node.

Operation description

You can query data uploaded by calling UploadAudioData or UploadData, as well as data for dataset quality check tasks submitted by calling SubmitQualityCheckTask. You can query the data by task ID or time range. By default, the response of this operation returns only a subset of parameters. You can use the requiredFields request parameter to specify the fields to be returned.

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

sca:GetAgentTaskResult

none

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

JsonStr

string

No

The complete JSON string. For more information, see the following details.

{\"vid\":\"sip-11-1766561862.293393\",\"taskId\":\"20251224-D3B32484-2D53-5B53-A618-483A7941029E\"}

BaseMeAgentId

string

No

The workspace ID.

123456

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

F190ADE9-619A-447D-84E3-7E241A5C428E

Code

string

The status code. A value of 200 indicates success.

200

Message

string

The error message returned when an error occurs.

successful

Success

string

Indicates whether the request is successful. You can determine whether the request is successful based on this field:

  • true: Successful.

  • false/null: Failed.

true

Data

object

The returned result.

TaskId

string

The task ID.

A6BEC8D-9A5B-4BE5-8432-4F635E***

Vid

string

The session ID.

6fa76916-3ce6-45d8-ac64-01b7f31***

LlmRequestId

string

The request ID returned by the large language model service.

106C6CA0-282D-4AF7-85F0-D2D24***

Status

string

The task status. Valid values:

  • 1: Pending.

  • 2: Running.

  • 3: Successful.

  • 4: Failed.

1

ErrorMessage

string

The error details returned when the status is not 0 or 1.

xxxx

Response

object

The result of the computing task.

FieldResponse

object

The attribute extraction result.

FieldVoList

array<object>

The attribute list.

object

The attribute.

Name

string

The attribute name.

phone

Value

string

The attribute value.

1234561

Remarks

string

The reason for the judgment.

Determined based on the first sentence of the customer service representative

OriginalUtterances

array

The sentences referenced for the judgment reason.

integer

The sequence number of the sentence referenced for the judgment reason.

1

TagCategoryResponse

object

The tag categorization result.

TagCategoryVoList

array<object>

The tag list.

object

The tag.

Dimension

string

The tag dimension.

Customer intent

IsMatch

boolean

Indicates whether the tag is matched.

true

ResultLabels

array

The list of matched tags.

string

The matched tag.

Return

Remarks

string

The reason for the judgment.

Determined based on the first sentence of the customer service representative

OriginalUtterances

array

The sentences referenced for the judgment reason.

string

The sequence number of the sentence referenced for the judgment reason.

1

ServiceInspectionResponse

object

The service quality inspection result.

ServiceInspectionVoList

array<object>

The quality inspection item list.

object

The quality inspection item.

Dimension

string

The quality inspection dimension.

Service attitude

IsMatch

boolean

Indicates whether the tag is matched.

true

Remarks

string

The reason for the judgment.

Determined based on the first sentence of the customer service representative

OriginalUtterances

array

The sentences referenced for the judgment reason.

string

The sequence number of the sentence referenced for the judgment reason.

1

CustomerPromptResponse

object

The result returned for the custom instruction.

Text

string

The result returned by the large language model.

The 175/XL fabric feels very comfortable to the touch, and it looks quite slim-fitting when worn. It is a really nice piece of clothing and super good-looking. The quality and texture are absolutely top-notch. It was a very satisfying shopping experience

VoiceprintResponse

object

The voiceprint analysis result.

Dialogue

array<object>

The dialogue corpus.

array<object>

The dialogue corpus.

Words

string

The dialogue content.

I am not sure

Begin

integer

The start time of the sentence. This is the offset from the starting point, in milliseconds.

443

End

integer

The end time of the sentence. This is the offset from the starting point, in milliseconds.

1767492840000

Additions

object

The additional attributes of the current clause, such as speaker, voiceprint, gender, age, and emotion.

Speaker

string

The speaker.

12

IsKnownVoiceprint

boolean

Indicates whether the speaker is the target of voiceprint recognition.

true

BestVoiceprintScore

number

The highest voiceprint score.

0.6

Gender

string

The gender.

Female

GenderScore

number

The gender confidence score.

0.8

Age

string

The age.

38

AgeGroup

string

The age group (child, middle-aged, or elderly).

Middle-aged

AgeScore

number

The age group confidence score.

0.9

Emotion

string

The emotion. Valid values:

  • angry

  • disgusted

  • fearful

  • happy

  • neutral

  • other

  • sad

  • surprised

  • unknown

neutral

EmotionScore

number

The emotion confidence score.

0.9

Errors

array<object>

The error information of each sub-publishing module. The key is the sub-publishing module, and the value is the error message.

object

The error list.

Code

string

The result code. A value of 200 indicates success, and any other value indicates failure. You can determine the cause of the failure based on this field.

200

Message

string

The error details when an error occurs, or successful when the request is successful.

successful

MultiLevelTagResponse

object

The tag tree analysis result.

TagList

array<object>

The child node list.

array<object>

The tag analysis description.

TagName

string

The tag name.

Shopping

Remarks

string

The tag analysis description.

Based on the customer dialogue, the current tag is identified as shopping

Children

array<object>

The child node list.

array<object>

The child node list.

TagName

string

The tag name.

Purchase appliances

Remarks

string

The tag analysis description.

Based on the customer conversation, the current tag is identified as Purchase appliances

Children

array<object>

The tag analysis description.

array<object>

The tag analysis description.

TagName

string

The tag name.

Purchase refrigerators

Remarks

string

The tag analysis description.

Based on the customer conversation, the current tag is identified as Purchase refrigerators

Children

array<object>

The tag name.

array<object>

The child node list.

TagName

string

The tag name.

Purchase Tier 1 energy efficiency refrigerators

Remarks

string

The tag analysis description.

Based on the customer conversation, the current tag is identified as Purchase Tier 1 energy efficiency refrigerators

Children

array<object>

The child node list.

object

The tag analysis description.

TagName

string

The tag name.

Purchase compact refrigerators

Remarks

string

The tag analysis description.

Based on the customer conversation, the current tag is identified as Purchase compact refrigerators

Dialogues

array<object>

The conversation data.

object

The conversation data.

Words

string

The dialogue content.

Hello, how can I help you?

Begin

integer

The offset of the start time of this sentence relative to the overall start time of the conversation, in milliseconds. For example, if the total recording duration is 2 minutes and 10 seconds, and the customer starts speaking a sentence at 1 minute and 12 seconds and finishes at 1 minute and 20 seconds, the begin value is 72000 and the end value is 80000.

980

EmotionValue

integer

The emotion energy value, which is calculated as the volume in decibels divided by 10. Valid values: [1,10]. A higher value indicates a stronger emotion.

7

End

integer

The offset of the start time of this sentence relative to the overall start time of the conversation, in milliseconds. For example, if the total recording duration is 2 minutes and 10 seconds, and the customer starts speaking a sentence at 1 minute and 12 seconds and finishes at 1 minute and 20 seconds, the begin value is 72000 and the end value is 80000.

80000

SpeechRate

integer

The average speech rate of this sentence, in words per minute.

200

Role

string

The role of the speaker for this sentence. Valid values: Customer service representative, Customer.

Customer service representative

HourMinSec

string

The start time of this sentence in the hour-minute-second format. Format: hh:mm:ss.

00:08

Usage

object

The token usage.

InputTokens

string

The number of input tokens for the LLM.

100

OutputTokens

string

The number of output tokens for the LLM.

100

TotalTokens

string

The total number of tokens accumulated for this task.

200

TymxTurboCount

string

The cumulative number of turbo model calls.

1

TymxPlusCount

string

The cumulative number of plus model calls.

1

Examples

Success response

JSON format

{
  "RequestId": "F190ADE9-619A-447D-84E3-7E241A5C428E",
  "Code": "200",
  "Message": "successful",
  "Success": "true",
  "Data": {
    "TaskId": "A6BEC8D-9A5B-4BE5-8432-4F635E***",
    "Vid": "6fa76916-3ce6-45d8-ac64-01b7f31***",
    "LlmRequestId": "106C6CA0-282D-4AF7-85F0-D2D24***",
    "Status": "1",
    "ErrorMessage": "xxxx",
    "Response": {
      "FieldResponse": {
        "FieldVoList": [
          {
            "Name": "phone",
            "Value": "1234561",
            "Remarks": "Determined based on the first sentence of the customer service representative",
            "OriginalUtterances": [
              1
            ]
          }
        ]
      },
      "TagCategoryResponse": {
        "TagCategoryVoList": [
          {
            "Dimension": "Customer intent",
            "IsMatch": true,
            "ResultLabels": [
              "Return"
            ],
            "Remarks": "Determined based on the first sentence of the customer service representative",
            "OriginalUtterances": [
              "1"
            ]
          }
        ]
      },
      "ServiceInspectionResponse": {
        "ServiceInspectionVoList": [
          {
            "Dimension": "Service attitude",
            "IsMatch": true,
            "Remarks": "Determined based on the first sentence of the customer service representative",
            "OriginalUtterances": [
              "1"
            ]
          }
        ]
      },
      "CustomerPromptResponse": {
        "Text": "The 175/XL fabric feels very comfortable to the touch, and it looks quite slim-fitting when worn. It is a really nice piece of clothing and super good-looking. The quality and texture are absolutely top-notch. It was a very satisfying shopping experience"
      },
      "VoiceprintResponse": {
        "Dialogue": [
          {
            "Words": "I am not sure",
            "Begin": 443,
            "End": 1767492840000,
            "Additions": {
              "Speaker": "12",
              "IsKnownVoiceprint": true,
              "BestVoiceprintScore": 0.6,
              "Gender": "Female",
              "GenderScore": 0.8,
              "Age": "38",
              "AgeGroup": "Middle-aged",
              "AgeScore": 0.9,
              "Emotion": "neutral",
              "EmotionScore": 0.9
            }
          }
        ],
        "Errors": [
          {
            "Code": "200",
            "Message": "successful"
          }
        ]
      },
      "MultiLevelTagResponse": {
        "TagList": [
          {
            "TagName": "Shopping",
            "Remarks": "Based on the customer dialogue, the current tag is identified as shopping",
            "Children": [
              {
                "TagName": "Purchase appliances",
                "Remarks": "Based on the customer conversation, the current tag is identified as Purchase appliances",
                "Children": [
                  {
                    "TagName": "Purchase refrigerators",
                    "Remarks": "Based on the customer conversation, the current tag is identified as Purchase refrigerators",
                    "Children": [
                      {
                        "TagName": "Purchase Tier 1 energy efficiency refrigerators",
                        "Remarks": "Based on the customer conversation, the current tag is identified as Purchase Tier 1 energy efficiency refrigerators",
                        "Children": [
                          {
                            "TagName": "Purchase compact refrigerators",
                            "Remarks": "Based on the customer conversation, the current tag is identified as Purchase compact refrigerators"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    "Dialogues": [
      {
        "Words": "Hello, how can I help you?",
        "Begin": 980,
        "EmotionValue": 7,
        "End": 80000,
        "SpeechRate": 200,
        "Role": "Customer service representative",
        "HourMinSec": "00:08"
      }
    ],
    "Usage": {
      "InputTokens": "100",
      "OutputTokens": "100",
      "TotalTokens": "200",
      "TymxTurboCount": "1",
      "TymxPlusCount": "1"
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.