How-toChat widgetKnowledge baseSaaS

Add AI Chat to Your Docs Site: Docusaurus, GitBook, Mintlify, ReadMe

How to add AI chat to a docs site: what GitBook, Mintlify and ReadMe assistants cost in 2026, and script-tag setups for Docusaurus, MkDocs, Starlight and Hugo.

PepoChat TeamPublished Last verified 13 min read
A long library aisle between tall shelves packed with books, lit by bright windows at the far end

Short answer

As of October 2026, hosted docs platforms sell AI chat on upper plans: GitBook's chat assistant needs Ultimate ($249 per site a month plus $12 per user, billed annually) and spends 20 credits per answered question, Mintlify's assistant needs Pro ($450 a month, billed annually) at 25 credits per answer, and ReadMe's Ask AI is a $150-a-month add-on. Docusaurus, MkDocs, Docsify, Starlight, Hugo and Jekyll ship no assistant, so you add an AI support agent with one script tag.

Your documentation already answers many product questions, if readers find the right page. An AI chat lets them ask in their own words instead, which is why GitBook, Mintlify and ReadMe now sell assistants, and why people search for a Docusaurus chatbot plugin: none of Docusaurus's 15 official plugins is a chat.

This guide is for SaaS founders, developer advocates and support leads whose docs run on one of those platforms or an open-source generator. It compares the built-in assistants, gives the config for adding your own agent to each generator, and covers keeping answers current, the questions docs cannot answer and the handoff to a person.

PepoChat is our product; its behaviour below was checked in its code and documentation on 22 October 2026. Vendor prices come from each vendor's pricing page and config syntax from each project's documentation, read the same day. We wrote the snippets from that documentation, not from test builds, so try them on a preview deploy first.

Why are documentation sites good ground for an AI chatbot?

Documentation sites suit an AI chatbot better than most parts of a website, because docs are written to answer questions, organised one topic per page, published as plain HTML and updated with every release.

A docs assistant is an AI chat that answers from your documentation by retrieval: it searches the docs for the passages closest to the question and writes the reply from those passages only. Our guide to formatting docs for an AI chatbot shows the rewrites that help most, and the same rules apply to any self-service help center.

Three things make docs harder than they look. Versions: an assistant that reads every version can quote an option that changed two releases ago. Scope: docs explain the product, not one customer's account or whether a behaviour is a bug. Rendering: a few generators build pages in the browser, so an importer that runs no scripts finds an empty page.

Which docs platforms include an AI assistant, and what does it cost?

As of 22 October 2026, GitBook, Mintlify and ReadMe each sell an AI assistant for published docs on a different meter, Docusaurus supports one through Algolia's DocSearch, and MkDocs, Docsify, Starlight, Hugo and Jekyll have none.

PlatformAI chatPlan and price per monthMeterIncluded each month
GitBookAI Assistant Ask, answers in the search boxEssential: $65 per site + $12 per user, billed annually20 credits per relevant question2,000 credits, about 100 questions
GitBookAI Assistant Chat, a chat sidebarUltimate: $249 per site + $12 per user, billed annually20 credits per relevant question10,000 credits, about 500 questions
MintlifyAssistantPro: $450 billed annually, $540 billed monthly25 credits per answer, none when it cannot answer10,000 credits, 400 answers
ReadMeAsk AI LitePro: $250, billed annuallyNo per-answer meter listedNot stated
ReadMeAsk AI, with custom tone, model and analyticsAdd-on on any plan: $150No per-answer meter listedNot stated
DocusaurusAlgolia DocSearch Ask AIDocSearch free for accepted docs; no Algolia fee for Ask AIYour model provider's billNot applicable
PepoChatYour own AI support agentFree $0, Starter $49, Growth $149Every AI reply, follow-ups included200, 2,000 or 10,000 replies

Prices from each vendor's pricing page and documentation, checked 22 October 2026.

GitBook splits its assistant in two: AI Assistant Ask puts short answers in the search box from Essential, and AI Assistant Chat, a full sidebar, needs Ultimate. Both spend 20 credits per relevant question, and GitBook's pricing page says usage auto-pauses when credits run out; packs start at $47.50 for 5,000 credits. At 300 answered questions a month, a one-editor Essential site needs 6,000 credits: $65, plus $12 for the editor, plus one pack, or $124.50. GitBook's calculator prices one Ultimate site with one user at $261, enough for about 500 questions.

