AI real-time conversational agent user guide
The AI real-time conversational agent service lets you start an agent using a server-side API and add it to a specified Real-Time Communication (RTC) channel. You can then have a real-time conversation with the agent in the channel. This topic describes how to enable the AI real-time conversational agent feature.
Procedure
Log on to the RTC console.
In the navigation pane on the left, choose AI Real-time Conversational Agent/Agent Management to open the Agent Management page.
On the Agent Management page, select a Version 3.0 AppID for which you want to enable the agent feature.
Click the AI Real-time Conversational Agent radio button to activate the agent feature.
Configure the agent's Basic Information:
Parameter
Description
Agent name
A user-friendly name for the agent that reflects its core function and purpose.
Required
Agent type
Currently, only "Voice Call" is supported.
Required
Call mode
Supported modes: "Natural Conversation" and "Walkie-Talkie".
"Natural Conversation": Similar to a regular phone call. Both parties can speak and listen at the same time for a smooth, natural exchange.
"Walkie-Talkie": Like a physical walkie-talkie. Only one party can speak at a time. The other party can respond only after the first has finished. This is suitable for clear, one-way command scenarios.
Required
Smart interruption
Supported options: "Allow interruption" and "Forbid interruption".
"Smart interruption" means that while the agent is speaking, a user can interrupt it by speaking or issuing a command. The system immediately stops and listens for the new question or command. This allows for a faster transition to the next part of the conversation. It avoids waiting for the agent to finish speaking, making the dialogue more flexible, efficient, and similar to natural human interaction.
Required
Prompt
Custom prompts are supported.
A "Prompt" is an underlying instruction or guide you give the agent. It tells the agent what persona, style, and manner to use when responding to questions.
Optional
Welcome message
Set the first thing the agent says to the user.
Optional
Configure the Automatic Speech Recognition (ASR) settings for the agent:
Parameter
Description
Required
ASR name
A user-friendly name for the current ASR configuration that reflects its scenario or purpose.
Required
End-of-speech detection threshold
This setting determines how long the system waits after a user pauses before it considers their sentence complete.
Default: 500 ms. Range: [200, 6000].
If you set the "Voice duration threshold", set this value higher than the voice duration threshold.
Required
Voice duration threshold (ms)
This sets a threshold for sound. Only when a detected sound segment exceeds this duration is it considered speech and processed for recognition.
The default value is 300 mm.
Optional
Custom hotwords
By setting custom hotwords, you can "teach" the agent special vocabulary in advance for it to prioritize during recognition.
Optional
Configure the agent's LLM settings:
Parameter
Description
Required
LLM name
A name for the Large Language Model (LLM) configuration that reflects its scenario or purpose.
Required
Model provider
Select the provider of the Large Language Model (LLM).
Currently, only Alibaba Cloud is supported.
Required
Model selection
Select a specific large language model.
Supported models: "Qwen-Plus", "DeepSeek-R1", and "BailianAgent".
Required
API key
The authentication credential for making API calls to the provider's Large Language Model (LLM) service.
Required
Temperature
The "Temperature" parameter acts as a control for the creativity versus the precision of the AI's responses.
Low Temperature (for example, 0.2): This sets the model to a "precise" mode.
High Temperature (for example, 1.8 or higher): This sets the model to a "creative" mode.
Default: 0.7. Range: [0, 2).
No
TopP
The "Top-P" parameter determines the size of the candidate list of words the AI considers when generating the next word.
High Top-P (for example, 0.9): The AI creates a larger candidate list with more possibilities. This makes its responses more diverse, creative, and interesting, but also increases the risk of irrelevant or nonsensical content.
Low Top-P (for example, 0.2): The AI creates a very small candidate list, usually containing only the safest and most logical options. This makes its responses more conservative, deterministic, and predictable. The answers are more focused and accurate.
The sampling range is (0, 1]. Default: 0.8.
No
MaxToken
The maximum output length. This can be thought of as a "word limit" for each AI response.
For estimation, you can approximate one Chinese character as one token and one English word as 1.3 tokens.
Default: 8192.
No
HistoryDepth
The number of past conversation rounds provided to the LLM. This controls the AI's "memory" in a continuous dialogue. An appropriate memory capacity makes the conversation more coherent and intelligent. It prevents the AI from forgetting previous topics after several rounds of exchange.
Maximum: 100. Minimum: 0. Default: 3.
No
Configure the agent's Text-to-Speech (TTS) settings:
Parameter
Description
Required
TTS name
A name for the text-to-speech (TTS) service configuration that reflects its scenario or purpose.
1 to 128 characters. Supports Chinese characters, English letters, digits, underscores (_), and hyphens (-).
Required
Provider
Select the provider of the text-to-speech (TTS) service.
Currently, only Alibaba Cloud is supported.
Required
Model
Select a specific text-to-speech (TTS) model.
Supported models: "CosyVoice-V1" and "CosyVoice-V2".
Required
API key
The authentication credential for making API calls to the provider's text-to-speech (TTS) service.
Required
Voice
Select a voice based on the audio samples.
No
Volume
Range: [0, 100]. Default: 50.
No
Speech rate
Range: [0.5, 2.0]. Default: 1.0.
No
Pitch
Range: [0.5, 2.0]. Default: 1.0.
No
Filter settings
Filters out characters within a specified range of symbols so they are not converted to speech.
No
Click the Create Agent button and configure the agent parameters as required.
Click the Submit button to finish creating the agent.