AIAgentConfig

Updated at:

Parameter

Type

Description

Example

object

The agent template parameters.

Greeting

string

The greeting message. Changes take effect in the next session. Default value: none.

hello

WakeUpQuery

string

The user instruction before the call starts. The agent responds to this instruction immediately after the call starts.

How’s the weather today?

MaxIdleTime

integer

The maximum idle time without interaction with the agent. The agent goes offline when this time expires. Unit: seconds. Default value: 600.

600

UserOnlineTimeout

integer

The timeout period for the agent to close the task if the user does not join the session. Unit: seconds. Default value: 60.

60

UserOfflineTimeout

integer

The timeout period for the agent to close the task after the user leaves the session. Unit: seconds. Default value: 5.

5

EnablePushToTalk

boolean

Specifies whether to enable the push-to-talk mode. Default value: false.

false

GracefulShutdown

boolean

Specifies whether to enable graceful shutdown. Default value: false.

Graceful shutdown: When the agent is stopped, it finishes speaking the current sentence before shutting down, with a maximum speaking time of 10 seconds.

false

Volume

integer

The volume of the agent's voice.

  • If left empty: The adaptive volume mode recommended by Alibaba Cloud is used by default.

  • If specified: The valid range is 0 to 400. Output volume = Voice output volume in the workflow × volume/100. Examples:

  1. If volume=0, the output volume is 0.

  2. If volume=100, the output volume is the original volume.

  3. If volume=200, the output volume is twice the original volume.

100

WorkflowOverrideParams

string

The workflow override parameters. Default value: none.

{}

AvatarUrl

string

The avatar URL of the agent for voice calls. Default value: none.

http://example.com/a.jpg

AvatarUrlType

string

The type of the agent avatar URL. Default value: none.

USER

EnableIntelligentSegment

boolean

Specifies whether to enable intelligent segmentation. When enabled, fragmented sentences spoken by the user are intelligently merged into a single sentence. Default value: true.

true

AsrConfig

object

The automatic speech recognition (ASR) configuration.

AsrLanguageId

string

The ASR language ID. Valid values:

  • zh_mandarin: Chinese.

  • en: English.

  • zh_en: Mixed Chinese and English.

  • es: Spanish.

  • jp: Japanese.

zh_mandarin

AsrMaxSilence

integer

The silence duration threshold for speech segmentation. Silence exceeding this threshold is considered a pause. Valid values: 200 to 1200. Unit: milliseconds. Default value: 400.

400

AsrHotWords

array

The ASR hot word list. The list supports a maximum of 128 hot words.

string

The hot word string. Length: 1 to 10 characters.

check

VadLevel

integer

The interruption threshold parameter. Valid values: 0 to 11. Default value: 11.

  • 0: Disables the voice activity detection (VAD) feature.

  • 1 to 10: A higher value indicates that it is more difficult to interrupt the agent.

  • 11: Significantly different from previous values, providing lower voice damage during pre-processing and stronger anti-interference capability.

11

CustomParams

string

The pass-through parameters for the proprietary ASR integration.

mode=fast&sample=16000&format=wav

VadModel

string

The near-field or far-field VAD model for speech recognition. If not specified, the default value far_field_meeting_16k is used. The value is case-sensitive and cannot contain leading or trailing spaces.

  • near_meeting_16k

  • far_field_meeting_16k

far_field_meeting_16k

VadDuration

integer

The minimum duration threshold for voice activity detection, used to control the sensitivity of interruptions. A value of 0 disables this feature. Valid values: 200 to 2000. Unit: milliseconds. Common values: 200 to 500, which correspond to 1 to 4 words. Default value: empty (does not take effect).

300

AsrContext

string

The ASR context enhancement.

[{"role":"user","content":[{"type":"input_text","text":"Alibaba Cloud, Qwen, Qwen-Audio"}]},{"role":"assistant","content":[{"type":"text","text":"Okay, I will incorporate these terms into our conversation."}]}]

AsrVocabulary

string

The instance-level real-time hot words and their weights for ASR.

{"Qwen":4,"Qwen-Audio":5,"Alibaba Cloud Speech Lab":50}

TtsConfig

object

The speech synthesis configuration.

VoiceId

string

The voice ID. Changes take effect in the next sentence. If not specified, the voice ID configured in the agent template is used. This parameter applies only to preset TTS. Maximum length: 64 characters. For valid values, refer to Intelligent speech effect examples.

