Quick Start
Add this script tag to any page where you want the chat widget to appear:Find Your Bot ID
- Go to your agent dashboard
- Navigate to Deploy
- Your Bot ID is shown in the embed code snippet
Data Attributes
You can configure the widget directly via data attributes on the script tag:| Attribute | Description | Default |
|---|---|---|
data-bot-id | (Required) Your agent’s UUID | — |
data-position | Bubble position: bottom-right or bottom-left | bottom-right |
data-open-style | Chat open behavior: normal, sidepanel, or dock | normal |
data-panel-width | Desktop sidepanel width in pixels | 400 |
data-dock-width | Desktop agent dock width in pixels | 720 |
data-push-page | Push the page when the sidepanel opens | true |
data-presentation-enabled | Allow media and files to open beside the sidepanel | true |
data-page-actions | JSON map of named safe page targets for guided walkthroughs | — |
data-user-token | Signed JWT for SSO user identification | — |
Sidepanel Layout
Use sidepanel mode when you want the agent to feel like a docked assistant instead of a floating modal:html element.
Fixed or sticky page chrome may sit outside normal layout flow. If a fixed header or nav does not move with the page, mark it explicitly:
data-boostgpt-push only for fixed, sticky, or absolutely positioned elements that should resize with the docked page. Regular content does not need it.
Agent Dock Layout
Use dock mode when you want the widget to feel like the hosted agent input: a centered prompt bar at the bottom of the page that expands into a wider chat panel.Framework Setup
Programmatic Initialization
For more control, initialize the widget via JavaScript:How It Works
- The script fetches your agent’s branding (accent color, avatar, greeting messages) from the BoostGPT API
- It injects a floating bubble button styled with your agent’s accent color and avatar
- Greeting messages from your branding settings appear as stacked chat bubbles above the button
- When clicked, an iframe opens with your agent’s full chat experience
- The chat supports all features: streaming, tools, file uploads, workspaces, and custom interfaces
Enable the Widget
Before the embed code appears on your Deploy page, enable the widget in your agent’s settings:- Go to Branding → Design tab
- Scroll to the Chat Widget section
- Toggle Enable Widget on
- Configure position and auto-open behavior