Reference

Embed Types

Five ways to embed your agent. Pick the one that fits your product.

Bubble Sidebar Popup Inline Headless
Self-contained UI
Overlays content No Optional Yes No N/A
Always visible No No No Yes N/A
Programmatic control Partial Partial
Custom HTML/CSS Themes Themes Themes Themes Full

Bubble

Default

A floating action button fixed to a corner of the screen. Opens a chat panel on click. The easiest way to add Widgent to any page.

Best for: General SaaS apps, support flows, onboarding helpers.

js / html
<script src="https://cdn.widgent.app/index.global.js"
  data-product-id="YOUR_PRODUCT_ID"
  data-embed="bubble"
  async>
</script>
OptionValue
position"bottom-right" | "bottom-left" | "top-right" | "top-left"
offsetXnumber (px from edge)
offsetYnumber (px from edge)
size"sm" | "md" | "lg"

Inline

The chat renders directly into a container element you place in your HTML. Always visible — no button to click.

Best for: Dedicated help/support pages, AI-powered search, product guides.

js / html
<!-- Place this in your HTML where you want the widget -->
<div id="widgent-inline" style="height: 520px;"></div>

<script src="https://cdn.widgent.app/index.global.js"
  data-product-id="YOUR_PRODUCT_ID"
  data-embed="inline"
  data-target="#widgent-inline"
  async>
</script>
OptionValue
targetCSS selector for the container element
heightInherit from container (set via CSS)

Headless

Advanced

No UI at all. Widgent provides the connection, session management, and tool routing — you build your own interface completely.

Best for: Fully custom chat UIs, deeply integrated agent experiences.

js / html
window.widgent.init({ productId: 'YOUR_PRODUCT_ID', serviceKey: 'YOUR_SERVICE_KEY', type: 'headless' });

// Send a message with streaming callbacks
window.widgent('send', {
  message: 'Show my recent orders',
  onChunk:    (text)            => appendToUI(text),
  onToolCall: (name, params)    => handleTool(name, params),
  onDone:     (fullText)        => finalizeMessage(fullText),
  onError:    (err)             => showError(err),
});
OptionValue
All UI is your responsibility
Eventswidgent:ready, widgent:message, widgent:tool-call