Mintlify includes its assistant only on Pro, listed on its pricing page at $450 a month billed annually or $540 monthly. Pro adds 10,000 credits a month and an answer costs 25, while a reply that says it cannot answer is free, so the allowance covers 400 answers. Overages are off by default and cost $0.01 a credit when on; with them off, the assistant goes unavailable until the balance resets. The free Starter plan has no AI features.

ReadMe includes Ask AI Lite on Pro ($250 a month) and sells the full Ask AI for $150 a month on any plan, including the free Starter, according to its pricing page. Its documentation says Lite runs the same default model without tone settings, model choice, analytics or API access. Neither lists a per-answer meter, and content is re-indexed every two hours.

Docusaurus has no assistant of its own. Its search documentation says Algolia DocSearch's Ask AI comes "at no additional cost", with you paying your own model provider, and DocSearch is free for developer docs accepted into its program.

AssistantCites its sourcesHuman handoffKnowledge beyond the docs
GitBookSearch-box answers list their sourcesNone built in; a Docs Embed custom tool can open your support chatUltimate: connections such as GitHub, Slack and websites, plus MCP servers
MintlifyYes, with links to the pagesA contact form emailed to your team, or a link to your support pageWeb search on domains you allow; external sources on Enterprise
ReadMe Ask AIYes, with links to the source pagesNot described; Intercom and Zendesk widgets on every planAdd-on: up to 100,000 characters of custom knowledge
Algolia Ask AI on DocusaurusAnswers "with real sources", per AlgoliaNot describedWhat your Algolia index holds
PepoChatNo, replies do not show their sourcesTeam inbox, email-first mode, Slack, Zendesk and Jira actionsWebsite, files, Notion, Google Drive and live lookups

Checked 22 October 2026 in each vendor's documentation.

API references favour the built-ins: Mintlify's assistant reads your OpenAPI specification for methods, parameters and schemas, while PepoChat would store an uploaded JSON spec as plain text, so import the rendered API pages too. Dedicated docs chatbots sit in between; our DocsBot comparison covers one with cited answers and a credit meter.

How do you add an AI chatbot to Docusaurus?

To add an AI chatbot to Docusaurus, list the chatbot's loader script in the scripts array of docusaurus.config.js, whose object form accepts any attribute, including PepoChat's data-organization-id.

// docusaurus.config.js
export default {
  // ...the rest of your config
  scripts: [
    {
      src: "https://widget.pepochat.com/widget.js",
      async: true,
      "data-organization-id": "YOUR_ORGANIZATION_ID",
    },
  ],
};

Docusaurus's configuration reference says these tags go in the page head, that any attribute besides src is permitted, and that they block rendering unless you add async or defer. A config that still uses module.exports takes the same entry. Your Organization ID is on the Widget Setup page of the PepoChat dashboard.

PepoChat's loader copes with the early start by waiting for the document before drawing its launcher. Docusaurus renders inside its own root element and changes pages without a full reload, so the launcher, which the loader adds to the page body, stays put between pages. Load the script in one place only: a second copy logs "already initialized" and does nothing.

Hands typing on a silver laptop keyboard at a wooden table, with a yellow notebook blurred in the foreground
On most generators the chatbot is one edit in one file: the script tag stays the same, and only the file that carries it changes.

How do you add a chat widget to MkDocs or Material for MkDocs?

MkDocs cannot put a data attribute on a script through extra_javascript, so either load a small loader file from extra_javascript or override the theme's scripts block with a complete script tag. Both routes work with the default theme and with Material for MkDocs.

The MkDocs configuration docs say extra_javascript lists JavaScript files from your docs folder, and since version 1.5 an entry can be a mapping with path, type, async and defer, nothing more. A loader file sets the attribute itself:

# mkdocs.yml
extra_javascript:
  - javascripts/pepochat.js
// docs/javascripts/pepochat.js
(function () {
  var script = document.createElement("script");
  script.src = "https://widget.pepochat.com/widget.js";
  script.async = true;
  script.setAttribute("data-organization-id", "YOUR_ORGANIZATION_ID");
  document.body.appendChild(script);
})();

This is the JavaScript snippet from PepoChat's Widget Setup page. It works because the loader reads its settings from the script element that runs it.

For the override, MkDocs' theme guide says to create main.html in a custom_dir, extend base.html and redefine a block, calling super() so the theme keeps its own scripts:

# mkdocs.yml
theme:
  name: material
  custom_dir: overrides
