> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textyess.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Onsite Agent: set up the AI chat on your website

> Set up the onsite AI chat widget on your website: show or hide it, install it, set name, tone, rules and tools, change its look, languages, and human handoff by email.

The onsite agent is an AI chat on your website. It answers shoppers' questions, shows products as cards and, on Shopify stores, lets shoppers add products to the cart. Open [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite). The page has three tabs: **Instructions**, **Tools** and **Appearance**. Click **Publish** to save your changes. This page appears when your plan includes the onsite agent.

## Show or hide the onsite chat on your store

The **Store visibility** card, at the top of the **Appearance** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite), controls if shoppers see the chat.

1. Select the **Appearance** tab.
2. Turn on **Show the widget on my store**. The state changes from **Hidden** to **Live**.

The switch saves immediately. **Publish** does not change it, so you can prepare the chat before shoppers see it. The card also shows if TextYess detects the widget in your theme or on your site. If your plan does not include the onsite agent, the chat does not show on your store.

## Install the onsite chat on your website

You install the onsite chat once. After that, each change that you publish goes to your store automatically.

* Shopify: on the **Appearance** tab, in **Widget installation**, click **Open Shopify Theme Editor**. Turn on the TextYess app embed and save. If your Shopify store is not connected, connect it first. See [Install the onsite widget on Shopify](/onsite-widget-installation-shopify).
* Other platforms: copy the code in **Widget installation**. Paste it once before the closing `</body>` tag of your website. See [Install the onsite widget on WooCommerce](/onsite-widget-installation-woocommerce).

Then turn on **Show the widget on my store** in the **Store visibility** card.

## Where the onsite chat shows on your website

When the chat is **Live**, the chat bubble shows on every page of your store. On a phone, the chat opens full screen.

You can also open the chat from your own button or link:

1. On the **Appearance** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite), find **Trigger & Visibility**.
2. In **Custom trigger selector (optional)**, enter the CSS selector of your element, for example `#ask-ai-btn`.
3. Optional: turn on **Hide floating bubble**. This option works only when a selector is set.
4. Click **Publish**.

## Set the onsite agent's name, tone and rules

On the **Instructions** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite):

1. In **Agent Name**, type the name of the agent.
2. In **Tone Preset**, select **Friendly**, **Formal**, **Irreverent**, **Funny** or **Custom (AI-Generated)**. A preset fills **Personality Description** for you. The limit of **Personality Description** is 5,000 characters.
3. In **Operational Rules**, write the instructions that the agent must follow. The usual limit is 7,000 characters. The counter under the field shows your limit.
4. To let the AI write a rule, click **Add rule**, describe the rule, and click **Generate**.
5. Click **Publish**.

For tips on rules, see [Improve your AI agent's answers](/improve-ai).

## Onsite agent tools

The **Tools** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite) has these tools:

* **Escalation to Human**: the agent asks for the shopper's email, so that your team can contact the shopper. Off by default.
* **Order Tracking**: the agent looks up an order's status. Shopify stores only.
* **Follow-up questions**: the chat shows suggested follow-up questions after each reply. On by default.
* **Discount codes**: the agent can show one of the codes that you allow, once in each conversation. The **Allowed discounts** list shows for Shopify stores only.
* **Dynamic Suggested Queries in PDP**: on product pages, the chat suggests questions about that product. Shopify stores only.

Turn a tool on or off and click **Publish**.

## Hand an onsite conversation to your team by email

Turn on **Escalation to Human** on the **Tools** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite), then click **Publish**.

When a shopper wants to talk to a person, the agent asks for their email address. After the shopper gives a valid email, TextYess passes the conversation to your team:

* The conversation shows in **Needs attention** in the [Inbox](https://ai.textyess.com/inbox).
* The team members who turned on **Human support request** in [Settings → Account → Notifications](https://ai.textyess.com/profile/notifications) get an email. It has the shopper's email address, last message and the reason.

Reply to the shopper by email. You cannot reply in the onsite chat from the Inbox. The agent continues to answer the shopper in the chat. When **Escalation to Human** is off, the agent tells shoppers to contact your store directly.

## Which languages the onsite agent uses

The onsite agent answers in the language of the shopper's message. If the shopper changes language, the agent changes too.

The chat uses the language of your store page. If the page has no language, it uses the language of the shopper's browser. The chat buttons and labels exist in English, Italian, French, Spanish and German. For other languages, they show in English.

Your **Badge Text**, **Dialog Title**, **Welcome Message** and **Popular Questions** are translated automatically into the language of the page, for up to 12 languages. To write your own text for a language, open **Message customization** on the **Appearance** tab and click **Customize a language**.

## Change how the onsite chat looks

On the **Appearance** tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite):

* **Bubble Appearance**: **Badge Text**, **Main Color**, **Text Color**, **Bubble Image** (PNG, JPG or WebP, up to 5 MB) and **Bubble Position** (**Right Center**, **Bottom Right**, **Bottom Center** or **Bottom Left**).
* **Message customization**: **Dialog Title**, **Welcome Message** and up to 3 **Popular Questions**. Click **Generate with AI** to let the AI suggest questions.
* **Display Mode**: **Modal (centered)** or **Sidepanel (right edge)**. For the side panel, select a **Behavior**: **Overlay (panel sits on top)** or **Push content (page reflows)**.

Click **Publish**. The preview on the right shows your changes before you publish.

## Product cards and add to cart in the onsite chat

When a shopper asks about products, the onsite agent shows product cards with an image, the title and the price. **View** opens the product page.

On Shopify stores, the shopper can select a size or a color and add the product to the cart from the chat. Add to cart works only with the Shopify cart. On other platforms, hide the add-to-cart button as the [WooCommerce guide](/onsite-widget-installation-woocommerce) shows.

## Where onsite conversations show in the dashboard

Onsite conversations show in the [Inbox](https://ai.textyess.com/inbox), with the channel **Onsite**. They are read-only: you cannot reply from the Inbox. Under each AI reply, use **Why this answer?** and **Revise answer** to check and fix answers. See [Improve your AI agent's answers](/improve-ai).

Each AI reply in the onsite chat uses your plan's AI replies. If no replies are left, the chat shows "The assistant is temporarily unavailable. Please try again later." See your [Plan](https://ai.textyess.com/organization-settings/plan).

## Test the onsite agent before you publish

Each tab of [Agents → Onsite Agent](https://ai.textyess.com/agents/onsite) shows a **Live Preview** of the chat on the right. Type a question in the preview to test the agent.

The preview shows your appearance changes immediately. The preview chat uses your unpublished **Operational Rules**. Your other changes, such as the name and the tone, reach the preview chat after you publish. Test chats from the preview do not show in the Inbox.

## How long until onsite changes are live

* Look and texts of the chat: at the next page load on your store, after you click **Publish**.
* Agent behavior (rules, tone, tools and Brand info): up to 5 minutes after you click **Publish**.
* **Show the widget on my store**: at the next page load after you change the switch. You do not need to publish.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.