SQLBot can be embedded directly in your own web application as an interactive chat widget. Once embedded, your users can ask natural-language questions about your data without leaving your product. You control the appearance, the allowed domains, and which datasources are exposed.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dataease/SQLBot/llms.txt
Use this file to discover all available pages before exploring further.
Before you embed
You must create an Assistant in SQLBot before you can generate an embed snippet. The assistant holds the configuration for your embedded experience: which workspace and datasources are available, the UI theme, and the domain whitelist that controls where the widget can load.Create an assistant
In the SQLBot web UI, navigate to Applications and click Create. Give the assistant a name and select the workspace (
oid) it should query against.Configure allowed domains
In the assistant settings, add every domain that will host the widget to the Domain field. SQLBot validates the
Origin request header against this list on every embed request — requests from unlisted origins are rejected.Embedding modes
- Floating widget (pop-up)
- Inline iframe
The floating widget adds a chat button to the corner of your page. Clicking it opens the SQLBot chat panel as an overlay. This is the mode shown in the official demo page (The script self-initializes — no additional JavaScript is required. The widget respects your assistant’s UI configuration (colors, logo, welcome message).Full example (from the official demo):
sqlbot-assistant-demo.html).Add the following <script> tag to the <head> of your HTML page, replacing the id attribute with your assistant’s ID:How origin validation works
Every request from an embedded widget passes through the/system/assistant/info/{id} or /system/assistant/app/{appId} endpoint. SQLBot extracts the Origin header (falling back to the Referer header) and compares it against the assistant’s domain field using origin_match_domain.
From backend/apps/system/api/assistant.py:
Access-Control-Allow-Origin to the exact requesting origin, enabling the browser to load the widget. When validation fails, the request errors out before any data is returned.
The domain field supports multiple entries. Separate multiple allowed origins with a newline or comma in the assistant settings UI. Wildcards are not supported — each allowed origin must be listed explicitly.
Datasource visibility
By default, an online assistant exposes all datasources in its workspace to embedded users. You can restrict access by configuring apublic_list of allowed datasource IDs in the assistant’s configuration. When online is false and no public_list is set, the datasource list returns empty.
Customizing the widget appearance
The assistant UI can be configured from the SQLBot web interface under the assistant’s UI settings. Supported customizations include:- Logo image (
.jpg,.png, or.svg, maximum 10 MB) - Float icon (the chat button icon, same file type limits)
- Color theme and welcome message