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

# Agents

> Configure response delay, handling of chats with history, and agent automation.

Open **Settings → Agents** to control how the AI agent responds and when it automatically joins a conversation. Save changes separately in each section.

## Response delay

A delay gives customers time to send several short messages in a row. The agent waits after the user's last message so it can process the messages together.

1. In **Response delay**, enter a value in **Delay before responding**.
2. Set a value from **0 to 40 seconds**. **0** means the agent responds without an additional delay.
3. Click **Save response delay**.

## Handling chats with history

**Respond in chats with history** determines whether the AI agent can handle chats that already contain previous messages, including conversations with returning customers.

1. Find **Handling chats with history**.
2. Enable **Respond in chats with history** to allow these chats, or disable it to restrict the agent to new chats.
3. Click **Save** in this section.

Enabling this option does not send messages to old chats on its own. The agent only responds to a user message.

![Response delay and settings for chats with history](https://mintcdn.com/costcare/YQbNVQpCiWEnCHct/images/settings/agent-responses-uk.gif?s=3446107cc43e7dcbcbe646d7991df6ad)

The illustration shows the Ukrainian interface.

## Agent automation

The **Agent automation** section has two independent switches:

* **Enable the agent in new chats** — the agent automatically joins new chats and starts responding without a manager's involvement.
* **Disable the agent after a manager's message** — the agent turns off in the chat as soon as a manager sends a message, and a person continues the conversation.

Set the options you need and click **Save** in this section.

## New conversation after a pause

This option treats the next message after a long break as the start of a new conversation.

1. In **New conversation after a pause**, enable **Start a new conversation after a pause**.
2. In **Pause duration**, enter the number of days.
3. Click **Save** in this section.

The pause is measured from the last message of any type: customer, manager, or AI agent.

> [!NOTE]
>
> When this option is enabled, after the specified pause the agent sees only messages from the new conversation. **Enable the agent in new chats** treats this chat as new. Keep this in mind if you want the agent to resume work automatically after a break.

For example, if you set **7 days**, the next message after that pause starts a new conversation. The agent uses the messages sent after the pause as the context for that conversation.

![Automatic agent activation and deactivation, and a new conversation after a pause](https://mintcdn.com/costcare/usej2wNwo3JOl0lQ/images/settings/agent-automation-uk.gif?s=ec2e4bea01d104e5055607f1eae6a43e)

The illustration shows the Ukrainian interface.


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