longcheng_v2

VoiceIdList

array

The list of available voices.

string

The voice.

zhixiaoxia

PronunciationRules

array

The TTS pronunciation rules. The array length cannot exceed 20. The rules are executed in sequence.

object

The TTS pronunciation rule.

Word

string

The word to be replaced. The length must be less than 10 characters. It must consist of Chinese characters and cannot contain spaces.

110

Pronunciation

string

The target pronunciation. The length must be less than 10 characters. It must consist of Chinese characters and cannot contain spaces.

110

Type

string

The specific pronunciation rule type. Valid values:

  • replacement: Directly replaces the Word with the Pronunciation.

replacement

ModelId

string

The TTS model ID. Currently, only minimax is supported. Valid values: speech-01-turbo and speech-02-turbo.

speech-01-turbo

LanguageId

string

The language ID. Currently, only minimax is supported. Default value: empty. This parameter enhances the recognition capability for specified minority languages and dialects, improving voice performance in those scenarios. If the specific minority language is unknown, you can set this parameter to "auto", and the model will automatically determine the language. Valid values:

Supported languages

  • Chinese: Chinese

  • Chinese,Yue: Cantonese

  • English: English

  • Arabic: Arabic

  • Russian: Russian

  • Spanish: Spanish

  • French: French

  • Portuguese: Portuguese

  • German: German

  • Turkish: Turkish

  • Dutch: Dutch

  • Ukrainian: Ukrainian

  • Vietnamese: Vietnamese

  • Indonesian: Indonesian

  • Japanese: Japanese

  • Italian: Italian

  • Korean: Korean

  • Thai: Thai

  • Polish: Polish

  • Romanian: Romanian

  • Greek: Greek

  • Czech: Czech

  • Finnish: Finnish

  • Hindi: Hindi

  • auto: Automatic detection

Chinese

Emotion

string

The emotion. Currently, only minimax is supported. minimax supports the following 7 emotions:

  • happy: Happy

  • sad: Sad

  • angry: Angry

  • fearful: Fearful

  • disgusted: Disgusted

  • surprised: Surprised

  • calm: Neutral

happy

SpeechRate

number

The speech rate. Supported on all platforms. For cosyvoice, the default value is 1.0, and the valid range is 0.5 to 2.0. For minimax, the default value is 1.0, and the valid range is 0.5 to 2.0.

1.0

HotFix

string

The TTS pronunciation correction and text replacement.

{"pronunciation":[{"weather":"wea-ther"}],"replace":[{"today":"toda"}]}

Instruction

string

The TTS natural language instruction control.

Please use a gentle and friendly female voice, and speak at a slightly slower pace

LlmConfig

object

The large language model (LLM) configuration.

LlmHistory

array

The LLM or MLLM historical conversation context.

object

A single conversation turn.

Role

string

The role of the conversation participant. Valid values:

  • user: User

  • assistant: Assistant

  • system: System

  • function: Function

  • plugin: Plugin

  • tool: Tool

user

Content

string

The actual text content of the conversation, which records the specific expression or response of the role in the conversation.

hello

LlmHistoryLimit

integer

The maximum number of retained turns for the LLM or MLLM historical conversation context. Default value: 10.

10

LlmSystemPrompt

string

The system prompt for the LLM after the call starts.

You are the 1 friendly and helpful assistant, focused on providing accurate information and advice to users.

BailianAppParams

string

The parameters for Alibaba Cloud Model Studio Application Center. The type is a JSON string. For the parameter format, refer to: Alibaba Cloud Model Studio Application Center parameters

"{\"biz_params\":{\"user_defined_params\":{\"your_plugin_id\":{\"article_index\":2}}},\"memory_id\":\"your_memory_id\",\"image_list\":[\"https://your_image_url\"],\"rag_options\":{\"pipeline_ids\":[\"your_id\"],\"file_ids\":[\"DocumentID1\",\"DocumentID2\"],\"metadata_filter\":{\"name\":\"ZhangSan\"},\"structured_filter\":{\"key1\":\"value1\",\"key2\":\"value2\"},\"tags\":[\"Tag1\",\"Tag2\"]}}"

OpenAIExtraQuery

string

The additional query parameters for the OpenAI-compatible LLM. Parameters must be in the key=value format. Multiple parameters are connected with an ampersand (&). All values must be of the string type.

