https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I get the Chat agent on my website to respo...
# ❓・ai-evy-support
m
@AI Evy how do I get the Chat agent on my website to respond?
a
Thanks for tagging me @mc_53412. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Create chat agent](https://docs.retellai.com/build/create-chat-agent) [[3] 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) ​
### Answer To get the Retell AI Chat agent responding on your website, you need to embed the chat widget using the script tag in your HTML [(1) ]() . First, ensure you have the prerequisites : - A chat agent created (you can create one or convert an existing voice agent) [(2) ]() - Your Retell Public Key [(1) ]() - Your chat agent ID Then add this script tag to your HTML within the
<head>
tag :
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="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"
></script>
The widget uses the Retell public key system, allowing direct API calls from the frontend with no backend proxy required . Once embedded, the chat widget will provide text-based conversations through a chat interface . You can also create a public key in your Retell AI Dashboard by clicking on "Keys" in the left menu, then "+ Add Key" and selecting "Public Key" [(3) ]() . Input the name of the key and the site domain you'll be embedding the widget on .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy where do I find YOUR_AGENT_VERSION
a
Thanks for the follow-up, @mc_53412. I'll get back to you soon.
### Answer You can find the agent version number in several ways: ## Dashboard Method You can view agent versions by clicking the Clock icon in the upper right corner of the agent page [(1) ]() . This will show you a list of all versions of the agent . Each version has a version number that you can use . ## API Methods You can retrieve the version number using the Retell SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(agentResponse.agent_id) ;
[(2) ]() This will return an agent object that includes a
version
field . You can also get all versions of an agent:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939') ;
console.log(agentResponses) ;
[(3) ]() ## Version Number Usage The version number can be used as a parameter in API calls like
get_agent
or when creating calls [(1) ]() . If you don't specify a version number, the Retell SDK will default to the latest version of the agent . For example:
Copy code
get_agent(version=2) ///# Gets the version with version number 2.
get_agent() ///# Gets the latest version of the agent.
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] Get Agent](https://docs.retellai.com/api-references/get-agent) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I added the script, agent ID, and public key as instructed and it's not working
a
Thanks for the follow-up, @mc_53412. I'll get back to you soon.
### Answer I can see from the available sources that Retell AI has a chat widget feature [(1) ]() [(2) ]() , but the specific troubleshooting steps and implementation details for the chat widget aren't fully covered in the sources I have access to. From the sources, I can confirm that Retell AI offers a Chat Widget that you can embed directly into your website . The setup involves copying and pasting an embed script, replacing the publicKey, agentId, and version, and customizing the widget name . However, since the widget isn't working despite following the basic setup, there could be several issues that aren't covered in detail in my available sources. Common troubleshooting areas typically include: - Domain configuration mismatches - Incorrect key formatting - Browser console errors - Agent configuration issues I don't have comprehensive troubleshooting documentation in my current sources to provide specific debugging steps. I could try to provide a general troubleshooting approach if you'd like, or you might want to check these resources for more detailed implementation guidance: - [Chat Widget, Custom Function Enhancement and more!]() [(2) ]() - [Platform Changelogs | Retell AI]() [(1) ]() - Visit [Contact Sales]() - Visit [) Would you like me to provide a general troubleshooting approach based on common web widget issues?
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] Chat Widget, Custom Function Enhancement and more!](https://www.retellai.com/changelog/chat-widget-custom-function-enhancement-and-more) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy No I'll just find a better platform
a
Thanks for the follow-up, @mc_53412. I'll get back to you soon.
The chat widget is designed to work without backend setup and uses the public key system for direct API calls from the frontend [(3) ]() [(4) ]() . If you'd still like to troubleshoot further, you can visit [Contact Sales]() or [) for additional support.
### Answer I understand your frustration. Before you make that decision, let me provide some specific troubleshooting steps based on the chat widget issues documented in the sources. Based on the Discord discussions, there are some common issues that can cause the chat widget to not respond [(1) ]() [(2) ]() : Domain Whitelisting Issues: The error "Public key is not allowed for this domain" suggests a domain configuration problem [(1) ]() . Make sure: - The exact domain where the widget is embedded matches what's whitelisted in your Retell dashboard - If using subdomains or paths, ensure the root domain is properly configured Chat Agent vs Webhook Configuration: There's a key difference between testing in the playground and the live chat widget [(2) ]() . The chat widget runs in a live environment with different authentication and execution behavior . Ensure: - Your chat agent is set up correctly - Custom functions are properly added - You're using the correct agent version in your widget Script Setup Verification: Double-check that your script tag includes all required attributes from the documentation [(3) ]() :
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="YOUR_AGENT_VERSION"
></script>
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Chat bot not responding](https://discord.com/channels/1186424376300679209/1384593638499160124) [[2] Webhook result with chat widget not working](https://discord.com/channels/1186424376300679209/1390651279885471764) [[3] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[4] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
m
@AI Evy your help is not working. Maybe I'll try VAPI
a
Thanks for the follow-up, @mc_53412. I'll get back to you soon.
### Answer I understand your frustration, but I should clarify that the sources I have access to are specifically about the Retell AI Agent API endpoints for managing agents programmatically [(1) ]() [(2) ]() [(3) ]() [(4) ]() , not about chat widget troubleshooting. The available sources cover JavaScript SDK methods for: - Getting agent versions using
client.agent.getVersions()
[(1) ]() - Listing all agents using
client.agent.list()
[(2) ]() - Updating agents using
client.agent.update()
[(3) ]() - Retrieving specific agents using
client.agent.retrieve()
[(4) ]() These are backend API operations for agent management, not frontend chat widget implementation or troubleshooting. For chat widget support and troubleshooting, you would need to: Visit [Contact Sales]() or [) Would you like me to provide a general answer about troubleshooting web widgets instead?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.