Ask AI assistant widget for Zensical
Add a Biel.ai AI assistant or AI search widget to your Zensical site using template overrides. You can also connect AI agents through MCP, with or without installing the widget.
Prerequisites
- A Biel.ai account.
- A project with indexed content.
- A Zensical site.
Add the assistant widget
The <biel-button> component adds a floating chat button to your site.

-
Create a custom template directory:
mkdir -p overrides -
Create
overrides/main.htmlwith the following content:{% extends "base.html" %}{% block extrahead %}<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css"><script type="module" src="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js"></script>{% endblock %}{% block content %}{{ super() }}<biel-button project="<YOUR_PROJECT_ID>"header-title="Documentation AI"button-position="bottom-right"modal-position="bottom-right"button-style="dark">Ask AI</biel-button>{% endblock %}Replace
<YOUR_PROJECT_ID>with your project's ID from the Biel.ai dashboard. -
Point Zensical at the overrides directory.
In
zensical.toml:[project.theme]custom_dir = "overrides"If your project still uses the legacy
mkdocs.yml, the equivalent is:theme:custom_dir: overrides -
Run
zensical serveand verify the chat button appears in the bottom-right corner.
Disable conflicting keyboard shortcuts
Like Material for MkDocs, Zensical registers keyboard shortcuts (f, s, / for search and p, n for navigation) that can conflict with Biel.ai's input handling. To disable them:
-
Create
docs/javascripts/disable-search-autofocus.js:document.addEventListener('keydown', (e) => {const blockedKeys = ['f', 's', '/', 'p', 'n', ',', '.'];if (blockedKeys.includes(e.key.toLowerCase())) {e.stopPropagation();}}); -
Register the script.
In
zensical.toml:[project]extra_javascript = ["javascripts/disable-search-autofocus.js"]Or in
mkdocs.yml:extra_javascript:- javascripts/disable-search-autofocus.js
Add the search widget
-
Create
overrides/main.htmlto load the widget assets. If this file already exists, merge theextraheadblock and keep your other blocks:{% extends "base.html" %}{% block extrahead %}<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css"><script type="module" src="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js"></script>{% endblock %} -
Create
overrides/partials/search.htmlto replace the built-in search control:<biel-search-button project="<YOUR_PROJECT_ID>" button-style="rounded">Search</biel-search-button>Replace
<YOUR_PROJECT_ID>with your project ID. -
Point Zensical at the overrides directory in
zensical.toml:[project.theme]custom_dir = "overrides"For
mkdocs.yml, settheme.custom_dirtooverrides. -
Run
zensical serve. Open Search, enter a term from your documentation, and open a result. Apply the keyboard shortcut configuration.
Connect AI agents with MCP
Let AI tools search and read your indexed documentation. MCP is available on every plan and during your trial.
- In the Biel.ai dashboard, open your project’s Settings > MCP.
- Select Enable MCP server and click Save.
- In the widget, open Connect via MCP using the
<>button. Select your AI client or choose MCP URL to copy the endpoint into its settings.
Without the widget: after enabling MCP, copy MCP endpoint from Settings > MCP and add it to your AI client. No widget installation or website changes are required.
The widget also exposes WebMCP tools to compatible browser agents visiting your site. Use the latest widget release and keep Enable WebMCP selected in Settings > MCP.
Next steps
- Customize the widget's appearance, behavior, and tone.
- Connect integrations like GitHub Actions, MCP, or Zapier.