SDKs & Integrations
Embeddable Widget
Add DokuBrain search and document chat to any website with a single script tag.
Embeddable Widget
The DokuBrain widget lets you embed document search and AI chat into any website. Your users can search your document corpus and ask questions — all within a chat interface on your site.
Quick setup
Add the widget to your site with a single script tag:
The widget appears as a floating chat button in the bottom-right corner.
Configuration
| Attribute | Type | Default | Description |
|---|---|---|---|
data-corpus-id | string | required | Corpus to search against |
data-api-key | string | required | Your API key |
data-theme | string | "light" | "light" or "dark" |
data-position | string | "bottom-right" | Widget position |
data-title | string | "Ask anything" | Chat window title |
data-placeholder | string | "Type a question..." | Input placeholder |
data-primary-color | string | "#0a0a0c" | Accent color |
JavaScript API
Control the widget programmatically:
Styling
The widget respects your data-theme and data-primary-color settings. For deeper customization, override CSS variables: