Skip to content

Install the widget

Deploy an agent to your website with the five-step web deploy wizard, paste one script tag, allow your domains, and fix a widget that doesn't appear.

Open Agents

The web widget puts one of your agents on your website as a chat window. You set it up per agent, with the Deploy to the web wizard, and install it by pasting one script tag. There is no package to install and nothing to keep up to date: the script is served by Amomic-AI and the widget reads its configuration every time it loads.

Who can do it: owners and admins. A member who opens the wizard sees "Only an owner or admin can deploy" and a link back to the agent's deployments. The web widget is included on every plan, Free included.

The Install step. The live preview on the right is the real widget, running against your agent.

Before you begin #

  • Publish the agent at least once. The wizard needs a published version. Without one it shows "Publish the agent first" with a Go to versions button.
  • Know which sites the widget will run on. You list them in the Install step, and the widget refuses to load anywhere else.
The tag you will paste
<script async src="https://services.amomic.in/widget.js" data-bot="wgt_01JA7X4M9Q2T6W1Y5R8N3K0PVA"></script>

Your data-bot value is your widget's own id. It always starts with wgt_ and it isn't a secret.

Deploy an agent to the web #

  1. 1

    Open the wizard

    Go to Agents, open the agent, click Deploy and choose Web widget. You can also use Deploy here on the Web widget card of the agent's Deployments tab.

    If the agent already has a live web deployment, the menu item reads Manage Web deployment and opens the Deployments tab. Click Edit settings on the web deployment to reopen the wizard.

  2. 2

    Website

    Enter your Website address, for example https://veloriahome.in, and click Continue. Your website is always an allowed site for the widget. In the background, the console reads your homepage for its brand colour and font and pre-fills the next steps with them.

  3. 3

    Knowledge

    Check the knowledge bases the agent answers from. Each shows whether it is ready. Attach another with Attach another knowledge base…, or detach one with the unlink icon. Manage knowledge in the agent studio opens the agent's Knowledge tab.

    Attaching and detaching here changes the agent itself, on every channel it serves, as soon as you do it.

    The Knowledge step: the knowledge bases the agent answers from.
  4. 4

    Identity

    Set the bot name, company name, welcome message, suggested questions and profile picture. See Customise the widget.

  5. 5

    Appearance

    Set the brand colour, font, theme, position and launcher button, plus the greeting bubble, Remember conversations, restart and the lead form. See Customise the widget and Capture leads.

  6. 6

    Install

    List your Allowed websites, pick your platform, copy the snippet and click Set live. On a widget that is already live, the button reads Save changes and the footer shows This bot is live.

The steps are clickable, so you can jump back to any of them. The Live preview on the right is your actual widget, answering from your agent, and it updates as you edit.

After Set live or Save changes, the snippet to paste and the custom UI snippet.

When you click Set live, Amomic-AI creates your workspace's web connection (the first time), creates a deployment of the agent's published version, checks it, and activates it. You land on "{name} is live!" with the snippet to copy. Done takes you to the agent's Deployments tab.

When your changes reach visitors #

Not every step saves at the same moment. On a widget that is already live:

What you change When visitors get it
Website, and everything on Identity When you click Continue on that step.
Brand colour, font, theme, position, launcher When you click Continue on Appearance.
Greeting bubble, Remember conversations, restart, lead form, Allowed websites When you click Save changes (or Set live) on Install. Leave the wizard before that and these changes are lost.
Knowledge attached or detached Immediately.
The agent's instructions, tools and knowledge, edited in the agent studio As soon as they are saved there. Test risky changes in the agent's test chat first. See Agents.

Visitors see the new look on their next page load.

Check the brand colour each time you reopen the wizard

Every time you open the wizard, it re-reads your website and pre-fills Brand color and Font with what it finds there. If you had chosen a different colour, check Appearance before you click Continue or Save changes, or the website's colour replaces yours.

Pick your platform #

The tag is the same everywhere. The Install step's What's your website built with? picker tells you where each platform wants it, and shows the file name you are pasting into.

Platform Where to paste File shown
HTML / other Just before the closing </body> tag of every page. index.html
Next.js Once, in app/layout.tsx (App Router) or pages/_app.tsx, with next/script. app/layout.tsx
React (Vite/CRA) Before </body> in index.html (Vite) or public/index.html (CRA). index.html
Vue Before </body> in index.html. index.html
Nuxt In nuxt.config.ts under app.head.script, or in app.html. nuxt.config.ts
Angular Before </body> in src/index.html. src/index.html
Svelte / SvelteKit Before </body> in src/app.html (SvelteKit) or index.html (Vite). src/app.html
WordPress A header/footer plugin (for example WPCode), in the footer. Or in footer.php, before </body>. footer.php
Shopify Online Store → Themes → Edit code → theme.liquid, before </body>. theme.liquid
Wix Settings → Custom Code → Add Custom Code. Apply to All pages, load once, place in Body — end. custom-code.html
Squarespace Settings → Advanced → Code Injection, in the Footer box. code-injection.html
Webflow Project Settings → Custom Code, in Footer Code. Then publish. footer-code.html
Framer Site Settings → General → Custom Code, in "End of <body> tag". Then publish. custom-code.html
Google Tag Manager New Tag → Custom HTML. Trigger on All Pages, then publish the container. tag.html

Next.js and Nuxt get their own code, and a Prefer plain HTML? box with the universal tag underneath.

jsx
// app/layout.tsx — inside your root layout's <body>
import Script from "next/script";
<Script src="https://services.amomic.in/widget.js" data-bot="wgt_01JA7X4M9Q2T6W1Y5R8N3K0PVA" strategy="lazyOnload" />

