Framer
Add your agent to a Framer site using Custom Code.
Add your AI agent to a Framer site via Custom Code. The snippet loads on every page once published.
First, get your embed code from Chatbot > Channels in the dashboard.
Quick Setup
- Open your project in Framer.
- In the left sidebar, click Project Settings (the gear icon).
- Select the Custom Code tab.
- Click + Add Script.
- Give the script a recognisable name (e.g. Agentkit Widget).
- Paste your embed code into the script body.
- Under placement, choose End of
<body>tag (Body End) — this is the recommended option for chat widgets. - Choose to load on All pages.
- Click Save.
- Click Publish in the top-right to push the update live.
Example format (use the real values from Chatbot > Channels):
<script src="YOUR_WIDGET_URL" data-chatbot="YOUR_CHATBOT_ID" async ></script>
Why End of <body>, not Head
Framer separates Custom Code into Head Code and End of <body> Code. Chat widgets should go at the end of <body> so they don't delay the first paint of the page — this also matches the async attribute on the script.
Head Code is reserved for things that must run very early, like analytics pixels or font preloads.
Page-Specific Install
To load the widget on specific pages only:
- Select a page in the Framer layers panel.
- Open Page Settings (right-hand panel).
- Add Custom Code there instead of in Project Settings.
Page-level code only runs on that specific page.
Plans & Domains
- Custom Code is available on Framer sites but running it on a custom domain (not
*.framer.website) typically requires a paid plan. - The widget works on the default
*.framer.websiteURL if your plan allows Custom Code there.
After Publishing
Framer Custom Code does not run inside the editor or preview — only on the published site. After hitting Save, click Publish and then open the live URL.
Troubleshooting
Widget doesn't appear in the editor preview.
- Expected. Custom Code only runs on the published site.
Widget doesn't appear on the published site either.
- Confirm you clicked both Save and Publish.
- Confirm your domain is allowed in Chatbot > Channels > Security.
- Hard-refresh (⌘+Shift+R) to bypass CDN cache.
Widget flashes then disappears.
- Check for Framer's page transitions or animations that may reload the DOM. The widget should re-mount on each page load — if it doesn't, contact support.
Testing
- Open the published URL in an incognito window.
- Look for the chat bubble.
- Click to open and send a test message.
Next Steps
- Customize appearance in Design settings
- Set up domain restrictions (add your Framer site domain)
- Add suggested messages