api-version=2024-02-01&api-key=sk-xxx

LlmCompleteReply

boolean

Specifies whether to send the complete LLM response to the client after the LLM finishes generating the response. Enabling this feature does not affect the streaming generation of subtitles.

true

FunctionMap

array

The function mapping list, used to map agent capabilities to LLM functions. Currently, only function calling with user-defined OpenAI-compatible LLMs is supported.

object

A single mapping rule.

Function

string

The name of the built-in feature provided by the Alibaba Cloud agent system. Currently, only hangup (hang up the call) is supported.

hangup

MatchFunction

string

The name of the LLM function that corresponds to this feature. This name is user-defined and used to call the corresponding feature in the LLM. For user-defined LLM protocols, refer to LLM standard API.

hangup

OutputMinLength

integer

The minimum length of text output in characters. Text shorter than this length is cached and waiting for concatenation. Valid values: 0 to 100. A value of 0 or empty indicates no limit. Default value: empty.

5

OutputMaxDelay

integer

The maximum delay time for text output in milliseconds. If this time is exceeded, the cached text is forcibly output. Valid values: 1000 to 10000. A value of 0 or empty indicates no limit. Default value: empty.

2000

HistorySyncWithTTS

boolean

Specifies whether to keep the LLM message history consistent with the TTS playback content. Default value: false. When enabled, the saved LLM messages match the TTS playback content.

Note

In the LLM message history, when the user interrupts the agent, the next message sent to the LLM will include the <ims_agent_interrupted> tag inserted at the interruption point. Example:

[
  {"role": "user", "content": "Tell me a story."},
  {"role": "assistant", "content": "Sure, let me tell you a story about the Romance of the Three Kingdoms. Do<ims_agent_interrupted> you want to listen?"},
  {"role": "user", "content": "Tell me another one."}
]

false

AvatarConfig

object

The digital human configuration. This configuration takes effect only when the workflow includes a digital human node.

AvatarId

string

The model ID of the digital human.

5257

Resolution

string

The resolution of the digital human video stream. The value must be strictly lowercase and must be passed together with AvatarId. Valid values:

  • 360p

  • 480p

  • 720p

  • 1080p

1080p

TemplateId

string

The digital human template ID, used to specify the template used when the digital human starts. The template is provided by the digital human service provider, and the validity of the value is also verified by the provider.

tpl-9527

InterruptConfig

object

The voice interruption policy configuration.

EnableVoiceInterrupt

boolean

Specifies whether to support voice interruption. Default value: true.

true

InterruptWords

array

The list of specific words or phrases that trigger conversation interruption.

string

A specific word or phrase that triggers conversation interruption.

Excuse me

NoInterruptMode

string

The ASR processing policy in mode.

  • cache: Caches the ASR text. After the current turn ends, the cached ASR text is processed together in the next turn.

  • discard: Directly discards the ASR text.

Default value: cache.

cache

KeepInterruptWordsForLLM

boolean

Specifies whether to retain the interruption words and send them to the LLM. Default value: discard.

Note

Example: If the interruption word is "wait", the sentence "wait how is the weather today" becomes "how is the weather today" after the interruption word is discarded and sent to the LLM.

true

VoiceprintConfig

object

The voiceprint configuration.

UseVoiceprint

boolean

Specifies whether to enable voiceprint recognition. Default value: false. When voiceprint recognition is enabled, a valid voiceprint ID must be provided.

false

VoiceprintId

string

The unique identity ID for voiceprint recognition. Default value: empty. The provided voiceprint ID must be registered through the voiceprint registration API. For API documentation, refer to Register voiceprint.

zhixiaoxia

RegistrationMode

string

The voiceprint registration mode. Default value: Explicit.

ValueDescription
ExplicitExplicit registration mode. Users must upload audio through the voiceprint registration API in advance to complete the registration.
ImplicitImplicit registration mode. User voice is automatically collected and voiceprint features are generated during the conversation.

Explicit

TurnDetectionConfig

object

The conversation turn detection configuration.

TurnEndWords

array

The list of keywords used to determine the end of a user's turn.

string

A keyword used to determine the end of a user's turn.

I'm done

Mode

string

The turn detection mode.

  • Normal (default): Normal mode, which does not use AI to determine semantics.

  • Semantic: Semantic mode, which uses AI to determine whether the user has finished speaking based on the context semantics.

