Overview
Put the Loops AI assistant on your website — install the snippet, pass context, and control the widget from your own code.
The web widget puts the assistant on your site with one script tag. Your page
supplies identity (agentId), page context (which product the shopper is
looking at, who they are), and user actions (open the chat, Ask AI, size
guide). Everything visual comes from the configurator.
<script>
window.LoopsAI = { q: [] };
window.LoopsAI.q.push(["init", { agentId: "YOUR_AGENT_ID" }]);
</script>
<script src="https://chat.loopsai.com/embed.js" async></script>Start here
Configuration
The init options that matter, plus channel status and staging previews.
Host Integration API
The full reference: config layers, page-based context, and every runtime method.
Product & User Context
Send the product and shopper data that makes answers specific.
JavaScript API
open, close, updateContext, openWithSearch, suggestSize, and friends.
Events & Interactions
Trigger flows from your own buttons and react to what happens in chat.
How It Works
The embed model in plain language — queue-first startup, lazy iframe, context sync.
Troubleshooting
What to check when the widget does not appear or context does not arrive.
Common setups
| You want | Where to go |
|---|---|
| The assistant on every page | Configuration |
| A sidebar on product pages that knows the product | Host Integration API |
| Your own Ask AI search button | Custom Ask AI Search Button |
| A Size guide or Find my size button | Body-Type Size Guide · Size Suggestion |
| The widget hidden on checkout | Configuration |
| Context updates in a single-page app | Product & User Context |
Building a mobile app?
The same runtime powers mobile. Use the iOS or Android SDK, or host it yourself in a WebView with Mobile WebView (No SDK).