Before You Start
You need:- A created Brand Agent
- A tested customer-facing conversation flow
- A published version of the agent
- Widget styling reviewed
Website access restrictions
By default, a public Brand Agent has no domain restrictions and its widget can be embedded on any website. Add an allowlist when the widget should run only on sites you control:- Open your Brand Agent’s Publish or Embed settings.
- Under Website access, enter a hostname such as
example.comor a website URL, then select Add. - Add up to 25 domains. Use
*.example.comto allowexample.comand its subdomains. - Remove any domain that should no longer load the widget, then select Save.
Floating Chat Bubble
Use the floating chat bubble when you want the agent available across your site as a website chatbot.- Open your Brand Agent.
- Test the agent with realistic visitor questions.
- Open Publish.
- Choose the chat bubble/widget option.
- Copy the embed snippet.
- Paste the snippet into your website template, layout, or tag manager.
Floating Pill Layout
The floating pill is an alternative launcher: a bottom-center pill instead of a corner bubble, with the chat panel opening above it when the visitor sends a message. Adddata-layout="floating" to the same script tag.
The floating pill is marked Experimental in the Publish screen. The chat bubble is the stable default; use the pill when the bottom-center placement suits your layout better, and test it on mobile before rolling it out.
Embed a Private Agent
A private agent can run on your website when the snippet carries a Teamspace runtime key scoped to that single agent. Use this when the agent should not be reachable by anyone who copies your agent ID.- Open Teamspace settings → API keys → Create key.
- Enable Run agents, and scope the key to the one agent and project this website needs.
- Open your Brand Agent’s Publish screen and copy the snippet. While the agent is private, the snippet includes a
data-api-keyplaceholder. - Replace the placeholder with your scoped key.
How Widget Visitors Are Identified
SketricGen assigns the visitor identity for embedded widgets on the server. When a widget loads, it requests authorization for the agent, and SketricGen mints the contact identity and a visitor credential for that browser. A returning visitor presents the stored credential and continues their previous identity, so repeat conversations stay grouped without any work on your page. To tie conversations to your own user records, call the Runtime API from your backend and sendcontact_id in the request body. That path is authenticated with a Teamspace runtime key, so the identifier can be trusted.
Inline iFrame
Use an iframe when you want the agent embedded directly inside a page section.The Fullscreen iframe option appears in the Publish screen only while the agent is public and no Website access domains are saved. Use the chat bubble or floating pill for a private or domain-restricted embed.
- Open your Brand Agent.
- Open Publish.
- Choose Fullscreen iframe.
- Copy the iframe code.
- Paste it into the page where the chat should appear.
/fullscreen-widget/ URL:
/iframe-widget/YOUR_AGENT_ID serves the same chat interface and is the better fit when the agent sits inside a page section rather than filling it.
Test After Deploying
After adding the widget:- Open the live page.
- Confirm the widget or iframe appears.
- Ask a question from your Brand Agent’s Knowledge Base.
- Reload the page and confirm the previous conversation is still available to the same browser.
- Test lead capture if enabled.
- Check the conversation in SketricGen.
data-agent-id or iframe URL uses the correct agent ID, and that the page hostname matches your Website access list. For a private agent, also confirm the snippet carries a valid data-api-key.
