| description | Embed your documentation in your product or website using the Docs Embed. |
|---|---|
| icon | window-restore |
The Docs Embed is a powerful window into your product knowledge that you can add to any product or website. Users can ask their questions to the GitBook Assistant or browse your docs directly, without leaving your product. You can open the Embed with a button, put it in any component you want, or control it completely programatically.
The Docs Embed consists of multiple tabs that get shown automatically, depending on your site's configuration:
- Assistant: The GitBook Assistant - an AI-powered chat interface to help users find answers
- Docs: A browser for navigating your documentation site
You can customize and override the default configuration with custom actions, tools, suggested questions, Authenticated Access, and more.
{% stepper %} {% step %} Prerequisites
Before embedding your docs, ensure:
- Your docs are published and accessible at a URL (e.g.,
https://docs.company.com). - You have retrieved the embed script URL from your site settings (Settings → AI & MCP → Embed).
{% hint style="info" %} If you want to use the Assistant tab, GitBook Assistant must be enabled for your docs site (Settings → AI & MCP). {% endhint %} {% endstep %}
{% step %} Implementation
Pick the approach that matches your setup:
| Standalone script tag | Drop in a <script> tag for the fastest setup, then customize its appearance | script.md | |
| Node.js/NPM | Install via NPM for server-side rendering or build-time control | nodejs.md | |
| React component | Use prebuilt React components for seamless integration | react.md |
{% hint style="info" %} If your docs use Authenticated Access, follow the steps in how to set up the embed with authenticated docs. {% endhint %} {% endstep %}
{% step %} Configuration
- Customizing the Embed – Add welcome messages, custom actions, and suggestions
- Creating custom tools – Connect Assistant to your product APIs {% endstep %} {% endstepper %}
For the complete API reference and source code, see the @gitbook/embed package on GitHub.
