Documentation Index
Fetch the complete documentation index at: https://docs.helloannie.com/llms.txt
Use this file to discover all available pages before exploring further.
Get Your Widget ID
Every bot in Annie has a unique Widget ID used to connect the chat widget to your assistant.Open the Annie Portal
Log in to your Annie Portal.
Install the Widget
Add the following snippet to your website. ReplaceYOUR_WIDGET_ID with your actual Widget ID. You can also find this install script in the widget settings in your Annie Portal.
Configuration
Most widget settings are managed from the Settings area of your Annie Portal. For per-page overrides, use the<annie-widget> element instead of the query-string install. Drop the widgetId parameter from the script URL and add an <annie-widget> element with your attributes:
<annie-widget> overrides the portal configuration for that page.
Position
Control where the chat bubble appears on your page.Default State
Control how the widget appears when the page first loads.default-state-mobile.
Delay
Wait a number of seconds before showing the widget when the page first loads.Mobile Margins
Adjust how far the chat bubble sits from the edges of the screen on mobile. Useful when your page has a sticky footer or bottom navigation the bubble would otherwise cover.margin-bottom-mobile and margin-side-mobile can also be set in the Annie Portal under the widget’s Advanced section. The attribute values override whatever is configured in the portal, so you can adjust placement per-page.
Inline Mode (Custom Position)
Instead of a floating bubble, you can embed the widget directly into your page layout. This is useful for landing pages, contact pages, or any place where you want the chat to be part of the page content. Setposition="custom" and the widget renders inline at its default size with no floating button.
Custom Size
Override the default dimensions withwidth and height attributes.
In inline mode, the widget is always visible — there is no open/close button. Use the JavaScript API below if you need to show or hide it programmatically.
JavaScript API
The widget exposes a global API atwindow.__annie.widget for programmatic control.
Full Example
Here’s a complete example with common options configured:Attribute Reference
| Attribute | Type | Default | Description |
|---|---|---|---|
widget-id | string | required | Your bot’s Widget ID |
position | "right" | "left" | "custom" | "right" | Where the widget appears. "custom" enables inline mode. |
default-state | "open" | "closed" | "preview" | "preview" | Initial state on desktop |
default-state-mobile | "open" | "closed" | "preview" | "closed" | Initial state on mobile |
delay | number | 0 | Seconds to wait before showing the widget |
margin-bottom-mobile | number | 20 | Space in px between the chat bubble and the bottom of the screen on mobile. Overrides the value set in the Annie Portal. |
margin-side-mobile | number | 20 | Space in px between the chat bubble and the side of the screen on mobile. Overrides the value set in the Annie Portal. |
width | string | "380px" | Widget width (inline mode only) |
height | string | "612px" | Widget height (inline mode only) |