You can embed the Ask AI launcher outside your docs site so users can ask docs questions from another website or product surface.
The embedded assistant uses the same published docs context, API reference context, web page sources, and custom notes as the assistant on your docs site.
Basic embed
Add the embed script to the page where the assistant should appear:
Replace https://docs.example.com with your published docs domain.
Configure with data attributes
Use data attributes when the embedding page needs a small override.
Common options:
| Attribute | Purpose |
|---|---|
data-side | Show the launcher on the left or right side |
data-mode | Use light, dark, or system color mode |
data-exclude-paths | Hide the assistant on matching routes |
data-z-index | Adjust stacking when the host app has high overlays |
Configure globally
Set window.AssistantEmbedConfig before loading the script when you want to
configure shared values from JavaScript:
Route exclusions
Use route exclusions for pages where an assistant launcher would interrupt the experience, such as checkout, account setup, or admin-only flows.
Patterns can target one route, a route subtree, or a wildcard pattern:
When to embed
Embed Ask AI when users need documentation answers while they are using another surface, such as a product dashboard, onboarding flow, or support portal.
Do not embed the assistant in places where users expect account-specific support or private data lookup unless your docs context clearly explains what the assistant can and cannot answer.