<!-- overrides/main.html -->
{% extends "base.html" %}
{% block scripts %}
  {{ super() }}
  <script
    src="https://widget.pepochat.com/widget.js"
    data-organization-id="YOUR_ORGANIZATION_ID"
    async
  ></script>
{% endblock %}

Material's instant navigation (navigation.instant) loads pages without a full reload. In Material's source, each navigation swaps the page container and a few header parts and re-runs only the scripts inside that container, while the scripts block, home of extra_javascript, sits outside it. Either route loads the widget once per visit. Keep the snippet out of document$ subscriptions, which Material's docs suggest for code that must run on every page.

How do you add the script to Docsify, Starlight, Hugo and Jekyll?

Docsify, Astro Starlight, Hugo and Jekyll all accept a plain script tag with data attributes, so adding a chatbot means pasting PepoChat's tag into the one file each tool includes on every page.

Docsify

Docsify has a single index.html. Paste the tag after Docsify's own script, before </body>, rather than in a plugin hook that runs on every route change:

<!-- index.html -->
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      // your settings
    };
  </script>
  <script src="//cdn.jsdelivr.net/npm/docsify@5"></script>
  <script
    src="https://widget.pepochat.com/widget.js"
    data-organization-id="YOUR_ORGANIZATION_ID"
    async
  ></script>
</body>

Astro Starlight

Starlight's head option adds tags to every page. Its configuration reference shows an analytics script with a data-site attribute in this shape and notes that head entries skip Astro's script processing:

// astro.config.mjs
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";

export default defineConfig({
  integrations: [
    starlight({
      title: "My Docs",
      head: [
        {
          tag: "script",
          attrs: {
            src: "https://widget.pepochat.com/widget.js",
            "data-organization-id": "YOUR_ORGANIZATION_ID",
            defer: true,
          },
        },
      ],
    }),
  ],
});

Hugo

Put the tag in a partial and call it from your base template, just before the closing body tag:

<!-- layouts/_partials/pepochat.html -->
<script
  src="https://widget.pepochat.com/widget.js"
  data-organization-id="YOUR_ORGANIZATION_ID"
  async
></script>
<!-- layouts/baseof.html, just before </body> -->
{{ partial "pepochat.html" . }}

Hugo picks templates from your project's layouts folder ahead of the theme's, so a copy of the theme's base template with that line overrides it. Hugo v0.146.0 renamed layouts/partials to layouts/_partials; older sites use the old name. The Docsy theme spares you the copy: a hooks/body-end.html partial in your project is included at the end of every page.

Jekyll

Jekyll's theme docs say a file in your site's _layouts or _includes folder overrides the theme file of the same name. Just the Docs has a ready slot: _includes/head_custom.html goes in before the closing head tag, and with async the loader waits for the page body.

<!-- _includes/head_custom.html (Just the Docs) -->
<script
  src="https://widget.pepochat.com/widget.js"
  data-organization-id="YOUR_ORGANIZATION_ID"
  async
></script>
Docs toolWhere the tag goesTakes data-organization-idWatch for
Docusaurusscripts in docusaurus.config.jsYes, in the object formLands in the head: add async
MkDocs, MaterialA loader file in extra_javascript, or the scripts block in overrides/main.htmlOnly through the loader file or the overrideKeep it out of document$
Docsifyindex.html, before </body>YesPages render in the browser: import the Markdown
Starlighthead in astro.config.mjsYes, in attrsEntries skip Astro's processing
VitePresshead in the VitePress configYesAttribute values are strings
Sphinxhtml_js_files in conf.pyYes, as an attributes dictionaryFull URLs are allowed
HugoA partial called from the base templateYes_partials since v0.146.0
JekyllAn _includes or _layouts overrideYesJust the Docs: head_custom.html
MintlifyAny .js file in the docs folderThrough a loader fileEvery plan; runs once per visit
ReadMeCustom JavaScript settingThrough loader codeEnterprise only
GitBookNowhereNoOnly GitBook-built integrations add scripts

Config keys from each project's documentation, read 22 October 2026.

Can you add your own chatbot to GitBook, Mintlify or ReadMe?

You can add your own chat widget to a Mintlify site on any plan and to ReadMe on Enterprise, but not to GitBook, whose developer docs say custom JavaScript cannot be injected into a published site.

Mintlify includes any .js file in your docs folder on every page once the page is interactive, and its custom scripts docs recommend creating script elements from code rather than pasting tags into pages:

// pepochat.js, in the folder that holds docs.json
const script = document.createElement("script");
script.src = "https://widget.pepochat.com/widget.js";
script.async = true;
script.setAttribute("data-organization-id", "YOUR_ORGANIZATION_ID");
document.body.appendChild(script);

