For the complete documentation index, see llms.txt. This page is also available as Markdown.

How can I add the Hexabot Chat Widget to my website?

Hexabot is a self-hosted, fair-core AI workflow automation platform. Use it to build AI chatbots, conversational AI, and workflow-driven automations across channels.

The Hexabot Chat Widget adds a website chat widget to any website or web app. It connects your site to a Web Source in Hexabot v3.

Use this guide when you manage the site code directly. If you use WordPress, install the plugin instead.

WordPress site? Use the Hexabot WordPress Chat Widget plugin instead of editing theme files manually. You can also review the GitHub repository.

Before you start

Pass the Source Ref as the widget sourceId.

How setup works

  1. Create a Web Source for the site.

  2. Add the Hexabot Chat Widget with your API URL and sourceId.

  3. Pass workflowId only when you want to override the source default workflow.

Create a separate Web Source for each website when domains, branding, or workflows differ.

Learn more in Channels and Sources and Web Source.

Step 1: Create a Web Source

  1. Open AdminIntegrationsChannels.

  2. Click Add.

  3. Choose web.

  4. Enter a clear source name.

  5. Add the exact website origin to Allowed domains.

  6. Set a Default workflow if this website should always start one workflow.

  7. Copy Source Ref.

  8. Save the source.

Use the copied Source Ref as the widget sourceId.

Step 2: Add the widget

Use the CDN build when you want the fastest setup.

Remove workflowId to use the Web Source default workflow.

Replace @latest with a fixed version when you want reproducible deploys.

Step 3: Verify the connection

Open the website and confirm the widget loads.

Then check these basics:

  • The Web Source is enabled.

  • The website origin matches Allowed domains exactly.

  • apiUrl points to your public Hexabot API.

  • sourceId matches the copied Source Ref.

How workflow routing works

Hexabot resolves the workflow in this order:

  1. Widget workflowId

  2. Web Source Default workflow

  3. Channel or workflow trigger behavior

Use workflowId only when the page should force a specific flow.

Web Source settings that affect the widget

Manage website behavior in the Web Source form.

Common settings include:

  • Allowed domains for website access control

  • Greeting message, window title, and avatar URL

  • Show emoji, show file, and show location

  • Persistent menu, disable input, and allowed upload MIME types

Maximum upload size is not a Web Source setting. Set it in the widget client with maxUploadSize and enforce it on the server.

Troubleshooting

Widget does not appear

Check that the widget script and stylesheet load. Then confirm the Web Source is enabled and sourceId matches the copied Source Ref.

Invalid API URL

Use the public Hexabot API URL. Include the API base path, such as https://example.com/api.

Invalid Source Ref

Copy the Source Ref from the Web Source form. Pass that value as sourceId.

Domain not allowed

Add the exact site origin to Allowed domains. Include the scheme, subdomain, and port when needed.

WebSocket blocked

The widget uses Socket.IO transport. If a proxy blocks WebSocket upgrades, allow them or set transport="polling".

Uploads not working

Confirm the Web Source allows the file MIME type. Then check server upload limits and the widget maxUploadSize value.

Styling conflicts

Load the widget stylesheet. If your site CSS still leaks into the widget, mount it inside a shadow root.

Last updated

Was this helpful?