Embedding & Rotating Keys
Add the widget to your site, and retire an embed snippet when you need to.
Adding the Widget to Your Site
Copy the Embed snippet from the agent's Assistant tab and paste it into your website's HTML, just before the closing </body> tag:
<script src="APP_URL/embed.js" data-agent="YOUR_PUBLIC_KEY" data-api="API_URL" data-origin="APP_URL" async></script>Use the exact snippet shown on the Assistant tab — it already includes your agent's real public key. Once it's in place, a chat bubble appears on your site that visitors can open and use.
A visitor's conversation with the widget is preserved across page reloads on your site, so refreshing the page doesn't lose their chat history.
Rotating the Public Key
Click Rotate public key on the Assistant tab to retire the current snippet. This generates a new key and a new snippet. Any site still using the old snippet stops working, so replace it with the new one everywhere it's embedded. This can't be undone.
The public key simply identifies which agent a widget connects to. Your connected accounts and credentials stay private — they're only used to run your agents, never exposed by the key.