The file runs once per visit, since Mintlify swaps page content without reloading. With Mintlify's own assistant also on, readers see two chat buttons, so pick one or connect them through link deflection.

ReadMe lists custom JavaScript on Enterprise only. Its docs say the hub is a single-page app, so the code runs once when the hub loads, and the loader code above fits. On Starter and Pro, ReadMe's Intercom and Zendesk integrations are the supported chat widgets.

GitBook's integration manifest docs reserve script injection for GitBook's own integrations and say integrations that inject JavaScript are not possible at this time. Chat widgets arrive only through GitBook-built integrations, such as the one that displays Crisp's widget. With an outside agent, link its hosted chat page from your docs (PepoChat's needs Allow the hosted chat page switched on when you use allowed domains), and import the GitBook content into the agent on your marketing site.

How do you keep a docs chatbot up to date?

Keep a docs chatbot current by importing the docs from their sitemap with path filters, letting the weekly re-fetch catch edits, and refreshing by hand after each release.

PepoChat's sitemap import takes up to 200 addresses, follows a sitemap index one level down and accepts include and exclude paths: /docs/next matches that folder and everything under it, * matches any characters, and exclusions win. The whole import counts as one knowledge source; the add your website docs compare it with a crawl.

Versions are the classic trap. Docusaurus's versioning docs put the latest release at /docs/, the unreleased version at /docs/next/ and older releases at paths such as /docs/1.0.0/. Suppose your sitemap lists 260 pages: 170 current, 50 under /docs/next and 40 under /docs/1.0.0. Exclude those two paths and the import takes the 170 current pages, leaving the agent one version to quote. Past 200 pages, split the docs across two imports with different include paths; a second import of a site already in the knowledge base counts as the same source.

PepoChat then re-fetches website pages weekly and re-indexes only pages whose words changed. After a release, click Sync website pages, and click Import again on the import's card when you have added pages, because a sync refreshes only pages the agent already has. For pages that still go unanswered, the guide to "I don't know" replies lists twelve common causes.

Most generators write the sitemap for you: Docusaurus's classic preset on production builds, MkDocs once site_url is set (Material's docs say it stays empty otherwise), Starlight once you set site (Astro names it sitemap-index.xml), and Hugo at the root of its output folder.

Docsify is the exception. Its README says it builds no HTML files and parses your Markdown in the browser, so its pages' HTML holds almost no text. Import the Markdown instead: links to the .md addresses rather than the #/ ones, up to 20 per import and one knowledge source each, or uploads of up to 25 MB. PepoChat stores Markdown as written and re-fetches links weekly, but not uploads.

llms.txt is a proposed Markdown file at a site's root that lists its key pages for AI tools; Jeremy Howard published the proposal in September 2024. GitBook generates llms.txt and llms-full.txt, the whole docs in one file, on every plan, and Mintlify generates both automatically. Mintlify's own llms-full.txt measured 1.6 MB on 22 October 2026, under PepoChat's 5 MB page limit, so a whole docs site can enter as one link.

What questions can't a docs chatbot answer from the docs?

A docs chatbot cannot answer questions whose answers live outside the docs: what a plan costs, what one customer's account shows, whether a behaviour is a bug, and whether the service is down right now.

Pricing is the easy one: import the pricing page from your marketing site as its own source. Account questions need a live lookup. PepoChat's Stripe action finds a customer by email and checks their subscription; it can also cancel at period end, which most docs sites should leave off. Lookups are not gated by email verification: an action's instructions can make the agent ask for the code, but the agent is never told whether the visitor verified, so connect only lookups you would answer for anyone who knows the email. The SaaS support guide goes deeper.

Bug reports need more than an answer. With Jira connected, the agent files a Task with a summary, the details and the visitor's email and tells the visitor the issue key, as the Jira integration docs describe; there is deliberately no status check. For an outage, the Slack action alerts a channel after the agent escalates.

GitBook's Ultimate plan reaches the same ground another way: its docs suggest connecting MCP servers for live account state and for actions such as filing bugs.

How should a docs chatbot hand a reader to a person?

A docs chatbot should hand off with a way to reach the reader later, because docs readers are usually anonymous and many are not signed in to your product while they read.

PepoChat cannot receive the identity of a user signed in to your app, so every chat starts anonymous. Set lead capture to ask for an email right before a handoff, and choose the Team availability mode that fits. For a small team, "No one answers live chat, we follow up by email" makes the agent ask once for an email whenever it needs a person, without promising a live reply, and the AI keeps answering in every mode.

