Why Shadow DOM Matters
Most embeddable widgets inject CSS directly into your page, creating unpredictable style conflicts. kaag.ai uses the browser Shadow DOM API to completely encapsulate the widget styles. Your CSS cannot leak in and the widget CSS cannot leak out. This means the widget looks exactly the same whether your website uses Tailwind, Bootstrap, custom styles, or no framework at all. There is no need for !important overrides, specificity hacks, or z-index battles.
One-Line Installation
Adding the widget to your site takes one script tag and one custom HTML element. The script loads the web component definition, and the custom element renders the widget with your agent configuration. You pass your agent ID as an attribute, and the widget fetches its configuration, colors, welcome message, and system prompt from the kaag.ai API automatically. No build step, no npm install, no framework dependency.
Customization Options
- Primary and accent colors configurable through the admin panel with live preview
- Launcher icon supports custom SVG, emoji, or the default kaag.ai chat icon
- Welcome message and placeholder text set the tone for the visitor experience
- Position can be set to bottom-right or bottom-left to avoid conflicts with other page elements
- Pre-chat lead collection form gathers visitor name and email before the conversation starts
- Custom CSS injection available for advanced styling needs beyond the built-in options
Streaming and Interaction
Every AI response streams in real time, token by token, with an animated brain orb indicating that the AI is thinking. Visitors see the response building progressively rather than waiting for a complete answer. The widget supports markdown rendering, inline action cards, clickable links, and code blocks. On mobile, the widget expands to fill the viewport and includes a native-feeling header with a close button.