@kelu/widget is the website widget: an Ask AI launcher and chat panel, plus the support form deflector, in one script. It is a self-contained browser bundle with nothing to import.

Load it

<script
  async
  src="https://widget.kelu.dev/kelu-widget.js"
  data-widget-id="YOUR_WIDGET_ID"
  data-client-key="kl_pk_..."
></script>
The hosted script is the supported way to load it. The npm package is not published yet. Step-by-step setup is in the Quickstart.

Globals

GlobalWhat it isReference
window.KeluWidgetThe widget’s API: init(), open(), ask(), setUser(), on() and moreFunctions
window.KeluThe same calls in kapa.ai’s window.Kapa shape, with a preinitialisation stub for calls made before the script loadsJavaScript API
window.KeluFormDeflectorattach(options), render() and unmount() for the support form deflectorRender manually

Reference

Configuration

Every option, as a dashboard setting, a data-* attribute or an init() field.

Events

Every event and its payload, for your analytics.

Lifecycle

Render and unmount by hand in single-page apps.

Form deflector

Answer a support form’s question before it becomes a ticket.