Add an AI chatbot to your website
Add an AI chatbot to any website with one line of code. Pick one of six layouts and your colors, answer from your own pages, and see the limits on each plan.
On this page
An assistant is private until you publish it. Everything under the Share tab is about what happens after that.
Publish#
Press Publish. From then on the assistant answers people who are not signed in, up to your plan's monthly number of visitor answers. Unpublish at any time and the link and button stop answering at once.
Changes you make afterwards are not live until you publish again. That lets you test a change privately first.
The chat link#
Every published assistant has a link you can send or post. People chat without an account. Their questions show up in Insights, so you can see what they asked and what it could not answer.
The chat button on your website#
Paste one line just before </body> on any page.
<script src="https://your-behavior-address/widget.js" data-assistant="rb_…" async></script>
The exact line, with your assistant's token filled in, is under Share. A chat button appears in the corner of every page that carries the script. It only ever talks to your assistant and carries no tracking.
How it looks
Under Share → On your website, How it looks on your website shows the real chat on a stand-in page beside its settings. Save, and every site with the line shows the new look on its next page load. You never edit the line again.
- Floating circle. A round button in the corner, with a speech bubble, a question mark, a spark, or your logo.
- Button with words. A button that says what it is for, such as "Ask Acme".
- Pinned bar. A bar along the bottom of the window, like a minimized chat window, that opens upward into the chat.
- Side panel. It opens the full height of the page.
- In the page. It is always open, inside your page. Put
<div id="behavior-chat"></div>where it should sit. - Agent panel. A compact button in the corner that opens a tall panel above it, with a small square close button where the button was. The panel shows the name and greeting, a short note that AI answers can be wrong, and up to three numbered suggested questions (the assistant's own starter questions) above the message box. Along the top are Clear chat (Alt+Z) and, when you add a contact under When the chat is busy, Contact support (Alt+C). The keys work only while a visitor is inside the chat, so they never change how your own page responds to the keyboard. Tab stays inside the open panel and Escape closes it. It follows the theme you choose, and the send button takes your brand color.
You also choose the brand color (the button, the visitor's messages, and the send button, with text on it that turns dark or white to stay readable), a title bar in that color or plain, square, rounded, or very round corners, the font, the size, which corner and how far from the edge, light or dark, the name at the top, the greeting, the message box hint, and whether it opens by itself after a few seconds (once per visit). Upload a logo and it shows beside the name and, if you choose, on the button. On a phone the chat always fills the screen, with its own close button.
Sources under answers
Answers to visitors never name your files in their text. Switch on Show sources under answers and each answer lists the pages or files it used, underneath, by name only.
When the chat is busy
If an assistant reaches a limit (its daily visitor messages, the plan's month, or the AI on your account), or its AI service is overloaded, visitors are told the chat is busy and asked to try again in a few minutes. They are never shown your plan or your limits. Under When the chat is busy, visitors can reach a person at, add an email address, a phone number, or an https link, and visitors get that too, as a link they can tap. If the assistant has an alert channel, you hear about it once a day, with the reason.
One visitor can send up to 10 messages a minute, and one address up to 30 a minute and 300 a day to the same assistant, so no one person can use up the day's answers for everyone else.
Keep it to your own sites
Under Websites it may appear on, list your sites, one per line. Subdomains are included. Anywhere else, the button does not appear and browsers refuse to show the chat, so nobody can copy your line onto their site and spend your answers. Leave the list empty to allow any site.
Sites with strict security settings
Most sites need only the line. If your site sets a Content-Security-Policy and the button does not appear, allow Behavior's address for script-src, connect-src, img-src, and frame-src. The exact lines are under Does your site have strict security settings? in the same section. Added to a strict policy, they look like this.
Content-Security-Policy: default-src 'none'; script-src https://your-behavior-address; connect-src https://your-behavior-address; frame-src https://your-behavior-address; img-src 'self' data: https://your-behavior-address; style-src 'self'; require-trusted-types-for 'script'
Each one has a job. script-src loads the widget, connect-src lets it read its look, frame-src shows the chat, and img-src shows an uploaded logo. If your logo is an https address on another site, add that site to img-src too. Nothing else is needed. The widget adds no inline styles and no inline scripts, so style-src can stay 'self', and it works on sites that require Trusted Types. We test it on a site of our own that runs exactly this policy.
A page#
The Page builder makes a public page for the assistant. It has an introduction, example questions, and, for assistants over data, charts and tables that redraw from fresh data. It is good for a public report or a dashboard you want to share without handing out a login.
Posting answers and briefs#
Under Share you can have every public answer posted to a Discord or Slack channel. Scheduled briefs ask one question daily or weekly at a set hour and post the answer to Discord, Slack, or email.
Limits#
Each plan sets how many assistants can be published at once and how many visitor answers a month they can give between them. When the month's answers are used up, visitors are told the chat is busy (see When the chat is busy) until the next month. Free plans carry a small "Powered by Behavior" line on the chat. Paid plans do not. See Plans and usage.
Updated Nov 17, 2026