Paste one script tag into your HTML. No build step is needed.

Before you start

  • Your website widget. Kelu makes one for you when you create a knowledge base. Its Install tab shows these steps with your widget id and key already in the code.
  • Your site on the widget’s Sites it works on list (Install tab), for example https://docs.example.com.

Add the widget

1

Open the file that renders every page

Usually a shared layout or template. For a single page, its own .html file.
2

Paste the snippet before the closing body tag

<body>
  <!-- your page content -->

  <script async src="https://widget.kelu.dev/kelu-widget.js"
    data-widget-id="YOUR_WIDGET_ID"
    data-client-key="kl_pk_..."></script>
</body>
Use your widget’s own snippet, or replace YOUR_WIDGET_ID and kl_pk_... with its values. The tag also works in <head>.

Check it works

Open the page. A round icon button appears in the bottom-right corner, with the tooltip Ask AI. Ask a question and check that the answer lists its Sources. Nothing there? See Troubleshooting.