Assistant CoreAssistant Core
Embed & Integrate

Embed Chatbot Widget

Add an AI chatbot to any website with a simple code snippet.

Overview

Embed your AI assistant as a floating chat widget on any website. Visitors can ask questions and get instant answers without leaving your page.

Includes: Realtime streaming · Chat persistence · Multi-language (EN/VI) · Dark mode · Markdown & code blocks · Feedback 👍👎 · Mobile fullscreen


Get the Embed Code

  1. Go to Integrations in the sidebar of the Admin Panel
  2. Copy the snippet:
<script
  src="https://cdn.assistantcore.com/embed/embed.js"
  data-assistant-id="YOUR_ASSISTANT_ID"
  data-api-base="https://api.assistantcore.com"
  async
></script>
  1. Paste it before the closing </body> tag in your HTML

Attributes

AttributeRequiredDescription
data-assistant-idYour assistant's UUID (from Admin Panel)
data-api-baseAPI server URL
data-langUI language: en or vi. Auto-detected by default

If your site has <html lang="vi">, the widget automatically displays in Vietnamese — no need for data-lang.


Where to Add the Code

  • WordPress — Appearance → Theme Editor → Footer
  • HTML — Before </body> in your HTML file
  • React/Next.js — Use next/script with strategy="lazyOnload"

Configure Embed Domains

The widget only works on registered domains:

  1. Go to Integrations → Embed Widget Domains
  2. Enter the domain (e.g., www.mysite.com)
  3. Click AddSave

If the domain is not registered, the widget cannot connect and chat will not work.


Features

Chat persistence

Messages are saved to localStorage — refreshing the page won't lose them. Tap ✏️ in the header to start a new conversation.

Streaming & status

Responses appear character-by-character in realtime, with processing status ("Searching knowledge base...") and follow-up suggestions.

Markdown

Supports tables, code blocks with language labels + copy button, blockquotes, lists. Links open in a new tab automatically.

Error handling

Shows clear messages when rate-limited, network errors, or server issues occur — with a Try again button when possible.

Dark mode & Responsive

Automatically matches system appearance. Goes fullscreen on mobile (≤ 480px).

The embed widget is available on the Pro plan and above. Free plan users can use the hosted chat at support.assistantcore.com.

On this page