# Put your AI agent on your website with one script tag.

An embeddable chat widget that runs the same assistant, knowledge, and tools as your other channels. Paste one snippet, theme it to your brand, and every conversation lands in the same inbox and contact record.

## What it does

### One script tag, isolated from your site

The install is one script tag with your widget ID. The bundle mounts in a shadow DOM so your CSS and the widget's never collide, and an error boundary means a failure renders nothing, not a broken page. Config loads at runtime, so dashboard edits ship without a site deploy.

- Copy the snippet from the widget configurator
- Shadow DOM keeps host-page CSS out of the widget
- Saved changes apply without redeploying your site

### Theme it in the dashboard, preview it live

Set brand color, logo, avatar, launcher icon, dark mode, and one of three corner themes. Write the intro message, teaser greeting, and suggested prompts. The preview pane mounts the actual production bundle against your saved config, so what you see is what visitors get.

- Three corner themes: rounded, soft, sharp
- Four launcher positions, three launcher sizes
- Live preview mounts the real widget.js bundle
- Per-widget suggested prompts and teaser greetings

### Same agent, same memory as every channel

Widget turns run the channel gateway: identity resolution, blacklist checks, threading, persistence, then the same brain that answers SMS and voice. Chats persist to the same conversations table, and visitors who share an email or phone get a contact record your team works from.

- Chats land in the same inbox as SMS and voice threads
- Visitors who share email or phone become contacts
- Returning visitors resume open threads for 6 hours
- Flow-backed and prompt-based assistants both work

### Human handoff without a second tool

Flip on handoff and a person can take over any conversation from the inbox. The AI stops replying the moment takeover is set, the widget polls for operator messages every 2 seconds, and visitors see a typing indicator with the agent's name. Choose support or transparent mode.

- AI reply gates check takeover on every turn
- Operator replies reach the widget in seconds
- Two handoff modes: support and transparent

### Locked to your domains, rate limited

An allowlist controls which sites a widget answers, with wildcards like *.example.com, checked on every chat request. Each widget and origin pair is capped at 60 requests per minute, messages at 8,000 characters, and the server ignores client-supplied assistant IDs.

- Wildcard entries like *.example.com cover subdomains
- 60 requests per minute per widget and origin
- Blocked contacts are rejected before anything persists

### Voice calls, files, and rich replies

Chat is not the ceiling. Widgets can offer browser voice calls over WebRTC to the assistant's voice agent, accept file attachments with client-side image compression, render markdown replies, and gate chat behind a pre-chat form when you need contact details first.

- Browser voice calls connect over WebRTC
- Images compress client-side before upload
- Replies render markdown, including tables and lists
- Pre-chat form fields are configurable per widget

## Under the hood

- **INSTALL:** One script tag with data-widget-id, pasted before the closing body tag
- **ISOLATION:** Shadow DOM mount plus an error boundary; a widget crash renders nothing on the host page
- **ROUTING:** Every turn runs the channel gateway: identity, blacklist, threading, persistence, brain
- **RESUME:** Open threads resume for returning visitors within a 6-hour idle window
- **DOMAINS:** Per-widget allowlist with exact and wildcard matching, enforced server-side on every chat request
- **LIMITS:** 60 requests per minute per widget and origin; 8,000-character message cap
- **HANDOFF:** Takeover halts the AI mid-conversation; operator replies poll to the widget every 2 seconds

## FAQ

**How does the widget share memory with SMS and voice?**

All channels write to one conversations table through the gateway's persistence layer. Visitors who volunteer an email or phone get a contact created, and returning visitors resolve back to it; unverified visitors are never linked to existing contacts. The same assistant, knowledge bases, and tools answer every channel.

**What does it cost?**

Widget messages bill at $0.02 per message and browser voice calls at $0.07 per minute. Signup is free pay-as-you-go.

**Will it slow down or break my site?**

The snippet sits before the closing body tag, so your content renders first, and the widget mounts in a shadow DOM, so styles never collide. If the widget errors, an error boundary renders nothing rather than a broken page. Runtime config is served with a five-minute cache header, so repeat loads hit cache.

**What is required before the widget answers visitors?**

A widget must have an assistant assigned; without one the chat endpoint returns an error instead of guessing. For browser voice, the assistant also needs a voice agent configured. Domain allowlisting is optional but recommended: an empty list allows any site.

**Can my team take over from the AI?**

Yes. Takeover from the inbox stops AI replies immediately; the check runs on every turn. The widget polls for operator messages and shows the agent's name and a typing indicator. When the conversation closes, the widget sees the closed status and stops.

---
Source: https://www.assistable.ai/platform/widgets