# Testing and Analytics

Try an AI agent in the Playground before customers see it, and read its performance on the Analytics tab

Before you attach an AI agent to a live channel, try it in the **Playground**. Once it is answering customers, the **Analytics** tab shows how well it is doing and which questions it can't answer yet.

## The Playground

Click **Testing** in the agent's page header. The **Playground** opens beside the page, where you can chat with the agent as a customer would.

1. Choose the channel to simulate:

   | Option | Use it to check |
   |--------|-----------------|
   | **WhatsApp** | Behaviour on WhatsApp (the default) |
   | **Instagram** | Behaviour on Instagram |
   | **Webchat (no form)** | A web chat widget without a pre-chat form |
   | **Webchat (form)** | A web chat widget that requires its pre-chat form — the agent skips [intake screening](/en/chatbots/handoff-and-routing#intake-screening) |

2. Type a message and send it. The reply arrives the way a customer would see it: split into the same bubbles, with the same pauses when **Human-like Mode** is on.
3. Keep chatting to test a whole conversation. Click **Clear** to start over.

The Playground uses the agent's saved settings and knowledge, so save your changes before testing them. It works even while the agent is switched off, so you can perfect it before going live.

### What the Playground does and doesn't do

- **Nothing reaches a customer.** Replies stay in the Playground and aren't counted in Analytics.
- **Handoffs are shown, not performed.** When the agent would hand off, you see "AI handed off — " followed by the reason, but no chat changes hands and nobody is notified.
- **Tools run for real.** Web browsing and any [MCP tools](/en/chatbots/tools-and-mcp) you allowed are actually called. Be careful with write tools.
- Greeting, fallback and error messages, max turns, sentiment escalation and intake screening all behave as they do on a live channel.

### Debug view

Click **Debug** to see what happened behind each reply:

| Field | What it shows |
|-------|---------------|
| **Response Time** | How long the reply took, in milliseconds |
| **Chunks Retrieved** | How many excerpts from your knowledge base the agent used |
| **Bubbles sent** | How many message bubbles the reply was split into |
| **Model** | The AI model that produced the reply |
| **Sentiment** | The sentiment detected in your message |
| **Language** | The language detected in your message |
| **Intake screening** | **On** if the agent was collecting intake details this turn |
| **Handoff** | Why the agent would have handed off, if it would have |
| **Guardrail** | Shown when a [safeguard](/en/chatbots/persona-and-behaviour#built-in-safeguards) changed or blocked the reply |
| **Retrieved Chunks** | The knowledge excerpts themselves, with their source |
| **Context Used** | The extra context the agent was given |

If **Chunks Retrieved** is 0 for a question your knowledge base should answer, reword the Q&A pair or add a source that covers it.

## Analytics

Open the **Analytics** tab to see how the agent performs on live channels. Choose the period at the top right: **7d**, **30d** (the default) or **90d**. Every card and chart on the tab follows the period you choose.

Analytics depends on your plan. Without basic analytics the tab shows an upgrade prompt; the charts and the unanswered-questions table need advanced analytics.

### Overview

| Metric | What it measures |
|--------|------------------|
| **Total Interactions** | Every time the agent handled a customer's turn — a reply, a handoff, or a failed attempt. Several messages answered together count as one |
| **Resolution Rate** | The share of interactions that did **not** end in a handoff |
| **Avg Response Time** | Average time from starting a reply to sending it, including the pauses between bubbles. The wait for more messages and the "reading" pause before typing aren't included |
| **Avg Confidence** | How well grounded the answers were, from 0 to 100%. A handoff or no reply scores 0; an answer without any knowledge excerpt scores 70%; an answer backed by knowledge scores 50% plus 10% per excerpt used, up to 100% |

### Sentiment Over Time

A daily chart of how many interactions were **Positive**, **Neutral** or **Negative**, judged from the customer's message. A rise in negative ones is a cue to read recent chats, or to turn on **Auto-escalate Negative Sentiment**. The chart stays empty while **Detect Sentiment** is off (unless **Auto-escalate Negative Sentiment** is on), because no sentiment is detected (see [Handoff and Routing](/en/chatbots/handoff-and-routing)).

### Language Distribution

How many interactions were in each language. Messages whose language couldn't be identified are counted as "Unknown". Use it to decide which **Languages** to add on the Persona tab. Languages are only detected while **Auto-detect Language** is on.

### Top Unanswered Questions

The 20 questions the agent most often couldn't answer in the period, with **Count**, average **Confidence** and **Last Seen**. A question counts as unanswered when the agent sent no reply, hit a technical error, or answered with its **Fallback Message**. Handoffs aren't counted here — those questions went to your team on purpose.

This table is your to-do list: add a Q&A pair or a source to the [knowledge base](/en/chatbots/knowledge-base) for each frequent question, then test it in the Playground. If you can edit AI agents, each row has a **Q&A** button that opens the **Add Q&A** form with the question already filled in as its **Title** and **Question** — write the answer in **Content** and save. The new pair appears in the **Knowledge** tab.

## Next steps

- [Knowledge Base](/en/chatbots/knowledge-base) — Fill the gaps the unanswered questions reveal
- [Persona and Behaviour](/en/chatbots/persona-and-behaviour) — Tune tone, fallback and response style
- [Assigning to Channels](/en/chatbots/assigning-to-channels) — Go live once you are happy
