https://retellai.com/?utm_source=discord&utm_medium=seo logo
i'm trying to enable chat agent embedded on my web...
# ❓・ai-evy-support
d
@AI Evy i'm trying to enable chat agent embedded on my website used this <script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="YOUR_RETELL_PUBLIC_KEY" data-agent-id="YOUR_CHAT_AGENT_ID" data-agent-version="YOUR_AGENT_VERSION" data-title="YOUR_CUSTOM_TITLE" data-logo-url="YOUR_LOGO_URL" data-color="YOUR_CUSTOM_COLOR" data-bot-name="YOUR_BOT_NAME" data-popup-message="YOUR_POPUP_MESSAGE" data-show-ai-popup="true" data-show-ai-popup-time="5" data-auto-open="false" data-dynamic='{"key": "value"}' data-recaptcha-key="YOUR_GOOGLE_RECAPTCHA_SITE_KEY" > withought Google recaptcha The Window pops open but the Ai isnt answering Any help ?
a
Thanks for tagging me @danday9. I'll look through relevant sources and get back to you shortly.
### Answer --- Here are a few things to check when the chat widget window opens but the AI isn't responding: [(1) ]() 1. Replace placeholder values with actual credentials You need to replace
YOUR_RETELL_PUBLIC_KEY
with your actual Retell public key and
YOUR_CHAT_AGENT_ID
with your actual chat agent ID. [(1) ]() [(2) ]() You can find your public key in the Retell dashboard under Keys → Public Keys. [(2) ]() 2. Verify agent version The
data-agent-version
attribute should contain your agent version number (e.g.,
"0"
for version 0) . [(1) ]() If you're unsure of the version, you can retrieve agent versions using the API. [(3) ]() 3. Check allowed domains Your public key must have your website domain added to its allowed domains list. [(2) ]() Navigate to Public Keys in your Retell dashboard, click on your public key, and add the domain where your widget is embedded (e.g.,
example.com
) . For local testing, add
localhost
to the allowed domains. 4. Remove reCAPTCHA if not configured Since you're not using Google reCAPTCHA, remove the
data-recaptcha-key
attribute entirely from your script tag. [(1) ]() 5. Ensure you're using a chat agent The chat widget requires a chat agent specifically created for text-based conversations, not a voice agent. [(1) ]() [(4) ]() Here's a minimal working example: [(1) ](
loy/chat-widget)
Copy code
html
<script
  id="retell-widget"
  src="<https://dashboard.retellai.com/retell-widget.js%22>
  type="module"
  data-public-key="YOUR_RETELL_PUBLIC_KEY"
  data-agent-id="YOUR_CHAT_AGENT_ID"
  data-agent-version="0"
