A website can offer a chat assistant without giving visitors the workspace management interface. In the Docker edition of AnythingLLM, an embedded chat widget connects a page to one workspace through a generated script tag.

The widget uses the workspace's model and settings unless overrides are enabled. Its visitors can ask questions without an AnythingLLM account, so a public widget belongs on a workspace containing only information intended for public use; private documents and internal prompts need a separate workspace.

Start with a running Docker instance, a configured language model provider, and an editable website page already served over HTTP or HTTPS. The browser loading that page must also be able to reach AnythingLLM at the address in the generated script; an HTTPS website needs an HTTPS AnythingLLM address to avoid mixed-content blocking.

Steps to create an embedded chat widget in AnythingLLM:

  1. Click the + beside the workspace search box in AnythingLLM.

    A dedicated workspace keeps public chat separate from internal workspaces. An existing workspace intended for public use can serve the same purpose.

  2. Enter Website Help as the new workspace name.

    The name is an example; the widget can use your own public workspace name.

  3. Save the new workspace.
  4. Open instance settings with the wrench icon at the bottom of the sidebar.
  5. Expand Tools in the settings sidebar.
  6. Open Chat Embed under Tools.
  7. Click Create embed on the Widgets page.
  8. Select Website Help in the Workspace field.
  9. Select Chat under Allowed chat method.

    Chat permits general questions, including a first test without documents. In Query mode, replies are limited to questions supported by documents in the workspace. This choice belongs to the widget and is separate from the workspace chat screen's Agent, Chat, or Query selection.

  10. Add your website's full origin to Restrict requests from domains with Enter.

    An origin includes the scheme, hostname, and any nonstandard port, such as https://www.example.com. The local test page shown here uses http://127.0.0.1:3922; that address works only on the computer hosting it. The entry appears as a removable chip.

    An empty list permits requests from any website. The origin filter does not authenticate visitors or make workspace information private.

  11. Set Max chats per day to a limit suitable for the website.

    The example uses 100 to cap the widget's daily messages. Zero means unlimited; public requests consume the model provider's capacity and may incur charges.

  12. Set Max chats per session to a limit suitable for one visitor.

    The example uses 10. This limits messages for a session within a 24-hour period, rather than establishing a per-person account quota.

  13. Create the widget with Create embed at the bottom of the dialog.

    Message History Limit remains at 20 and the dynamic model, temperature, and prompt overrides remain off. The new widget appears in the Widgets table.

  14. Open Code on the new widget's row.

    A narrow browser window may require horizontal scrolling inside the table to reach Code.

  15. Copy HTML Script Tag Embed Code with the copy icon in the code block.

    The copy control briefly changes to a check mark with a green outline. The generated data-embed-id identifies this widget; no developer API key belongs in the page.

  16. Open your website's HTML page in your text editor.
  17. Paste the complete copied block immediately before the page's closing </body> tag.

    The generated data-base-api-url and src must point to the AnythingLLM address reachable by your visitors. A loopback address is suitable for a same-computer test only. A website editor must allow script tags; an editor that strips scripts cannot load the widget.

  18. Save the modified HTML page on the web server.

    The existing page contents stay in place. A website with a separate publishing step needs its normal publishing action before the updated HTML is served.

  19. Load the updated page through its HTTP or HTTPS website address.
  20. Open the floating chat button in the page's lower-right corner.
  21. Enter a short question in the widget's Send a message field.

    For a Chat-mode test, What is the capital of France? Answer in one sentence. needs no uploaded document.

  22. Submit the question with the send arrow.
  23. Confirm that the assistant finishes a response inside the embedded widget.

    A completed answer beneath your question proves that the website loaded the script and reached the workspace's model. A launcher alone does not prove chat works; an error or a response that never finishes means the connection still needs attention.

Share this guide