Semantic

SemanticWaitDuration

integer

The pause determination time in AI mode. Unit: milliseconds. Default value: -1.

  • -1: AI automatically determines the appropriate waiting time.

  • 0 to 10000: Custom waiting time. We recommend setting it to 0 to 1500 milliseconds.

Note

This parameter is invalid in Normal mode.

-1

Eagerness

string

The eagerness level. This parameter takes effect only in Semantic mode. It controls how quickly the AI starts responding after detecting a pause:

  • "Low": Patient waiting, with a maximum waiting time of 6 seconds, reducing the risk of being interrupted.

  • "Medium": Balanced waiting, with a maximum waiting time of 4 seconds, suitable for most scenarios.

  • "High": Fast response, with a maximum waiting time of 2 seconds, improving speed but potentially increasing the risk of false cuts.

Default value: empty.

High

ExperimentalConfig

string

The experimental feature parameters. Contact technical support if you have any requirements.

""

VcrConfig

object

The video content recognition configuration, which supports sending callbacks to the client with the content recognized by the algorithm in the video.

StillFrameMotion

object

The still frame detection configuration.

Enabled

boolean

Specifies whether to enable still frame detection. Default value: false.

false

CallbackDelay

integer

The delay for sending a still frame detection notification. After this parameter is set, the notification is triggered only after a still frame lasts for the specified duration. Unit: milliseconds. Default value: null. If this parameter is left empty, the configuration in the console is used during the call. Valid values: 200 to 5000.

3000

InvalidFrameMotion

object

The invalid frame detection parameter settings.

Enabled

boolean

Specifies whether to enable invalid frame detection.

false

CallbackDelay

integer

The delay for sending an invalid frame detection notification. After this parameter is set, the notification is triggered only after an invalid frame lasts for the specified duration. Unit: milliseconds. Default value: null. If this parameter is left empty, the configuration in the console is used during the call. Valid values: 200 to 5000.

3000

PeopleCount

object

The people counting configuration.

Enabled

boolean

Specifies whether to enable people counting. Default value: false.

false

Equipment

object

The device recognition configuration.

Enabled

boolean

Specifies whether to enable prohibited device detection. Default value: false.

false

HeadMotion

object

The head motion recognition configuration.

Enabled

boolean

Specifies whether to enable head motion recognition. Default value: false.

false

LookAway

object

The look-away detection configuration.

Enabled

boolean

Specifies whether to enable look-away detection. Default value: false.

true

TransferCallConfig

object

The RTC call transfer configuration. When you call the ForwardAIAgentCall operation to transfer an RTC call (CallMode=0) to a regular phone call, this configuration specifies the line and the caller number. The transfer is allowed only if CallerNumber is configured. If CallerNumber is not configured, calling the transfer operation returns a 400 error. This configuration is read only once when the instance starts. Modifications during a call do not take effect. This configuration does not apply to inbound or outbound call transfers. For inbound and outbound call transfers, use InboundCallConfig and OutboundCallConfig respectively.

Type

integer

The line type. Valid values:

  • 0: Alibaba Cloud communication line. This is the default value.

  • 1: Custom SIP line.

1

SipDomain

string

The custom SIP egress gateway address. This parameter is required only when Type is set to 1.

sip.example.com:5060

CallerNumber

string

The caller number used for call transfers. Configuring this parameter enables the RTC call transfer capability. If this parameter is not configured, the behavior remains the same as before the modification.

0571xxxxxxx

CalledNumber

string

The default callee number. This is a backup number. You must still explicitly specify the callee number when you call the transfer operation.

0571xxxxxxx

ForwardTranscriptionEnabled

boolean

Specifies whether to perform real-time speech recognition for both parties (the RTC user and the transferred phone user) after the transfer is connected. When enabled, the recognition results are pushed to the client as subtitles through the RTC message channel and written to the call record. Valid values:

  • true: Enabled. This is the default value.

  • false: Disabled. Subtitles and call records are not generated during the transfer.

false

AmbientSoundConfig

object

The ambient sound configuration for calls.

ResourceId

string

The ID of the ambient sound resource. You can obtain the ID from the advanced settings of the agent configuration in the console.

f67901c595834************

Volume

integer

