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

# AI Agents

> Create an agent that answers your customers on WhatsApp, and learn when it replies and when it calls the team.

## What it's for

The AI agent answers your customers right away, 24 hours a day, asks the first questions, and calls the team when it needs to. You follow everything and can pause the agent in any conversation.

Each inbox is served by one agent. The **Main** one serves the inboxes that have no agent chosen.

It appears if the agency has enabled the AI Agents module for the organization. Without it, the screen says: "This module is enabled by your agency. Talk to them to turn it on."

## Who can do it

* **Owner and Admin** set up the agents.
* **Supervisor** sees everything but cannot change anything ("You can see everything, but not change it").
* **Operator** does not open the area. In the conversation they can **pause the agent in this conversation**, **hand the conversation to the team**, and **give the conversation back to the agent**.

## Where to click

In the menu, **AI Agents** (`/ia`). Three tabs: **Agents**, **Live**, and **What the agent knows**. The general settings (**Conversation stages**, **Hours**, **Reminders**, **Tools**, **Advanced**) are in **Agents settings**.

## Step by step

**1. Create the agent**

In **Agents**, click **New agent** (or **Create agent from scratch**). The first one becomes the **Main** one. There are six steps, with the customer's preview alongside.

**2. Who it is**

Set the **Name the customer sees**, the role, **Who thinks for it** (the AI that writes the replies), and the **Way of talking**: **Friendly**, **Direct**, **Formal**, or **Casual**.

**3. What it knows and where it answers**

Choose the materials it consults, what it **does NOT answer**, and **which inboxes it answers on**.

**4. When it answers**

Choose **All day, every day**, **Only at these hours**, or **Only outside business hours**, and what it says outside the hours.

**5. When it calls the team**

Tick situations such as the customer asking for a person, a complaint, or the agent not knowing how to answer after 2 tries.

**6. Turn on**

Click **Turn on now**, or **Save turned off** to leave it for later.

## What happens next

The agent answers anyone who writes to its inboxes. When it calls the team, the conversation goes to the queue with the summary and the agent stops answering in it. See what is going on in **Live**: **Answering now**, **Passed to the team**, and **Paused**. In each conversation there are **Pause the agent in this conversation**, **Resume**, and **Take over**.

On Instagram the agent answers briefly and only within the 24-hour window.

## Common errors

* **AI agents are not available yet.** The engine has not been released for the organization yet. Nothing was changed.
* **The provider key is missing for: name.** Those agents stopped answering. Add the key in [AI keys and media reading](https://docs.stchat.app/en/subcontas/ia-chaves-e-transcricao.md).
* **The agent has nothing to think with yet.** A key still needs to be added.
* **Create a main agent before turning the agents on.**
* **Choose another agent as main before deleting this one.**
* **Turn the agents off before deleting the only agent.**
* **You reached the agents limit** (there are also limits on steps, tools, and documents). The number appears on the screen.
* **No active number is served by it** and **Instructions are missing**. Complete the step indicated.
* **Only Owner and Admin test the agent.**
* **The provider failed on the latest replies.** The conversation goes to the team queue.

## Next step

* [AI keys and media reading](https://docs.stchat.app/en/subcontas/ia-chaves-e-transcricao.md)
* [Flows: overview](https://docs.stchat.app/en/subcontas/flows.md)
* [Assign and resolve conversations](https://docs.stchat.app/en/subcontas/atribuir-e-resolver.md)


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