Embedding the agent

One script tag for the floating widget, or an iframe for a full-page chat. What each attribute and URL parameter does.

NeevAI does the installation with whoever manages your website. This page exists so your team can see exactly what goes on the page and what it does. CHAT_HOST and YOUR_ASSISTANT_ID are the values NeevAI gives you for your engagement.

The launcher snippet

The floating widget is one script tag, usually placed before the closing body tag:

<script
  src="https://CHAT_HOST/embed.js"
  data-assistant-id="YOUR_ASSISTANT_ID"
  defer></script>

The script draws a launcher bubble in the corner, an optional teaser message, and the chat panel. The panel has three sizes: widget, expanded and fullscreen. Visitors switch between them from the chat's own menu, and the host page can drive them through the host-page API below.

Snippet attributes

| Attribute | What it does | |---|---| | data-assistant-id | Which agent to load. Required. | | data-session-metadata | A JSON object attached to every new session as metadata. Use it to tell the agent which page or campaign the visitor came from. Two kilobyte cap. Reserved keys such as identity and pre-chat fields are dropped. | | data-fresh | Set to 1 to start a new session on every load instead of resuming the visitor's last one. Useful for demos. | | data-auto-open | Set to true to open the panel as soon as the page loads. | | data-theme | light or dark for the first paint. The visitor's own choice persists after that. |

Full-page chat

For a page that is mostly the conversation, embed the assistant page directly in an iframe:

https://CHAT_HOST/assistant/YOUR_ASSISTANT_ID
  ?embed=true
  &mode=fullpage
  &chrome=none
  &meta=%7B%22page_slug%22%3A%22pricing%22%7D

| Parameter | What it does | |---|---| | embed=true | Turns on embed behaviour. Nothing below applies without it. | | mode=fullpage | Fills the iframe. The default, widget, is the panel layout. | | chrome=none | Hides the header row and navigation panel. The thread, composer and disclaimer remain. The host page owns open and close. | | chrome=panel | For a host that docks the chat in a side panel it sizes itself. Keeps the header, drops the size menu, and the close button posts a message the host can act on. | | meta | URL-encoded JSON attached to new sessions, same rules as data-session-metadata. | | q | Prefills the composer with a question, up to 200 characters. Add autosend=1 to send it. |

The iframe needs allow="microphone" only if you plan to use voice input in the future. It does nothing today.

Where the agent can live

The same agent can serve more than one surface: a marketing site, a help center, a product dashboard, a docs site, or an internal page behind your login. Each surface gets its own snippet or iframe with its own metadata, and every conversation lands in the same admin portal.

What is and is not in your page

The chat runs inside an iframe served by NeevAI. Your page's stylesheets never reach it, and its scripts never reach your page. Theming happens through the assistant's configuration and the theme parameters described in theming and styling. The host page and the chat talk only through the message bridge described in seeded questions and the host-page API.