> ## Documentation Index
> Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an AI agent to your Framer site

> Embed your Chatbase AI agent on a Framer website using the website widget embed code

You can add your Chatbase AI agent to a Framer website by pasting the Chatbase **Website widget** script into Framer's **Custom Code** settings. A floating Chat Bubble then appears in the bottom corner and opens the chat when visitors click it. The Chat Bubble is included on every Chatbase plan, and you can add it to one page or to the whole site.

> [card] What you can do:
>
> Put your AI agent in front of every visitor to your Framer site, 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](https://chatbase.co/docs/user-guides/quick-start/your-first-agent.md).
* A Framer website project you can edit.

## How to embed your AI agent

**1. Copy your embed code**

1. Log into your Chatbase account and navigate to your [dashboard](https://www.chatbase.co/dashboard/).
2. On the list of available AI agents, click the one you want to integrate into your Framer website.
3. Click **Channels** in the left sidebar, then click **Manage** on the **Chat Bubble** card (or **Setup**, if you haven't configured it yet).
4. Click **Deploy** and select the **Website widget** embed type. Scroll down and click **Copy** to copy the provided script.

![The Deploy step showing the website widget embed code](https://mintcdn.com/chatbase/DnMdgLj-7YGWYAcx/user-guides/integrations/images/Integrations/deploy-step.png?fit=max\&auto=format\&n=DnMdgLj-7YGWYAcx\&q=85\&s=31b0448df7dee6c3ccc65eaf9bb47879)

**2. Open your Framer project**

Sign in to Framer, go to your project dashboard, and click the website project you want to embed your AI agent in.

![Selecting a website project in the Framer dashboard](https://mintcdn.com/chatbase/yfTgmAASFJyGs3D_/user-guides/integrations/images/framer/framer-4.png?fit=max\&auto=format\&n=yfTgmAASFJyGs3D_\&q=85\&s=e51f7ee035e6e02309b74a3c546521de)

**3. Open the page settings**

Locate the page you want the AI agent on in the left side of the editor, click the three-dot icon next to the page name, then click **Settings**.

![Opening page settings from the three-dot menu in Framer](https://mintcdn.com/chatbase/yfTgmAASFJyGs3D_/user-guides/integrations/images/framer/framer-5.png?fit=max\&auto=format\&n=yfTgmAASFJyGs3D_\&q=85\&s=4e0ea062e50ba7043939f6e8aa129071)

**4. Paste the embed code**

On the Settings page, scroll down to the section labeled **Custom Code**. Paste your embed code in the first box, labeled *"Start of \<head> tag"*, then click **Save** in the top-right corner of the panel.

![Pasting the embed code into the Custom Code section in Framer](https://mintcdn.com/chatbase/yfTgmAASFJyGs3D_/user-guides/integrations/images/framer/framer-6.png?fit=max\&auto=format\&n=yfTgmAASFJyGs3D_\&q=85\&s=7e56bf014d01256e82c8bf49cace1dc1)

> [!TIP]
>
> You should now see a floating Chatbase AI agent icon on your Framer website, on the page you added it to.

> [!TIP]
>
> Want the Chat Bubble on every page? Paste the script into your site-wide custom code in Framer's site settings instead of a single page's settings. Chatbase recommends loading it from a shared layout, and code added to one page may not run when visitors reach other pages by clicking links within your site.

![The Chatbase Chat Bubble live on a Framer website](https://mintcdn.com/chatbase/yfTgmAASFJyGs3D_/user-guides/integrations/images/framer/framer-7.jpg?fit=max\&auto=format\&n=yfTgmAASFJyGs3D_\&q=85\&s=5cf0db91175581c7223bfb46bae56644)

## Allow your framer.app address

If you turned on **Only allow embedding the agent on specific domains** in the **Specific domains** card of the **Deploy** sheet, add the Framer address you preview or stage on as well as your custom domain. For example (example values):

```text theme={null}
https://www.acme.com
https://acme.framer.app
```

Each entry matches one exact host, and an entry without `https://` or `http://` matches only https pages. `https://*.framer.app` also works, but it lets every Framer site embed your AI agent. See [Deploy button](https://chatbase.co/docs/user-guides/chatbot/channels.md#deploy-button).

## Troubleshooting

> [accordion] The Chat Bubble shows on one page but disappears on others
>
> This usually means the script was added to a single page's **Custom Code**, so it doesn't load on the other pages. Move it to your site-wide custom code, then publish again.

> [accordion] The Chat Bubble doesn't appear at all
>
> **Possible causes:**
>
> * **Specific domains** is on and the Framer address you're visiting isn't listed. The browser console shows a message starting with `[Chatbase] Agent` that says the agent is not allowed on that origin.
> * The visitor's country is in your [blocked countries](https://chatbase.co/docs/user-guides/chatbot/guardrails.md#blocking-a-country).
> * **Show to a percentage of visitors** is on under **Display > A/B testing**, and this visitor isn't in the sample.
> * The code was pasted into an embed component on the canvas instead of **Custom Code**. If Framer runs that component in its own frame, the bubble is clipped to the component's box.
>
> **Solution:** fix the matching setting, publish, and reload the published site.

> [!NOTE]
>
> 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

> [accordion] Should I add Chatbase to one Framer page or the whole site?
>
> The whole site, unless you only want the AI agent on specific pages. Site-wide custom code loads the script everywhere. For specific pages, paste it into the **Custom Code** of each of those pages.

> [accordion] Can I load the Chatbase script in the head on Framer?
>
> Yes. The script waits for the page to finish loading before it adds the Chat Bubble, so placing it at the start of the `<head>` tag works. Chatbase's dashboard suggests the end of the body, before the closing `</body>` tag, which also works.

> [accordion] How does the Chat Bubble look on mobile Framer layouts?
>
> The Chat Bubble doesn't follow your Framer breakpoints. Below 640px wide, the chat opens full screen; at 640px and above, it opens as a 406px-wide panel in the bottom corner.

> [accordion] Can I position the Chat Bubble anywhere on my Framer page?
>
> No. It stays at the bottom of the screen, on the left or the right. Pick a side with **Position** in **Display > Floating bubble**. See [Floating bubble](https://chatbase.co/docs/user-guides/chatbot/channels.md#floating-bubble).

## Next steps

> [card] [Customize the Chat Bubble](https://chatbase.co/docs/user-guides/chatbot/channels.md#chat-bubble-display)
>
> Match the widget to your brand colors, position, and copy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.