Skip to content

Install the widget with an AI coding assistant

Point your coding assistant at the widget's docs for AI tools, and check what it did.

Last updated

If you build with an AI coding assistant, point it at the widget's docs written for AI tools. They tell it the facts that matter for a correct install, so it gets it right the first time.

The files it should read#

Ask it like this#

Add the help.ai chat widget to this site.
Read this first and follow it:
https://cdn.help.ai/sdk/js/elements/latest/llms.txt
Public key: agent_pk_...
Deployment ID: ...
Make the widget follow our dark mode, and make
the "Contact us" button open the chat.

Give it the public key and deployment ID from the deployment's Install tab. Never give it the Secret key: it belongs on your server, not in website code.

Check its work#

  • The chat bubble shows on your site, with no errors in the browser console.
  • await HelpAI.ready() resolves in the browser console. On <web-ai-chat>, await document.querySelector('web-ai-chat').ready does.
  • The script loads a fixed version, such as .../elements/1.12.0/elements.js, rather than latest, so a new release never changes your site by surprise.
  • The buttons it wired open the chat, and the chat matches your site's light and dark mode.
  • The secret key appears in no file the browser loads.

If something's off, see Debug the widget on your site.

Was this helpful?

Still need help?

Ask the community