AgentStack Docs

Deploy the chat widget

Embed an agent as a chat bubble or iframe and protect the live widget with an allowed-domain list.

Open Deploy to copy the embed code for your agent. The Chat Widget snippet loads embed.js and passes the agent's public ID. This snippet gives you the advanced widget features. Copy the snippet from your dashboard. The origin in the snippet is specific to your environment.

Install the snippet in the shared layout or footer of your visitor pages. Then check that:

  • The script loads.
  • window.agentstack is defined.
  • The bubble opens a working chat panel.

The Iframe option embeds the chat interface directly. It does not support the window.agentstack API, identity verification, or client-side actions. If you need these features, use the Chat Widget option instead. A private agent, or an agent pending deletion, does not render in the public embed. Before you use the widget, make the agent public.

Use Allowed domains to restrict embedding. To allow embedding from any domain, leave the field empty. To restrict it, enter one hostname per line. A hostname also matches its subdomains. Do not use a scheme such as https://, a path, a port, or a wildcard such as *.example.com. These formats do not match.

Test the setting on the final production hostname after you save it. Do not rely on a local preview.