The escalated chat lands in the team inbox and your team is emailed. Inbox replies are not emailed to the visitor, so for a reader who left, use the alert's Reply by email button. A helpdesk team can use the Zendesk action, which files a ticket with an AI-written summary and the email the visitor typed, not the transcript. The bootstrapped SaaS support stack shows how the pieces fit for a small team.

Mintlify's assistant hands off differently, with an emailed contact form or a support link carrying the thread ID. Pointed at PepoChat's hosted chat page, Mintlify's link starts a fresh conversation, since the Mintlify transcript does not carry over.

A black-and-white sculpture of two large hands meeting against a cloudy sky, one resting in the other
A good handoff passes the reader and the context together; docs readers are usually anonymous, so collect an email before a person takes over.

Can one chatbot cover the docs and the marketing site?

Yes, one PepoChat workspace can cover the docs and the marketing site with the same script tag, as long as every host is on the allowed-domains list and each site is imported as a knowledge source.

The allowed-domains list takes up to 20 entries and includes subdomains automatically, so example.com covers docs.example.com. That cuts both ways on shared hosts: for docs on GitHub Pages, Read the Docs, Netlify or Vercel, add your full host, such as yourname.github.io, never the parent, because github.io would let every GitHub Pages site start chats on your plan.

With the docs on a subdomain, a marketing-site crawl and a docs sitemap import use two of the Free plan's five sources. The greeting and up to three suggested questions are shared across a workspace's sites, so word them for both audiences or run a second workspace on a paid plan. The data-position attribute can differ per site if the docs already use the bottom-right corner.

What to do next

  • Add the snippet for your generator to a preview build, then import the docs sitemap with exclude paths for unreleased and old versions.
  • If your internal answers live in Notion or Google Drive, connect them as the Notion and Google Drive guide explains, so the agent can answer beyond the public docs.
  • Compare plans on the pricing page, or create a free workspace: every feature on the free plan, with 200 AI replies a month and no credit card.
  • Related guides: an AI chatbot on your help center.

Frequently asked questions

How do I add an AI chatbot to Docusaurus?
Add the chatbot's loader to the scripts array in docusaurus.config.js. The object form takes src plus any other attribute, so a PepoChat entry carries async: true and data-organization-id with the ID from the dashboard's Widget Setup page. Docusaurus places the tag in the head of every page, and the launcher stays on screen as readers move between docs pages. Docusaurus has no official chat plugin.
Does GitBook have an AI assistant and what does it cost?
Yes. As of October 2026, GitBook's AI Assistant Ask, short answers in the search box, comes with Essential at $65 per site a month plus $12 per user, billed annually. The full chat sidebar, AI Assistant Chat, needs Ultimate at $249 per site a month. Both spend 20 credits per relevant question, out of 2,000 or 10,000 credits included each month.
Is Mintlify's AI chat included in the price?
Only on Pro and Enterprise. As of October 2026, Mintlify Pro costs $450 a month billed annually or $540 billed monthly and adds 10,000 credits a month. An assistant answer costs 25 credits, so that covers 400 answers, and replies saying it cannot answer are free. Overages cost $0.01 per credit once you switch them on. The free Starter plan has no AI features.
Can one chatbot cover the docs and the marketing site?
Yes. Paste the same script tag on both sites and put both hosts on the allowed-domains list; in PepoChat an entry such as example.com also covers docs.example.com. With the docs on a subdomain, each site is its own knowledge source, using two of the Free plan's five. Greeting and suggested questions are shared by every site in a workspace, so word them for both audiences.
How do I keep a docs chatbot up to date?
Import the docs from their sitemap rather than crawling, with exclude paths for unreleased and old versions. As of October 2026, PepoChat re-fetches website pages weekly and re-indexes only pages whose words changed. After a release, click Sync website pages, and use Import again when you have added pages, because a sync refreshes only pages the agent already knows.
Should the docs bot answer account questions?
Only with care. Docs readers are usually anonymous, and PepoChat cannot receive the identity of a user signed in to your app. Its lookups, such as a Stripe subscription check, run on what the visitor types; an action's instructions can make the agent ask for an email code, but the lookup does not check it. Answer only what you would tell anyone holding that email, and hand off the rest.

Try this on your own site in ten minutes

PepoChat includes every feature on the free plan — 200 AI replies and 5 knowledge sources a month, no credit card.