# Website chat widgets

**You'll need:** an administrative role. **Administration → Website Chat Widgets.**

A widget is a chat box you embed on your website. Visitors talk to your AI agent
directly, with no login.

## Create a widget

Choose **New widget**, then work through the **Settings** tab:

| | |
|---|---|
| **Agent** | Which agent answers. Only [public-facing agents](/guide/ai/agents) can be used. |
| **Appearance** | Header icon, accent color, header title and which corner the chat sits in. The live preview beside the form shows the result as you edit. Leave the icon empty to use the first letter of the title. |
| **Allowed websites** | Only these websites can embed the widget. |
| **Suggested questions** | Shown as quick-reply chips when the conversation starts. |
| **Language** | Leave empty to match the visitor's own language. |
| **Daily credit budget** | The widget stops answering for the day once this many credits are spent. |

Always set the daily budget. It is the only limit between an unusual day of traffic and
your entire credit balance.

## What visitors can reach

The **Settings** tab shows **What anonymous visitors can access**: the agent's knowledge
bases and instructions, listed explicitly.

<Callout type="caution">
	Everything on that list is reachable by anyone who talks to the widget. A determined
	visitor can extract the content of an attached knowledge base through ordinary
	questions.

	Attach only material you would publish on the site itself.
</Callout>

## Install the widget

The **Install** tab walks through it: copy the snippet, paste it before the closing
`</body>` tag on every page where the chat should appear, and check the allowed
websites listed under the snippet.

If the widget does not appear, check that list first: the site it is embedded on has to
be in **Allowed websites**.

**Open widget preview** opens the widget on a page of its own, so you can talk to it
before the snippet is on your site. The preview does not check the allowed websites, its
link stops working after a few hours, and the conversations it starts are marked
**Preview** in the **Conversations** tab.

## Conversations

The **Conversations** tab lists every chat the widget has held, newest first, with the
visitor's first question, the number of messages and any answer rated not helpful. Open
a row to read the whole exchange.

Filter to **Leads** or **Not helpful**, or search for a word to find every conversation
where it came up. Reading these regularly shows what visitors actually ask, which is the
best guide to what the knowledge bases and the agent's instructions should cover.

## Leads

The **Leads** tab collects the people who identified themselves in a conversation. Open
a lead to see the full conversation plus **other conversations from the same visitor**,
matched by IP address or email, so a returning visitor appears as one person rather than
five anonymous sessions.

Notifications fire on new leads, and the bell in the header collects them.

## Analytics

The **Analytics** tab shows volume and outcomes over time. Under the tiles, the average,
median and longest conversation length tell you how much a typical visitor uses, which is
what to size the per-conversation message limit and the daily credit budget against.

Check **downvoted questions** weekly, the ones where a visitor rated the answer
unhelpful:

> Visitor questions where the answer was rated not helpful. Use these to spot gaps in your
> knowledge bases.

Treat that list as a to-do list. Each entry is a question your public knowledge could
not answer, and it is the most direct signal you get about what to write next.

## Turn a widget off

Deactivating the widget stops it answering, and the snippet can stay on your site. The
conversations and leads it collected are kept.
