https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I embed a chat agent into a website
# ❓・ai-evy-support
t
@AI Evy how do I embed a chat agent into a website?
a
Thanks for tagging me @thisisalbe. I'll look through relevant sources and get back to you shortly.
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] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
### Answer To embed a Retell chat agent into your website, add the following script tag to your HTML within the
<head>
tag [(1) ]() :
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_RETELL_CHAT_AGENT_ID"
 data-agent-version="0"
 data-title="YOUR_CUSTOM_TITLE"
></script>
Required attributes: -
data-public-key
- Your Retell public key -
data-agent-id
- Your chat agent ID Optional attributes: -
data-agent-version
- Agent version (if unset, uses latest version) -
data-title
- Custom chat window title -
data-logo-url
- URL of your logo image -
data-color
- Hex color code for widget theme (e.g., "#FFA07A") -
data-bot-name
- Bot name for popup messages -
data-popup-message
- Popup message before users open chat -
data-show-ai-popup
- Set to "true" to enable popup messages -
data-show-ai-popup-time
- Seconds to delay before showing popup (default: 0) -
data-auto-open
- Set to "true" to auto-open chat widget on page load -
data-dynamic
- JSON string with dynamic variables for the chat agent -
data-recaptcha-key
- Google reCAPTCHA v3 site key for bot protection The widget displays as a floating button with a robot icon in the bottom right corner . When clicked, it opens a chat interface where users can interact with your agent .