Vanilla JS (Browser Widget)
The VoiceBot talking widget drops onto any website with a single <script> tag and your public
key. There is no package here — the deployed bundle is plain JS that self-bootstraps from a
script tag.
<script
src="https://api.monoverse.tech/widget/widget-voice.js"
data-public-key="pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
async
></script>
That one tag is the entire integration. The deployed widget exchanges your pk_ (plus the
browser-set Origin) for an origin-locked session token, then mounts into its own Shadow DOM host,
grounded in your store's catalog. No merchant backend is required.
@monoverse/voicebot-vanilla packageChannels
This is Channel 2 — the browser widget for your end users. It is distinct from Channel 1 (server-side catalog/content sync, e.g. the Laravel package) that feeds the data the assistant is grounded in.
Origin locking
Your pk_ is bound to an allow-list of exact origins that may use it. Matching is exact, with
no wildcards — the origin is the security boundary.
- List every origin explicitly.
https://shop.example,https://www.shop.example, andhttps://app.shop.exampleare three different origins. wwwand subdomains are not inherited — register each one separately.- An origin is
scheme://host[:port].http≠https, and a non-default dev port is part of the origin, so register your local origins too (e.g.http://localhost:5173). Origin: nullis never accepted — sandboxed iframes,file://, and other opaque origins cannot mint a token.
The origin is checked twice: once when minting the session token (HTTP 403 on miss) and again on
the WebSocket upgrade (close code 4403 on miss). Both must see an allow-listed origin.
What the embed supports
Always available — a consultant grounded in your catalog: it answers product questions, recommends items, and describes your shipping and payment options from your store data.
Host actions (opt-in) — first-party actions like add to cart, variant selection, filtering, and
navigation into your app state. Set window.VoiceBotSyncBridge before the widget script tag to
wire them. See Capabilities & host actions for the full guide including
the complete bridge type reference.
Next steps
- Installation — the script tag, voice vs. chat, and the
window.VoiceBotAPI. - Provisioning — get a
pk_and register your origins. - Runnable example app — a complete
clone → runstatic HTML page with the one-tag embed.