Two details apply on every platform:

  • Keep async (or strategy="lazyOnload" in Next.js). The widget loads after your page, which is the right trade for a support widget.
  • Include it once per page, in a layout or footer that renders once. Only the first widget tag on a page loads. Any later one is ignored, even if it points at a different widget, so one page can show one widget.

If data-bot is missing or empty, the script does nothing at all: no launcher and no error.

Allow your domains #

Allowed websites in the Install step lists the sites the widget may run on, one per line or comma-separated. Your website address is always allowed. If you leave the list empty, Set live uses your website's domain; with neither, it stops with "Add at least one allowed domain (or your website) before going live."

The matching rules:

Rule Example
Hostnames only. Scheme, port and path are ignored. Enter veloriahome.in, not https://veloriahome.in/support.
www. doesn't matter. veloriahome.in covers www.veloriahome.in, and the other way round.
A domain covers its subdomains. veloriahome.in covers support.veloriahome.in and shop.eu.veloriahome.in.
No wildcards. An entry containing * is ignored. Enter veloriahome.in, not *.veloriahome.in.
Up to 20 entries. List parent domains rather than every subdomain.
localhost is always allowed. http://localhost:3000 works without being listed. 127.0.0.1 is a different hostname: add it if you develop on it.

Being allowed is not the same as being live

The domain check is only half of it. The widget also has to be live. A widget whose web deployment is disabled, or that has never been set live, refuses to load on every site, localhost included. Only the console's live preview works on a draft.

To put the same widget on more sites, add them to Allowed websites and click Save changes. You don't need a second deployment.

What visitors see #

When everything is in order, the launcher appears in the corner you chose, a moment after your page loads. If you turned on the greeting bubble, it appears beside the launcher about two and a half seconds later.

The closed widget with its greeting bubble.

When the widget refuses to load #

If the widget is refused, no launcher appears at all. Visitors see your page as if the tag weren't there. The browser's developer console shows why:

Text
[Amomic-AI widget] failed to load: This widget is not enabled for this website.
Message after failed to load: Why Fix
This widget is not enabled for this website. The page's hostname isn't your website and isn't in Allowed websites. Add the domain and click Save changes. Check for a subdomain of another domain, an entry with *, or 127.0.0.1.
This chatbot isn't live yet. The domain is allowed, but the widget isn't live: it was never set live, or its deployment was disabled. Click Set live in the wizard, or Enable the web deployment on the agent's Deployments tab.
Unknown widget. The data-bot id doesn't match any widget. Copy the snippet again from the Install step.

The live preview in the console skips the live check on purpose, so you can build against a draft. That is why something can work in the preview and not on your site.

When your workspace is out of allowance #

A visitor who starts a new conversation while your workspace has used up its plan allowance gets this reply instead of an answer:

Sorry — the assistant isn't available right now. Please reach out to the team directly and they'll be happy to help.

Conversations already in progress carry on. See Credits.

Visitors see the same reply while your workspace is suspended for an unpaid plan invoice, and then it applies to conversations already in progress too. Visitors are never told why. It lifts by itself once the invoice is paid. See When a payment fails.

Opening and closing it from your own UI #

The widget exposes two methods on the page:

Node.js
window.AmomicWidget.open();
window.AmomicWidget.close();

Use them to wire your own triggers, such as a "Chat with us" link in your header:

HTML
<button type="button" onclick="window.AmomicWidget && window.AmomicWidget.open()">
Chat with us
</button>

window.AmomicWidget exists once the script has loaded and the widget has mounted. Because the tag is async, guard calls made early in the page's life, as above.

There is nothing else on the object: no events, no way to send or prefill a message. For programmatic messages and streaming, use the custom UI client.

What the visitor's browser stores #

No cookies, and no message text. The widget keeps a few opaque ids in the visitor's localStorage:

Key Holds
amomic_vid An anonymous visitor id for your site, shared with the custom UI client if you use it too.
amomic_cid_<widget id> The current conversation's id for this widget.
amomic_lead_<widget id> Whether the visitor submitted (1) or skipped (skipped) the lead form.
amomic_greet_<widget id> Set once the visitor dismisses the greeting bubble.

The transcript itself is kept by Amomic-AI. On each page load, the widget asks for it and shows it again, as long as Remember conversations is on and the last message is within the Remember for window (7 days by default). See Remember conversations.

Consequences:

  • A refresh or return visit restores the chat when Remember conversations is on and the window hasn't passed.
  • Clearing site data starts over: new visitor, new conversation, and the lead form is asked again.
  • A private window is a new visitor each time.

The widget renders inside an isolated shadow root, so your site's CSS can't reach it and its styles can't leak into your page.

Rate limit #

12 requests per 60 seconds, per visitor, per widget, counting messages, images and lead-form submissions. New sessions are limited to 30 per minute per IP, and all visitor traffic to 60 per minute per IP. Loading the script isn't counted.

A visitor over the limit sees Not sent with a Retry control under their own message. The window slides, so a few seconds later Retry goes through. Real visitors almost never hit this; testing in quick succession does.

Troubleshooting #

Next #

Make it yours

Customise the widget — identity, colours, launcher, greeting bubble and conversation memory.

Capture leads

Turn visitors into contacts the agent can follow up with on WhatsApp.

Build your own interface

Use the headless client with your own components and the same deployment.

Manage the deployment

Deployments — disable, enable or remove the web deployment.

See every channel

Channels hub — which agent answers where.