The volume of the background sound during the call. Valid values: 0 to 100. A value of 0 indicates that the background sound is disabled.

50

AutoSpeechConfig

object

The automatic speech configuration module for the agent, including LLM wait prompts and user idle inquiries.

UserIdle

object

The inquiry broadcast configuration for prolonged user silence.

WaitTime

integer

The silence duration threshold. Unit: milliseconds. This parameter is required. An inquiry is triggered when the silence duration exceeds this threshold. Valid values: 5000 to 600000.

5000

MaxRepeats

integer

The maximum number of inquiries. Valid values: 0 to 10. This parameter is required. If the number of inquiries exceeds this value, no more inquiries are triggered and the call is disconnected.

5

Messages

array

The collection of inquiry prompts. A maximum of 10 prompts are supported. Each prompt can be up to 100 characters in length. The sum of probabilities must be 100%.

object

The inquiry prompt structure.

Text

string

The text of the inquiry prompt. Maximum length: 100 characters.

Are you still there?

Probability

number

The selection probability of the prompt. Valid values: 0 to 1, which corresponds to 0% to 100%.

0.5

HangupEndWord

string

The closing remark played before hanging up due to prolonged user unresponsiveness. Maximum length: 200 characters.

I'm hanging up, bye

LlmPending

object

The broadcast configuration for LLM response delays.

WaitTime

integer

The wait time threshold for LLM responses. A broadcast prompt is triggered when the wait time exceeds this threshold. This parameter is required. Unit: milliseconds. Valid values: 500 to 10000. Set this parameter based on the actual usage of the LLM.

3000

Mode

string

The mode for selecting a soothing message from LlmPending.Messages to broadcast while waiting for the agent to reply. Valid values:

  • ai_select: The AI selects the most appropriate message from Messages based on the current conversation. This mode does not check whether the sum of Probability values is 1, but WaitTime must not be less than 800 milliseconds. This is the default value.

  • probability: A message is randomly selected based on the Probability weight of each message. The sum of all Probability values must be exactly 1.0.

ai_select

Messages

array

The collection of inquiry prompts. A maximum of 10 prompts are supported. Each prompt can be up to 100 characters in length. The sum of probabilities must be 100%.

object

The inquiry prompt structure.

Text

string

The text of the inquiry prompt. Maximum length: 100 characters.

Just a moment

Probability

number

The selection probability of the prompt. Valid values: 0 to 1, which corresponds to 0% to 100%.

0.5

BackChannelingConfigs

array

The backchanneling configuration module. When enabled, the system randomly broadcasts short backchanneling phrases at specific trigger points.

object

The configuration for a single backchanneling phrase.

Enabled

boolean

Specifies whether to enable the backchanneling feature. This parameter is required. Valid values: true and false.

true

TriggerStage

string

The trigger point for backchanneling. Valid values:

  • pause_detected: A short pause in speech is detected.

pause_detected

Probability

number

The trigger probability of the feature. Valid values: 0.0 to 1.0. This parameter is required.

0.5

Words

array

The collection of backchanneling phrases. A maximum of 10 phrases are supported. Each phrase can be up to 20 characters in length. The sum of probabilities must be 1.0.

object

The backchanneling phrase configuration.

Text

string

The text of the phrase. Maximum length: 20 characters. Multiple languages are supported. This parameter is required.

ok

Probability

number

The trigger probability of the phrase. Valid values: 0.0 to 1.0. This parameter is required.

0.3

BackChannelingConfig

array

Important [Deprecated] Use BackChannelingConfigs instead.

object

The configuration for a single backchanneling phrase.

Enabled

boolean

Specifies whether to enable the backchanneling feature. This parameter is required. Valid values: true and false.

true

TriggerStage

string

The trigger point for backchanneling. Valid values:

  • pause_detected: A short pause in speech is detected.

pause_detected

Probability

number

The trigger probability of the feature. Valid values: 0.0 to 1.0. This parameter is required.

0.5

Words

array

The collection of backchanneling phrases. A maximum of 10 phrases are supported. Each phrase can be up to 20 characters in length. The sum of probabilities must be 1.0.

object

The backchanneling phrase configuration.

Text

string

The text of the phrase. Maximum length: 20 characters. Multiple languages are supported. This parameter is required.

ok

Probability

number

The trigger probability of the phrase. Valid values: 0.0 to 1.0. This parameter is required.

0.3