# Setting up AI agents

Configure a chat widget that answers questions from your website visitors.

## What agents do

An agent is an AI persona that lives on your website as a chat bubble. It answers visitor questions using your business knowledge and can capture leads during the conversation.

## Creating an agent

1. Go to **Agents** in the sidebar.
2. Click **New Agent** and give it a name and persona.
3. Connect it to your **Knowledge** documents so it can answer accurately.
4. Copy the snippet from **Settings → Connections → Domains & environments → your environment → Script Tag** and add it to your site (see [Embedding scripts](/docs/embed-scripts)).

## Adding knowledge

Go to **Knowledge** in the sidebar to upload FAQs, service descriptions, or paste your website content. The more context you give, the better your agent answers.

Once your agent is live, developers can embed it anywhere with the **Chat widget** — see the Widgets section for the script tag and React component. _(Help only)_
