Website Agents

Embed a chat (and optional voice) widget on any site.

Widget modes

ModeWhat the visitor gets
ChatA floating text chat widget
VoiceA click-to-call in-browser voice button
Chat + VoiceBoth — 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>
Important · The mode is baked into the snippet (type: "chat" | "voice" | "both"). If the phone button doesn't appear, your snippet is set to "chat" — re-copy it with Chat + Voice selected.

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:

LimitValue
Messages per minute20
Messages per day500
Conversation history sentLast 40 messages

Exceeding a limit returns HTTP 429. Voice calls are additionally gated by your token balance.