What you can do:
Put your AI agent in front of every user of your Bubble app, answering questions without them leaving the page.
Before you start
- A Chatbase account with an AI agent. If you haven’t built one yet, follow Your first AI agent.
- A Bubble app you can edit.
How to embed your AI agent
1
Copy your embed code
- Log into your Chatbase account and navigate to your dashboard.
- On the list of available AI agents, click the one you want to integrate into your Bubble app.
- Click Channels in the left sidebar, then click Manage on the Chat Bubble card (or Setup, if you haven’t configured it yet).
- Click Deploy and select the Website widget embed type. Scroll down and click Copy to copy the provided script.

2
Open your Bubble app editor
Sign into Bubble, go to your account dashboard, pick the app you want to embed the AI agent on, and click Launch Editor.

3
Add an HTML component
Scroll to the section of the page where you want the AI agent. On the left sidebar of the editor, locate the HTML component and drag it onto the page.

4
Paste the embed code
Double-click the HTML component to reveal the code editor, then paste the embed code. You should automatically see a floating AI agent icon on the editing canvas.

Preview your Bubble app and confirm the Chat Bubble appears and your AI agent responds.

Show the AI agent on every page of your app
The HTML element only loads the script on the page it sits on. To show the Chat Bubble on several pages, put the HTML element in a reusable element that appears on each of those pages, such as a shared header. Once the script has loaded, the Chat Bubble attaches to the page itself, not to the HTML element, so the element can be small and placed anywhere in the header.Allow your bubbleapps.io address
If you turned on Only allow embedding the agent on specific domains in the Specific domains card of the Deploy sheet, list each host your app runs on. For example (example values):bubbleapps.io entry covers both the development version (/version-test) and the live version of your app. A custom domain needs its own entry. An entry without https:// or http:// matches only https pages. See Deploy button.
Troubleshooting
The Chat Bubble doesn't appear in preview or on the live app
The Chat Bubble doesn't appear in preview or on the live app
Possible causes:
- Specific domains is on and your app’s host isn’t listed. The browser console shows a message starting with
[Chatbase] Agentthat says the agent is not allowed on that origin. - The visitor’s country is in your blocked countries.
- Show to a percentage of visitors is on under Display > A/B testing, and this visitor isn’t in the sample.
You can customize the appearance and colors of your AI agent on your Chatbase dashboard. Go to your dashboard, choose an AI agent, click Channels in the left sidebar, click Manage on the Chat Bubble card, then open the Display tab to edit Content, Capabilities, Colors, Floating bubble, and Localization.
Frequently asked questions
Does hiding the HTML element hide the Chat Bubble?
Does hiding the HTML element hide the Chat Bubble?
Not once the script has run. The Chat Bubble is added to the page itself, outside the HTML element, so hiding or collapsing the element afterwards leaves the bubble in place. Whether the script runs at all when the element starts hidden depends on how Bubble handles hidden elements.
Do I need separate setups for version-test and live?
Do I need separate setups for version-test and live?
No. Both versions use the same script. If you use Specific domains, one entry for your
bubbleapps.io host covers both, because paths are ignored.How does the chat behave for mobile users of my Bubble app?
How does the chat behave for mobile users of my Bubble app?
Below 640px wide, the chat opens full screen and the page behind it stops scrolling while it’s open.
Can I pass the logged-in Bubble user to the AI agent?
Can I pass the logged-in Bubble user to the AI agent?
The Chat Bubble script supports identity verification, which lets your app tell Chatbase who the user is. Follow that guide to add it to your Bubble app.
Next steps
Customize the Chat Bubble
Match the widget to your brand colors, position, and copy.