DescribeAppAgentTemplates

Updated at:

Lists agent templates.

Operation description

Rate limits

The rate limit for this API operation is 10 queries per second (QPS) per user. If you exceed the limit, API calls are throttled, which may affect your business. Call this operation at a reasonable frequency.

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

rtc:DescribeAppAgentTemplates

none

*App

acs:rtc::{#accountId}:app/{#AppId}

None None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID. You can create and query the ID in the console. Only a single ID is supported.

ac7N****

Name

string

No

The template name.

Agent template

Id

string

No

The template ID.

123121414122313121313

PageNum

integer

No

The page number.

1

PageSize

integer

No

The page size.

10

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

30D41049-D02D-1C21-86AE-B3E5FD805C27

TotalNum

integer

The total number of records.

10

TotalPage

integer

The total number of pages.

1

Templates

array<object>

The list of templates.

array<object>

Greeting

string

The greeting.

Hello, robot

CreateTime

string

The creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).

2020-09-04T06:22:15Z

AgentSilenceConfig

object

The silence configuration for the agent.

Content

string

The content of the silence prompt message.

Hello, are you still there?

WebhookTriggerTimeout

integer

The silence timeout period for triggering the agent silence timeout webhook, in seconds. This webhook can be triggered multiple times. If the agent remains silent after the webhook silence timeout, it will be triggered again upon the next timeout.

50

Strategy

integer

The silence timeout handling strategy. Valid values:

  • 1: Broadcast the prompt message specified by content to the user via voice.

  • 2: Send the prompt message specified by content and the conversation history to the LLM, and broadcast the reply generated by the model.

1

AlertTimeout

integer

The timeout period for the silence alert, in seconds. This alert can be triggered multiple times. If the agent remains silent after the silence alert timeout, it will be triggered again upon the next timeout.

60

AmbientSoundConfig

object

The ambient sound configuration.

SoundId

string

The ID of the ambient sound.

office

Volume

integer

The volume of the ambient sound.

50

InterruptConfig

object

The interruption configuration.

SemanticsInterrupt

boolean

Specifies whether semantic interruption is enabled.

BackChannelConfig

object

The backchannel configuration.

UserTurnEnd

boolean

Specifies whether to enable backchanneling after the user finishes speaking.

InterruptMode

integer

The interruption mode. Valid values:

  • 1: Allow interruption (default).

  • 2: Disable interruption.

1

Name

string

The template name.

Test

AsrConfig

object

The speech-to-text configuration.

VocabularyId

string

The ID of the hotword vocabulary.

ecfadace11114cf08a7f07aceee798ad

MaxSentenceSilence

integer

The threshold for detecting sentence pauses in speech, in milliseconds. Default value: 500. Valid values: 200 to 6000.

300

VadConfig

object

The Voice Activity Detection (VAD) configuration.

InterruptSpeechDuration

integer

The minimum duration of continuous human voice signal detection required to avoid false interruptions, in milliseconds. Valid values: 0 to 3000.

1200

WordWeights

array<object>

The hotword weights. Each vocabulary can contain up to 500 hotwords, and each hotword can be up to 10 Chinese characters in length. Hotwords must be UTF-8 encoded and cannot contain punctuation marks or special characters. Otherwise, the hotword feature will not take effect.

object

The hotword weight.

Word

string

The text of the hotword. Each word can be up to 10 Chinese characters or English words in length.

Dezhou

Lang

string

The language code.

zh

Weight

integer

The weight of the hotword. Valid values: integers from 1 to 5. Common value: 4. If the effect is not obvious, you can increase the weight. However, a large weight may cause negative effects and lead to inaccurate recognition of other words.

1

Name

string

The name.

ASR configuration

Type

integer

The type of the agent. Valid values:

  • 1: Voice call (default).

1

LlmConfig

object

The large language model (LLM) configuration.

Temperature

number

The sampling temperature. Valid values: 0 to 2 (exclusive). Default value: 0.7.

0.8

ApiKey

string

The API key required by the LLM service provider.

qW8GpBOdHK/pv9gdUSVLvQ==

MaxToken

integer

The maximum number of tokens for the output text. Default value: 8192.

1024

Model

string

The model provided by Alibaba Cloud Model Studio. Currently, qwen-plus and deepseek-r1 are supported.

deepseek-r1

HistoryDepth

integer

The number of historical conversation turns provided to the LLM. Maximum value: 100. Default value: 3.

8

Prompt

string

The prompt for the large language model. The maximum length is 5,000 characters.

You are a senior psychologist

AgentAppId

string

The application ID of the agent when the model is a Model Studio agent.

1233312

Vendor

string

