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

# AI Agent

> Create an AI agent that answers people from your documents and website, and hands chats to your team when it should

The **AI Agent** answers people in your website chat, only from the knowledge you add. When it can't help, or someone asks for a person, it hands the chat to your team's [Inbox](https://docs.relyant.app/crm/inbox.md).

> [!NOTE]
>
> You need CRM **Settings** access to create the agent or change its preferences, and **Knowledge base** access to add or change sources.

## Create your agent

The first time you open **AI Agent**, you see **Meet your AI agent**.

**1. Get started**

Click **Get started**.

**2. Name your agent**

Under **Public name**, enter the name people see, for example "Admissions Assistant".

**3. Add an avatar (optional)**

Under **Avatar**, upload an image. The recommended size is 240×240px. The preview shows how your agent will appear to people.

**4. Create it**

Click **Create agent**. You can change the name and avatar later in **Preferences**.

The agent stays off until you turn it on. Its page then shows the agent's name, whether it's **Live** or **Off**, and four tabs: **Overview**, **Knowledge**, **Preferences** and **Preview**.

## Overview

**Overview** shows how far setup has got (**Limited**, **Not live** or **Live**). Until setup is finished, a **Setup** checklist shows how many steps are done: **Knowledge sources**, **Deployment**, **Tone & instructions** and **Preview**.

* **Knowledge sources** and **Deployment** tick themselves once you have ready sources and the agent is live.
* **Tone & instructions** ticks itself once you change the tone or instructions from the defaults.
* **Preview** ticks itself the first time you ask a question in **Preview**.

If you've already checked a step, click **Mark as done** on **Tone & instructions** or **Preview**. Click **Undo** to reopen a step you marked by hand. The checklist disappears once every step is done.

Under **Results**, pick 7, 30 or 90 days to see how many **Chats** started, how many were **Answered by the assistant** or **Handed to the team**, and the **Assistant replies** sent. **Why chats were handed over** lists the reasons, and **Most used knowledge** shows which sources answer most often.

### Unanswered questions

**Unanswered** lists the questions the agent couldn't answer from your knowledge, so it handed the chat to your team. For each one:

* Click **Write an answer** to write an article with the question as its title. Once saved, the agent answers the next person itself.
* Click **Open chat** to see the conversation in the inbox.

## Knowledge

**Knowledge** is everything the agent answers from. Click **Add source** and choose:

| Source | How to add it |
| - | - |
| **Upload files** | PDF, Word or text files, up to 20 MB each, such as brochures, price lists, handbooks or policies. You can also drag files onto the page |
| **Add a website** | Under **Websites**, enter your website's address, such as `yourschool.sch.id`, and click **Add website**. Relyant finds the website's sitemap for you and reads every page it lists. Under **Individual URLs**, click **Add URL** to add a single page, such as one the sitemap doesn't list |
| **Write an article** | Enter a **Question or title** and the **Answer** in your own words. Turn off **Use in answers** to keep it as a draft the agent ignores |

> [!TIP]
>
> Writing an article is the best way to fix a wrong answer: add the question people ask and the answer you want them to get.

Each source shows a status: **Ready**, **Processing**, **Failed** or **Draft**. Only ready sources are used. To refresh a web page, click **Sync now**; to read a website again, click **Crawl again**. Each crawl looks for the website's sitemap again, so a rebuilt website is picked up. The website's row shows the sitemap it found. Deleting a source stops the agent using it straight away.

## Preferences

**Preferences** holds the agent's settings. Click **Save changes** when you're done. To try answers, use the [Preview](#preview) tab.

* **Deployment**: turn on **Answer people in the chat**, and choose **When the agent replies**:
  * **Answer first, hand off when needed** replies to every new chat.
  * **Only outside office hours** lets your team answer during the day while the agent covers evenings, weekends and holidays.
  * **Suggest replies to staff only** never writes to contacts. Staff get drafts from **Suggest reply** in the inbox.
* **Identity**: the **Public name**, **Avatar** and **Tone** (**Warm and professional**, **Formal** or **Brief**). Turn on **Reply in their language** to answer in English, Bahasa Indonesia or whatever they write in.
* **Instructions**: rules the agent always follows, written as you'd brief a new colleague.
* **Hand the chat to the team when**: add words under **The chat mentions**, and set how many assistant replies one chat can have before a person takes over.
* **Playbooks**: if Admissions is turned on, **Help people apply in chat** lets the agent fill in an admission form with them. Choose the **Form**, and turn on **Offer to apply** if the agent may ask once when someone seems interested.

## Preview

**Preview** lets you chat as a visitor would. Nothing is sent to anyone. **Questions to try** lists questions your knowledge can answer; click one to ask it, or click **Refresh** for a new list. Click **New chat** to start again.

Answers show **From:** with the sources they used. When the agent would hand the chat over, the preview says **Hands the chat to your team** and, where it can, what to add, for example "To answer this, add: …". Click **Write an answer** or **Add knowledge** to fill the gap.

## When the agent hands over

The agent hands the chat to your team when someone **Asked for a person**, the answer is **Not in the knowledge base**, the request **Needs someone to act**, the chat mentions a **Sensitive topic** from your list, or it **Reached the AI reply limit**. The chat appears in the team's inbox, and your team gets a notification. Once anyone on your team replies, the agent stops answering that chat.


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