></script>
Check your browser's developer console for any error messages that might indicate what's preventing the AI from responding. **
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Public Keys](https://docs.retellai.com/accounts/public-keys) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) [[4] Retell AI Chat Agent – Real-Time Web Chat Automation Widget | Retell AI](https://www.retellai.com/blog/meet-retell-chat-agents-build-smarter-web-chats) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
ive done exactly all that
whats data dynamic
a
Thanks for the follow-up, @danday9. I'll get back to you soon.
### Answer --- The
data-dynamic
attribute allows you to pass dynamic variables to your chat agent. [(1) ]() [(2) ]() These variables inject personalized data into your agent's responses for each specific chat session. [(1) ]() The format is JSON key-value pairs: [(2) ]()
Copy code
html
data-dynamic='{"key": "value"}'
Common use cases include passing customer information like names, order IDs, or other context-specific data that your agent can reference during the conversation. [(1) ]() For example, if you wanted to pass a customer name and order number, you might use:
Copy code
html
data-dynamic='{"customer_name": "John Doe", "order_id": "12345"}'
These variables can then be referenced in your agent's prompts using the
{{variable_name}}
syntax. For instance, your agent could greet users with "Hello {{customer_name}}, I see you're asking about order {{order_id}}". Since you've verified all the basic setup steps and the widget window opens but the AI isn't responding, check your browser's developer console for any JavaScript errors. Also verify that your chat agent is properly configured and published in the Retell dashboard. [(2) ]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy Ive done all that you mentioned the Ai still not responding Maybe it's in the website allowe din the publiv keye
a
Thanks for the follow-up, @danday9. I'll get back to you soon.
### Answer [(1) ]() --- Yes, the allowed domains configuration in your public key is likely the issue. Here's what to check: 1. Navigate to Settings → Public Keys in your Retell dashboard 2. Click on the public key you're using in your widget 3. Verify that the exact domain where your widget is embedded is added to the allowed domains list (e.g.,
example.com
,
app.example.com
) 4. If testing locally, ensure
localhost
is also in the allowed domains 5. Save any changes you make Important: The domains must match exactly. For example, if your widget is on
www.example.com
, you need to add
www.example.com
specifically, not just
example.com
. After updating your allowed domains, refresh your webpage and test the widget again. The chat widget will only work on domains that are explicitly listed in your public key's allowed domains configuration. If the issue persists after verifying the domain configuration, check your browser's developer console for any error messages that might indicate authentication or connection issues.
​ To learn more, see the sources I considered: [[1] Public Keys](https://docs.retellai.com/accounts/public-keys) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy If i want to test it out on a codepen what do i insert as domain? Ive already added codepen.io
a
Thanks for the follow-up, @danday9. I'll get back to you soon.
### Answer --- For testing on CodePen, you've already added
codepen.io
to your allowed domains list, which is correct. [(1) ]() However, CodePen serves content from multiple subdomains depending on the view mode. You may need to add these specific domains to your allowed domains list: -
codepen.io
(for the editor view) -
cdpn.io
(CodePen's CDN domain where live previews are served) To configure this: 1. Navigate to the Public Keys section in your Retell dashboard 2. Click on the public key you're using 3. Add both
codepen.io
and
cdpn.io
to your allowed domains list 4. Save your changes The allowed domains feature prevents unauthorized use of your public key on other websites, so the domains must match exactly where your widget is being loaded. After adding
cdpn.io
, refresh your CodePen preview and test the widget again. Check your browser's developer console for any error messages that might indicate domain authentication issues.
​ To learn more, see the sources I considered: [[1] Public Keys](https://docs.retellai.com/accounts/public-keys) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy That worked. Is there a way i can add the three dots, to make the Ai look responsive?
a
Thanks for the follow-up, @danday9. I'll get back to you soon.
### Answer I don't have information in the available sources about adding typing indicators (the three dots animation) to the Retell chat widget to show when the AI is processing a response. The sources I reviewed cover the chat widget's basic configuration attributes like
data-public-key
,
data-agent-id
,
data-title
,
data-color
, and
data-dynamic
, but don't mention any built-in typing indicator functionality or customization options for response loading states. If you'd like to explore this further, you might want to: - Check out the [Retell Website Widget documentation]() for any updates on customization options - Visit [Contact Sales]() to inquire about this feature - Visit [) for community discussions Would you like a general answer based on typical chat widget implementations instead?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @danday9. I'll get back to you soon.
### Answer --- ### Answer To add an initial starting message for your chat agent, you need to configure the Conversation Initiation settings in your agent builder. [(1) ]() Here's where to configure it: 1. Navigate to your chat agent in the Retell dashboard 2. In the agent builder, look for the Conversation Initiation section under basic settings 3. You have two options: - **User-First**: Agent waits for user input - **Agent-First**: Agent initiates the conversation For Agent-First conversations, you can: - Set a fixed welcome message - Use prompts to guide the agent's opening message According to community discussions, if you want the AI to start with a specific message, you can add instructions at the top of your prompt like: [(2) ]()
Copy code
YOU need to start the conversation. 
Start the chat with "Hey! Saw your replied to our ad about an apartment in Atlanta. Want me to send you some available options?"
Additionally, there was a fix implemented where you can send a starting message with empty content to trigger the beginning message behavior. If you're still experiencing issues with the initial message not appearing, verify that your agent is configured with "Agent-First" conversation initiation and that you've set either a fixed welcome message or appropriate prompt instructions. [(1) ]() --- **
​ To learn more, see the sources I considered: [[1] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[2] I have a chat agent with "AI Initiates: AI beings with your defined message" - it does not](https://discord.com/channels/1186424376300679209/1385353491630919934) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.