<!-- Source: https://docs.vinsi.ai/ai-assistant/widgets -->
# AI Assistant — Widgets & Settings

Add your AI Assistant to your own websites as a chat widget, and set the assistant's name, logo, persona, and message limits.

Created: September 16, 2026

Updated: September 16, 2026

## Overview

A widget puts your organization's AI Assistant on an outside website, such as a help center, docs site, or customer portal. Visitors ask questions, and the assistant answers from the documents in your [Knowledge Base](https://docs.vinsi.ai/ai-assistant/knowledge-base), the same content your team uses in [Chat](https://docs.vinsi.ai/ai-assistant/chat).

In the AI Assistant workspace sidebar, click **Widgets** to manage widgets, or **Settings** to set up the assistant.

## Your Widgets

The **Widgets** page (_Embeddable AI chat widgets for your external sites._) lists each widget with these columns:

| Column                    | What it shows                                                                                  |
| ------------------------- | ---------------------------------------------------------------------------------------------- |
| **Name**                  | The widget's internal name                                                                     |
| **Type**                  | _floating_ or _inline_                                                                         |
| **Allowed Domains / IPs** | Up to three entries plus a _+N more_ count. If none are set, it shows _None (widget blocked)_. |
| **Status**                | _Active_ or _Inactive_                                                                         |

Each row has three buttons: the code icon copies the embed code, the pencil opens **Edit Widget**, and the trash can deletes the widget. Once a widget is deleted, its embed code stops working.

## Creating a Widget

Click **New Widget** (or **Create your first widget** if you have none), fill in the sections below, and click **Save Widget**. After the first save, the page switches to **Edit Widget** and the embed code appears.

### General

- **Widget Name** — required. Only your team sees it, e.g. _Support Chat_ or _Docs Bot_.
- **Type** — choose one:
  - **Floating** (default): a chat button fixed in the bottom-right corner of the page.
  - **Inline**: the chat is built into your page, inside a `<div id="vinsi-widget-container">` element.

### Access Control

In **Allowed Domains / IPs**, list every site where the widget may run, one per line. You can enter:

| Entry      | Example          | Matches                                                       |
| ---------- | ---------------- | ------------------------------------------------------------- |
| Hostname   | support.acme.com | That exact host only                                          |
| Wildcard   | \*.acme.com      | Any subdomain, such as help.acme.com, but not acme.com itself |
| CIDR range | 192.168.1.0/24   | Sites opened by an IPv4 address in that range                 |

If you paste a full URL, such as `https://acme.com`, only the hostname is used. Requests from unlisted sites are rejected, so the widget won't load there.

A widget with no allowed domains is **blocked everywhere**. When you save one, you'll see _No allowed domains/IPs set — all requests will be blocked. Continue?_ Add `acme.com` and `*.acme.com` separately to cover both the main domain and its subdomains.

### Appearance

| Field               | Default             | Notes                                                                                |
| ------------------- | ------------------- | ------------------------------------------------------------------------------------ |
| **Widget Title**    | AI Assistant        | Shown in the chat header.                                                            |
| **Primary Color**   | #3e55ff             | Pick a color or type a hex value. Used for the header, button, and visitor messages. |
| **Welcome Message** | How can I help you? | The first message visitors see.                                                      |

The **Preview** on the right updates as you type. It uses sample messages to show your title, color, and welcome message; it doesn't send real questions to the assistant. Floating widgets use the logo from [Settings](https://docs.vinsi.ai/ai-assistant/widgets#widgets-settings) for the chat button.

### Status

When you edit a widget, the **Widget active** switch appears. Turn it off to pause the widget without deleting it. _Inactive widgets reject all chat requests._ Turn it back on to restore the widget, and you won't need to change the embed code.

## Embed Code

After saving, copy the code from the **Embed Code** box (or use the code icon on the Widgets list) and add it to your site.

**Floating**: paste before the closing `</body>` tag.

Floating widget

```
<script src="https://YOUR_VINSI_APP_URL/api/llm-assistant/widget-script?id=YOUR_WIDGET_ID"></script>
```

**Inline**: paste where you want the chat to appear, and change the `height` as needed.

Inline widget

```
<div id="vinsi-widget-container" style="height:500px;"></div>
<script src="https://YOUR_VINSI_APP_URL/api/llm-assistant/widget-script?id=YOUR_WIDGET_ID"></script>
```

The embed code stays the same when you edit the widget. The widget loads its title, color, welcome message, and logo each time a page opens, so saved changes show up on your site without re-pasting the code.

## What the Widget Knows

Every widget answers from your organization's whole AI Assistant [Knowledge Base](https://docs.vinsi.ai/ai-assistant/knowledge-base). To change what it knows, add, update, or remove documents there. All of your widgets pick up the changes.

- Answers can include a **Sources** list with the documents used.
- Greetings like "hi" or "hello" get your welcome message back.
- The widget stays on topic. It answers questions about your organization, its products and services, and the VINSI.AI platform. It politely declines unrelated requests, such as recipes, homework, or trivia.

Anyone on an allowed site can see what the widget knows. Don't upload internal-only documents to the Knowledge Base if your organization has a public widget.

## What Visitors See

- A chat header with your **Widget Title** and a _Type a message..._ box.
- The notice: _AI Generated Answers May Be Inaccurate._
- If they send messages too quickly, they'll see _Too many messages. Please slow down._ By default, each visitor can send up to 10 messages a minute.
- Long messages are rejected with _Message is too long_. The default limit is 1,000 characters.
- Each widget has a daily message limit. After it's reached, visitors see _This assistant has reached its daily limit. Please try again tomorrow._

## Assistant Settings

Click **Settings** in the AI Assistant sidebar to customize how the assistant presents itself and behaves for your organization. These settings apply to the whole organization. Saving and uploading require write permission for AI Assistant settings.

| Setting                                        | What it does                                                                                                                                                                                                            |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Assistant name**                             | Shown in the sidebar and used when the assistant refers to itself in Chat. Up to 255 characters; defaults to _AI Assistant_.                                                                                            |
| **Assistant logo**                             | Replaces the chat icon on **floating widgets** and appears next to the assistant name. Click **Upload logo** to add one (JPEG, PNG, GIF, WebP, or SVG, up to 10 MB) or **Remove** to clear it. Square images work best. |
| **Persona / instructions**                     | Optional tone and behavior guidance, e.g. _Be concise, friendly, and professional. Avoid jargon._ Up to 4,000 characters. Applies to your team's Chat conversations.                                                    |
| **Rate limit (messages per minute, per user)** | Caps how many messages each signed-in user can send per minute in Chat. From 1 to 600; default 40.                                                                                                                      |

Click **Save settings** to apply changes. Logo uploads and removals save right away.

Only the logo carries over to widgets. Each widget uses its own **Widget Title** and **Welcome Message**, and the Persona and Rate limit settings apply only to Chat.
