Website Agents
Embed a chat (and optional voice) widget on any site.
Widget modes
| Mode | What the visitor gets |
|---|---|
| Chat | A floating text chat widget |
| Voice | A click-to-call in-browser voice button |
| Chat + Voice | Both — defaults to chat, with a phone button in the header to start a call |
The in-browser call reuses the same voice pipeline as phone calls: the browser captures the mic, streams 8 kHz μ-law audio over a WebSocket, and plays the agent's audio back — no phone number required.
Embedding the widget
Open a Website agent → Widget tab. Choose the mode, customize color/position/greeting, then copy one of three snippets (script tag, iframe, or React component):
<!-- Script tag -->
<script>
window.CustomwebAgent = { agentId: "YOUR_AGENT_ID", type: "both" };
</script>
<script src="https://agents.customweb.ai/widget/v1.js" async></script>Auto-greeting bubble
A few seconds after a visitor lands, the launcher can pop a small bubble with your greeting message to invite a conversation. It shows at most once per browser session, has a close (×) button, and auto-dismisses after 7 seconds so it never lingers over your page's own content.
Toggle it on/off per agent from Widget tab → Customization → Auto-greeting bubble. It's on by default and re-copying any embed snippet after changing it picks up the new setting.
Allowed domains (security)
The widget only runs on domains you allow-list (Widget tab → Allowed Domains). Requests from any other origin are rejected. Leave it empty to allow any site (not recommended). Entries match by host, so `https://example.com/path` and `example.com` are equivalent, and subdomains of an allow-listed domain are accepted.
Rate limits
The public website-chat endpoint is rate-limited per agent + visitor IP to keep costs predictable:
| Limit | Value |
|---|---|
| Messages per minute | 20 |
| Messages per day | 500 |
| Conversation history sent | Last 40 messages |
Exceeding a limit returns HTTP 429. Voice calls are additionally gated by your token balance.