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://customweb-agents.vercel.app/widget/v1.js" async></script>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.