My AI agent changes to English when there isn't enough text

Issue symptoms

When I test the email AI agent for my bot, at Conversation starts, the procedure correctly detects the incoming language. However, the language changes to English when there is not sufficient context in any of the replies. This is under my bot with the use case Subscription Cancellation.

Root cause

This happens because the email AI agent falls back to its configured default language when the incoming message does not contain sufficient text for high-confidence language detection. The following behaviors are expected based on how language detection works:

AI agents determine customer language through natural language processing on the first message, CRM integration actions, or user selection in welcome messages. Language detection does not look up or fall back to user profile languages unless an action is explicitly configured to fetch customer locale from your CRM.

Opening and closing lines for email responses aren't translated automatically, so you need to provide versions for each language you support

The first message from the customer may be too short for the system to confidently match a language. As a result, the bot starts responding in the default language. This is expected behavior.

Language detection only runs when the active_language session parameter is empty (such as on the first message or after a language reset). Once active_language is set, the AI agent will not re-run language detection or automatically switch languages on subsequent emails unless the parameter is manually reset using an action.

Resolution steps

Short messages may always result in undetected languages.

To resolve this issue:

Add the target language > activate that language for the AI agent

Add custom email opening and closing lines in that language under Email content, and select Enable

Confirm that your use case has content in the target language

For more information, see Configuring language detection for AI agents.