The vendor. Currently, Alibaba Cloud Model Studio and third-party configurations that comply with the OpenAI API specification are supported.

aliyun

TopP

number

The top-p sampling range. Valid values: (0, 1]. Default value: 0.8.

0.8

Url

string

The endpoint URL used to connect to a third-party large language model.

https://test.com

Name

string

The name.

llm

TtsConfig

object

The text-to-speech settings.

ApiKey

string

The API key required by the LLM service provider.

N5448VFGI2mXJU8a/A03VQ==

FilterBrackets

array

The bracket filtering settings. Valid values:

  • 1: Chinese parentheses ()

  • 2: English parentheses ()

  • 3: Chinese square brackets 【】

  • 4: English square brackets []

  • 5: English curly braces {}

integer

The specific field.

1

Volume

integer

The volume. Valid values: 0 to 100. Default value: 50.

50

Rate

number

The speech rate. Valid values: 0.5 to 2.0. Default value: 1.0.

50

Model

string

The model provided by Alibaba Cloud Model Studio. Currently, only the cosyvoice-v1 model is supported.

cosyvoice-v1

Pitch

number

The pitch. Valid values: 0.5 to 2.0. Default value: 1.0.

0.8

Vendor

string

The vendor. Currently, only Alibaba Cloud Model Studio is supported.

aliyun

Voice

string

The voice. Default value: longxiaoxia. Valid values:

  • longwan

  • longcheng

  • longhua

  • longxiaochun

  • longxiaoxia

  • longxiaocheng

  • longxiaobai

  • longlaotie

  • longshu

  • longshuo

  • longjing

  • longmiao

  • longyue

  • longyuan

  • longfei

  • longjielidou

  • longtong

  • longxiang

  • loongstella

  • loongbella

longwan

Name

string

The name.

Tts

Id

string

The template ID.

wv7N****

ChatMode

integer

The conversation mode. Valid values:

  • 1: natural conversation mode (default)

  • 2: walkie-talkie mode

1

EnableVideoUnderstanding

boolean

Specifies whether to enable video understanding. If enabled, the large language model must support multimodal data.

PreferVideo

integer

The preferred video stream for the agent to process when visual understanding is enabled. The agent can process only one video stream. When both the camera stream and the screen sharing stream are pushed, valid values are:

  • 1: The agent prioritizes the camera stream.

  • 2: The agent prioritizes the screen sharing stream.

Default value: 1.

1

Examples

Success response

JSON format

{
  "RequestId": "30D41049-D02D-1C21-86AE-B3E5FD805C27",
  "TotalNum": 10,
  "TotalPage": 1,
  "Templates": [
    {
      "Greeting": "你好,机器人。",
      "CreateTime": "2020-09-04T06:22:15Z",
      "AgentSilenceConfig": {
        "Content": "你好,还在吗?",
        "WebhookTriggerTimeout": 50,
        "Strategy": 1,
        "AlertTimeout": 60
      },
      "AmbientSoundConfig": {
        "SoundId": "office",
        "Volume": 50
      },
      "InterruptConfig": {
        "SemanticsInterrupt": false
      },
      "BackChannelConfig": {
        "UserTurnEnd": false
      },
      "InterruptMode": 1,
      "Name": "测试",
      "AsrConfig": {
        "VocabularyId": "ecfadace11114cf08a7f07aceee798ad",
        "MaxSentenceSilence": 300,
        "VadConfig": {
          "InterruptSpeechDuration": 1200
        },
        "WordWeights": [
          {
            "Word": "德州",
            "Lang": "zh",
            "Weight": 1
          }
        ],
        "Name": "Asr配置"
      },
      "Type": 1,
      "LlmConfig": {
        "Temperature": 0.8,
        "ApiKey": "qW8GpBOdHK/pv9gdUSVLvQ==",
        "MaxToken": 1024,
        "Model": "deepseek-r1",
        "HistoryDepth": 8,
        "Prompt": "你是一个高级心理医生",
        "AgentAppId": "1233312",
        "Vendor": "aliyun",
        "TopP": 0.8,
        "Url": "https://test.com",
        "Name": "llm"
      },
      "TtsConfig": {
        "ApiKey": "N5448VFGI2mXJU8a/A03VQ==",
        "FilterBrackets": [
          1
        ],
        "Volume": 50,
        "Rate": 50,
        "Model": "cosyvoice-v1",
        "Pitch": 0.8,
        "Vendor": "aliyun",
        "Voice": "longwan",
        "Name": "Tts"
      },
      "Id": "wv7N****",
      "ChatMode": 1,
      "EnableVideoUnderstanding": false,
      "PreferVideo": 1
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterError %s.
404 NotFound %s. The requested resource does not exist

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.