Issue Description
Users have reported that the ConvoAI agent sometimes unexpectedly restarts an ongoing conversation. This issue disrupts the flow of communication and can lead to a poor user experience.
Platform/SDK
ConvoAI - Agora SDK
Error Message
No specific error message provided, but the issue presents as the bot randomly restarting conversations.
Step by Step Solution
-
Review the Start API Parameters:
- Access the codebase where the ConvoAI Start API is implemented.
- Locate the section of code responsible for initiating the ConvoAI session.
-
Modify the
remote_rtc_uids
Parameter:- Within the Start API call, find the
remote_rtc_uids
parameter. - Replace the wildcard value
"*"
with the specific UID(s) of the user(s) the agent needs to subscribe to. For example, if the UID is111
, then the parameter should be"remote_rtc_uids": ["111"]
.
- Within the Start API call, find the
-
Test the Changes:
- Deploy the changes to your development or staging environment.
- Conduct test conversations to ensure the bot no longer restarts randomly.
- If the issue persists, review the changes for accuracy or contact Agora support for further assistance.
-
Deploy to Production:
- Once confirmed that the issue is resolved in the test environment, deploy the changes to the production environment.
Root Cause
The root cause of the issue is the use of a wildcard "*"
in the remote_rtc_uids
parameter of the ConvoAI Start API. This causes the agent to subscribe to all users in the channel, leading to unpredictable behavior like random conversation restarts.
Prevention/Best Practice
To prevent similar issues:
- Always specify only the necessary user ID(s) in the
remote_rtc_uids
parameter when starting a ConvoAI session. - Avoid using the wildcard
"*"
to prevent unintentionally subscribing to all users, which can lead to erratic bot behavior and performance issues.
Corresponding Document/Link
For more information on how to properly configure the ConvoAI Start API and understand its parameters, refer to the official ConvoAI documentation at https://docs.agora.io/en/conversational-ai/rest-api/join