# Chat analysis: build an agent from your own conversations

Before you design a flow agent, it helps to know what customers actually ask. **Chat analysis** reads the latest conversations your team has already answered in one inbox, groups them into **intents** (the reasons people get in touch), and shows how customers phrase each one and how your team usually answers. Nothing is built or changed until you ask for a draft.

## Start an analysis

1. Open **Flow Agents** and click **Analyse chats** at the top of the page.
2. Under **Inbox**, pick the inbox to read. The dialog tells you how many recent conversations with a team reply qualify, and how many will be read.
3. Click **Start analysis**.

![The Analyse chats dialog](../../.gitbook/assets/guides/chat-analysis-dialog.jpg)

Only conversations where a person on your team replied are read, so the map reflects how your business really answers. If an inbox has none yet, the dialog says there is nothing to analyse; pick a busier inbox.

The first run reads the latest 30 such conversations. The page shows its progress (**Waiting to start**, **Reading conversations**, **Grouping into intents**, **Ready**) and you can leave it and come back; **Open the latest analysis of this inbox** in the dialog takes you straight to the last result.

## Read the map

When the analysis is **Ready**, the top of the page shows **Conversations read**, **Intents found**, conversations **Left out as noise**, any that **could not be read**, and the **Languages** customers used.

Each intent is a card with:

* its share of the sample, for example *12 of 30 conversations*;
* **How customers put it**: real phrasings from the chats;
* **Your team usually asks for**: the details your team collects for this kind of request;
* **How your team usually answers**: the typical reply;
* links to each conversation behind it (**Open conversation #…**).

Below the cards, **Conversations read** lists every chat in the sample with its language and outcome (**Answered**, **Handed to the team**, **Booked**, **No reply**, **Unclear**). Chats that were not a real customer request are marked as noise with the reason: **Another business's message**, **Automated reply**, **Spam** or **Too short to tell**.

Use **Hide from the map** on any intent you do not want in your agent, such as a one-off topic. **Show again** brings it back.

## Widen the sample

If the sample feels too small, **Widen to 40 conversations** (then 50) reads more of your history and redraws the map. **Run again** starts a fresh analysis of the same inbox, for example after a busy month.

## Turn the map into a draft agent

Click **Draft agent**. Mampu AI writes a draft flow agent that follows the map: built around the main reason customers write in, or as a menu when the reasons are spread out. Smaller intents become FAQ drafts in AI Knowledge; hidden intents are left out. When it is ready, **Open draft agent** opens it in the designer.

The draft is not connected to any inbox and answers nobody until you publish it. Review it in the designer and the Playground first, and approve the FAQ drafts under **Review FAQ drafts** in AI Knowledge; see [Managing AI Knowledge](/flow-agents/managing-ai-knowledge).

## When something goes wrong

* **No intents came out of these conversations**: the chats were too varied or too few. Widen the sample or pick a busier inbox.
* **The analysis stopped before finishing** or **The draft could not be written**: run it again a little later.
* **Chat analysis is not available for this account yet**: the feature is not switched on for your plan.

## Related

* [Creating a Flow Agent](/flow-agents/creating-a-flow-agent)
* [Building the conversation flow](/flow-agents/building-the-conversation-flow)
* [Managing AI Knowledge](/flow-agents/managing-ai-knowledge)
* [Testing and connecting an agent](/flow-agents/testing-and-connecting-an-agent)

---
Source: https://help.mampuai.com/flow-agents/chat-analysis
