# When the AI hands off to your team

Why the assistant passes a conversation to a person, what the customer and your agents see, and how to take over or give it back.

A good assistant knows when to stop. The AI assistant hands a conversation to your team whenever it cannot answer from your knowledge or the customer needs a person. This page explains when that happens, what follows, and how agents take over or give the conversation back.

## When it hands off

| Reason (as the conversation shows it) | When |
|---|---|
| **Not in knowledge base** (`not_in_knowledge`) | The answer is not in your knowledge, or the knowledge base is empty. The question also lands in **Unanswered questions** on the **Knowledge** tab. |
| **Asked for a person** (`requested`) | The customer asks for a person. |
| **Complaint** (`complaint`) | The customer complains. |
| **Refund / cancellation** (`refund`) | The customer wants a refund or to cancel. |
| **Payment** (`payment`) | The customer has a problem with a payment they made: charged twice, transfer not received, checkout failed. Questions about prices or how to pay are answered, not handed off. |
| **Personal data** (`personal_data`) | The customer wants to change personal or account data. |
| **Turn limit reached** (`max_turns`) | The assistant reached **Max assistant replies before hand-off** in this conversation (6 by default). |
| **Situation** (`situation`) | One of your [situations](https://hatang.dev/help/ai/situations) says **Hand off to an agent**. |
| **Other** (`other`) | Anything else, including an error while the assistant was answering. |

## What happens next

1. **The customer** gets the assistant's own last message, or your **Hand-off phrase** ("Mình sẽ chuyển bạn tới nhân viên hỗ trợ ngay nhé." by default; the English phrase goes to customers whose language is English).
2. **Your agents** see a private note in the conversation with the reason and a one or two sentence summary of what the customer wants, so nobody has to scroll back.
3. **The conversation is routed** by your [distribution rules](https://hatang.dev/help/automation/routing-rules), exactly like a new conversation. A situation can instead hand it to a specific agent.
4. **If nobody is online**, the conversation is set to pending and your team is notified by email, as for any message that arrives while nobody is around.
5. **Workflows** that start on **The AI hands off to an agent** run, and a webhook event is sent to your systems if you use them. See [Workflows](https://hatang.dev/help/automation/workflows) and the [developer hub](https://hatang.dev/docs/guides/support/ai-assistant).

From then on, the assistant stays quiet in that conversation. If **After a hand-off, keep suggesting replies to the agent** is on, it keeps writing suggestions for the agent while someone is online.

## In the inbox

A banner above the conversation tells agents what the AI is doing:

- While the AI is answering: "The AI assistant is answering this conversation." Click **Stop AI** to take over. The assistant and your flows stay silent in this conversation until someone resumes them.
- After a hand-off: "The AI assistant handed this conversation to a human." It stays quiet until you resume it or resolve the conversation.
- Click **Resume AI** to give the conversation back to the assistant. Its reply count starts again from zero.

Assigning the conversation to a person also silences the assistant: it never answers in a conversation a person owns.

### Suggested replies

When the assistant drafts instead of answering, an **AI suggestion** appears above the composer. Click **Insert** to put it in the composer, edit it and send it, or **Discard** to dismiss it. When the knowledge does not cover the question, the suggestion says honestly that the team will check and follow up.

## When the customer comes back

If a handed-off conversation is resolved and the customer writes again later, the assistant answers again with a fresh reply count.

## Make it hand off less often, or more

- **Too many `not_in_knowledge`**: answer the questions in **Unanswered questions** and they become part of the knowledge. See [Unanswered questions](https://hatang.dev/help/ai/knowledge-gaps).
- **Too many `max_turns`**: raise **Max assistant replies before hand-off** on the **Assistant** tab, up to 20.
- **You want a person in certain cases** (wholesale orders, angry customers, a VIP channel): add a [situation](https://hatang.dev/help/ai/situations) with **Hand off to an agent** or **Bring in an agent to follow along (the AI keeps replying)**.
- **You want it never to hand off outside office hours**: the **Ngoài giờ làm việc** situation template tells it to keep answering and collect a phone number instead.
