Embed Cloosphere AI chat into external websites for customer support, internal system automation, and more.
A feature for embedding Cloosphere chat into external websites like internal portals, customer support pages, and groupware. With a single script tag, provide AI chat on any web page.
Fixed full-width panel at the bottom of the screen
320px height
Reduces html height by panel size → content reflows upward naturally
Inline
Inserted inside a specified HTML element
100%×500px
None (within specified container)
Fullscreen
Full screen overlay
100vw×100vh
Host page is hidden
Bubble mode is the most common choice. Used only when the user clicks, with auto-responsive sizing on mobile (≤480px).Side modes auto-shift host page content without separate CSS/JS. To opt-out of this, add the data-cloosphere-no-shift attribute to the host page’s root element.
Bubble mode’s Bubble Open Style also supports 4 options: popup / side-right / side-left / side-bottom. Start as Bubble and specify how to expand on click.
12 theme presets to apply all colors at once.Light, Dark, Slate, Midnight, Ocean, Aurora, Sunset, Forest, Rose, Cyberpunk, Ember, MonoAfter picking a preset, individual colors can be further customized.
// Open chat panelwindow.CloosphereEmbed.open();// Close chat panelwindow.CloosphereEmbed.close();// Replace token at runtimewindow.CloosphereEmbed.updateToken("new-jwt-token");
open() / close() only work in Bubble mode. They’re ignored in Side, Inline, and Fullscreen modes since the widget is always visible.
Non-signed-in users can use the widget with simple info entry (or auto). Suitable for unrestricted-audience scenarios like customer support chatbots.Guest Settings:
Setting
Description
Default
Collect Info
Show name/email entry form
on
Required Fields
Required input fields
name
Optional Fields
Optional input fields
email
Auto Proceed
Skip info collection and start session immediately
off
JWT Expires In
Guest JWT expiration
24h
Enabling Auto Proceed starts chat immediately without info collection. Suitable for anonymous FAQ chatbots.
Login / SSO / Guest are mutually exclusive. Only one can be activated.
The most powerful feature of the embed widget — the AI directly manipulates the host page DOM.For example, when a user says “submit a leave request for today”, the AI can auto-fill the host page’s leave request form.
Restrict the HTML elements the AI can manipulate using allowed_selectors in widget settings.
Setting
Behavior
["*"] (default)
All elements manipulable
["form#leave-form *"]
Only elements within a specific form
["#name", "#date", ".btn-submit"]
Only specified selectors
In production, explicitly restrict allowed_selectors. The default ["*"] lets the AI manipulate any page element, which can cause unintended behavior.
Cautions when using navigate_to
After navigate_to is called, host page navigation reloads the iframe and loses conversation context. Include guidance like “Don’t use additional tools after navigate_to” in the AI prompt.Within the same origin, soft navigation is attempted first. In SPAs (Single Page Applications), handling the cloosphere:navigate event enables routing without page transition.