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

# Preview and test your AI agent in the Playground

> Preview your AI agent across supported channels and customize its style and capabilities in real time

The Chatbase **Playground** is where you preview and chat with your AI agent the way your customers will, before and after you deploy it. You can switch between channels such as the Chat Bubble, Help Page, Messenger, and Slack, and edit each channel's settings while you watch the effect. The Playground is for anyone who builds or reviews the AI agent: workspace Owners and Members can test and edit there, and Viewers can test without changing settings.

The Playground runs your draft, so changes you've saved but not published yet show up here first. Your live channels keep the published setup until you publish. See [Drafts and versions](https://chatbase.co/docs/user-guides/chatbot/versions.md).

When you open the Playground, it automatically loads the last channel you were working on from the **Channels** page. For example, if you last viewed the **Chat Bubble** or **Help Page**, the Playground opens that same channel so you can continue testing without switching views.

> [card] What you can do:
>
> See your AI agent the way a visitor will, change its style and capabilities in place, and share a preview link of your live AI agent with your team.

Use the Playground to:

* Preview your AI agent's behavior in real time
* Test conversations and responses
* Edit channel-specific settings, such as your AI agent's **style** and **capabilities**, and immediately see how those changes affect the experience

To preview a different channel, click the channel name at the top of the page and pick one from the list, or choose **View all channels** to go to the [Channels](https://chatbase.co/docs/user-guides/chatbot/channels.md) page.

![The Playground previewing an AI agent in the Chat Bubble channel](https://mintcdn.com/chatbase/St1vNiMgEx0Vl5Y7/user-guides/chatbot/images/playground/playground.png?fit=max\&auto=format\&n=St1vNiMgEx0Vl5Y7\&q=85\&s=183ca60368e512a2a01acd6c8652c7f8)

## Tabs

The tabs available depend on which channel you are previewing. A web channel such as **Chat Bubble** shows:

| Tab | What it controls |
| - | - |
| **Overview** | Your AI agent's **Model** and a read-only **Data Sources** summary (training status, total size, and counts of Links, Texts, and Q\&A's), both of which apply to the whole AI agent. Below them, the **Actions** available in this channel and the **Instructions** it uses. |
| **Display** | Appearance and behavior for this channel, grouped into **Content**, **Capabilities**, **Colors**, **Floating bubble**, and **Localization**. See [Chat Bubble display settings](https://chatbase.co/docs/user-guides/chatbot/channels.md#chat-bubble-display). |
| **Voice** | Your AI agent's voice conversation settings. See [Voice](https://chatbase.co/docs/user-guides/chatbot/voice.md). |
| **Actions** | The Actions this channel can run. |

Other channels expose a different set. **Messenger**, for example, replaces **Voice** with **Leads**, and the **Slack** channel uses **Overview**, **Connections**, **Actions**, and **Extra Settings**.

### Instructions and global instructions

On the **Overview** tab, **Sync with global instructions** controls whether this channel uses your AI agent's global instructions or its own. Leave it on to keep every channel consistent; turn it off to write instructions that apply only to this channel.

## Chat as user

**Chat as user** starts a Playground conversation as an identified user of your choice, so you can see what a signed-in customer would see and test Actions that only run for an identified user.

Click **Chat as user** in the top right, then:

* **User ID:** the identifier the conversation runs under. A test ID is generated for you, and the refresh button beside the field generates a new one. Replace it with a real user ID to chat as that user.
* **Metadata:** a JSON object of details for that user. Edit the **name** and **email**, or add your own fields, then chat to see how your AI agent handles that user. Your AI agent reads these values, and Actions receive them as `{contact.*}` variables.

For example, to check how your AI agent treats a customer on a paid plan, you could set the metadata to:

```json theme={null}
{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "plan": "Premium"
}
```

Then ask "Which features are included in my plan?" and check that the answer fits a Premium customer.

![The Chat as user panel with a User ID and metadata for the test user](https://mintcdn.com/chatbase/r1e0UruaUAHt8eYG/user-guides/chatbot/images/playground/playground-chat-as-user.png?fit=max\&auto=format\&n=r1e0UruaUAHt8eYG\&q=85\&s=4ff2dd7703d591513151108601da48df)

Click **Chat as user** to start the conversation. This is the Playground equivalent of the details your site passes with [identity verification](https://chatbase.co/docs/developer-guides/website-integration/identity-verification.md), so it's the fastest way to check how your AI agent greets and handles a known customer.

## Preview

Click **Preview** in the top-right to open your AI agent on a page of its own. The preview opens in a new tab and renders the AI agent on an otherwise empty page, so you can see and use it the way a visitor would instead of inside the Playground's editing layout.

The preview shows your live AI agent, the version your visitors get, not your draft. Changes you haven't published yet only show in the Playground, so [publish](https://chatbase.co/docs/user-guides/chatbot/versions.md) them to see them in the preview.

A toolbar at the top of the preview page controls how the page around your AI agent looks:

* **Light and dark**: switch the page background between light and dark to check your AI agent's colors against both.
* **Upload background**: upload an image, such as a screenshot of your own website, to sit behind the AI agent. This shows how your AI agent will look in place on your site before you deploy it anywhere.

Everything else behaves as it would once deployed, including initial messages, suggested questions, the floating bubble and its label, and the full conversation.

### Share a preview link

At first, only members of your workspace can open the preview link. To share the preview with someone outside your workspace, such as a client, your manager, or a teammate:

**1. Open the Preview menu**

In the Playground, click the arrow next to **Preview**.

**2. Turn on public access**

Turn on **Anyone with the link can view**.

**3. Copy and send the link**

Choose **Copy link** and send it. Anyone with the link can open the preview without signing in, which makes it a convenient way to collect feedback before you deploy.

Turn the setting off to limit the link to your workspace again. The shared preview shows your published AI agent, so publish your draft before you ask for feedback on new changes.

![The Preview dropdown with the Anyone with the link can view toggle and Copy link](https://mintcdn.com/chatbase/7LR7uq7E6gUFhcEf/user-guides/chatbot/images/playground/playground-preview-share.png?fit=max\&auto=format\&n=7LR7uq7E6gUFhcEf\&q=85\&s=4dcf5f5bc3fa9359b2b6a823646e84c0)

Sharing is set separately for the Chat Bubble and Center Stage, so sharing one doesn't share the other. Changing it requires permission to edit the AI agent.

## Deploying

Click **Deploy** in the top-right to get the code or connection details for the current channel. For the Chat Bubble, the dropdown offers:

| Option | What it does |
| - | - |
| **Website widget** | A floating Chat Bubble on any website |
| **Website iframe** | The AI agent embedded as an inline element on any website |
| **Shopify** | Add the Chat Bubble to your Shopify storefront |
| **WordPress** | Add the Chat Bubble using the official Chatbase plugin |

> [!TIP]
>
> Open **Preview**, send your AI agent a few questions a real visitor would ask, and confirm the answers and the styling both hold up before you deploy.

### Pre-deploy checklist

Before you click **Deploy**, use the Playground to confirm that:

* Your AI agent answers your most common customer questions correctly, worded the way customers write them.
* It gives a clear fallback reply, instead of a guess, for a question your Data Sources don't cover.
* It stays on topic when you ask about something unrelated to your business.
* Escalation works: ask for a person and check that the AI agent offers a ticket or live chat.
* Actions that need a signed-in customer work when you start the conversation with [Chat as user](#chat-as-user).
* The **Display** tab settings, such as colors, initial messages, and suggested messages, look right in **Preview** on both light and dark backgrounds.
* The Chat Bubble's **Visibility** toggle on the **Overview** tab is on.
* You've clicked **Publish**, so your live channels and the preview link use the setup you tested.

For repeatable checks, such as a refund conversation you want to pass after every change, create [Tests](https://chatbase.co/docs/user-guides/chatbot/tests.md). A simulated customer talks to your AI agent and each conversation is graded automatically.

## Limitations

* **The Playground isn't a real store or site session.** Some Actions behave differently there: cart updates don't work, and payment completion isn't reported back. Actions that need an identified customer, such as the Stripe Actions, run only when you start the conversation with [Chat as user](#chat-as-user). See [Shopify Actions](https://chatbase.co/docs/user-guides/chatbot/actions/shopify-actions.md#limitations) and [Stripe Actions](https://chatbase.co/docs/user-guides/chatbot/actions/stripe-action.md#limitations).

## Frequently asked questions

> [accordion] Why does my AI agent answer differently in the Playground than on my website?
>
> The Playground uses your draft, while your website, other channels, and the preview link use the published version. If you've saved changes without publishing, the two give different answers until you click **Publish**. Other reasons answers can differ:
>
> * **Channel instructions:** a channel with **Sync with global instructions** turned off uses its own instructions. Check you're previewing the same channel your customers use.
> * **Signed-in customers:** your website may pass customer details through [identity verification](https://chatbase.co/docs/developer-guides/website-integration/identity-verification.md). Use [Chat as user](#chat-as-user) to test with the same details.
> * **Actions:** some Actions behave differently in the Playground. See [Limitations](#limitations).
> * **Temperature:** above 0, the same question can be worded differently each time. See [Temperature](https://chatbase.co/docs/user-guides/chatbot/build.md#temperature).

> [accordion] How do I see which source an answer came from?
>
> Ask the question in the Playground, then click **Show sources** below the chat. It lists the Data Sources the AI agent used for that reply, so you can update or remove the one behind a wrong answer.

> [accordion] Do Playground and Compare replies use message credits?
>
> Yes. Each reply uses the message credits of the model that wrote it, the same as a reply in a real conversation. In **Compare**, each chat box's reply uses the credits of its own model. See [Models comparison](https://chatbase.co/docs/user-guides/chatbot/models-comparison.md).

> [accordion] Do Playground conversations show up in Activity and Analytics?
>
> Yes. Playground conversations are counted in [Analytics](https://chatbase.co/docs/user-guides/chatbot/analytics.md), where **Chats by channel** lists them as Playground, and you can pause a Playground conversation from **Conversations** in [Activity](https://chatbase.co/docs/user-guides/chatbot/activity.md) like a conversation from any other channel. Conversations from [Tests](https://chatbase.co/docs/user-guides/chatbot/tests.md) are not saved to **Conversations**.

> [accordion] Can I test my AI agent as a signed-in customer?
>
> Yes. Click **Chat as user**, set a **User ID**, and edit the **Metadata** with the customer's details. Your AI agent reads these values, and Actions receive them as `{contact.*}` variables. See [Chat as user](#chat-as-user).

> [accordion] How do I share my AI agent with someone outside my workspace?
>
> Click the arrow next to **Preview**, turn on **Anyone with the link can view**, and choose **Copy link**. Anyone with the link can chat with your published AI agent without signing in. See [Share a preview link](#share-a-preview-link).

> [accordion] Why don't cart or payment Actions work in the Playground?
>
> The Playground isn't a real store or site session, so cart updates don't work and payment completion isn't reported back. Test those Actions from a live channel. See [Shopify Actions](https://chatbase.co/docs/user-guides/chatbot/actions/shopify-actions.md#limitations).

## Next steps

> [card] [Channels](https://chatbase.co/docs/user-guides/chatbot/channels.md)
>
> Configure each channel your AI agent runs on, and its display settings.

> [card] [Build](https://chatbase.co/docs/user-guides/chatbot/build.md)
>
> Edit the instructions, model, and temperature behind every channel.

> [card] [Actions](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md)
>
> Give your AI agent things to do beyond answering questions.

> [card] [Best Practices](https://chatbase.co/docs/user-guides/quick-start/best-practices.md)
>
> Proven ways to improve the answers you're seeing in the preview.


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