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

# Configure data retention

> Control how long an Agent's chat history is stored to meet your organization's data governance requirements.

Chat retention settings let you control how long conversation history is stored for an [Agent](https://docs.cassidyai.com/agents/overview.md). This helps you manage data storage and comply with your organization's data governance policies.

> [!NOTE]
>
> Agent chat retention is an **Enterprise-only** feature. [Contact our sales
> team](https://www.cassidyai.com/demo) to learn more about upgrading to
> Enterprise access.

## Required privilege

> [!NOTE]
>
> Viewing and editing an Agent's chat retention settings requires the **Manage
> Agent Data Retention** admin privilege. Org Admins have this privilege by
> default. To grant it to other team members without full Admin access, add it
> to a [custom role](https://docs.cassidyai.com/settings/roles-and-groups.md). Saving changes or deleting
> chat history also requires edit access to that specific Agent.

## Set a retention policy

**1. Open the Agent**

Navigate to the Agent you want to configure and click the **...** menu.

**2. Access data retention settings**

Select **Data Retention**. If you also have Agent export access, you'll find it nested under **Advanced** instead.

![Agent Advanced Settings Menu showing Data Retention](https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-menu-chat-retention.png?fit=max\&auto=format\&n=3ZfDJ4olE1CvCMVP\&q=85\&s=3fd772328ecc8d01d6f77eb8fa772f95)

**3. Choose a retention type**

In the **Update Data Retention Period** dialog, select from the available options:

* **Forever** -- chat history is retained indefinitely, or until you manually delete it. This is the default for every Agent.
* **Custom** -- specify a retention period based on your needs.

![Agent Data Retention configuration options](https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-rentention-config-options.png?fit=max\&auto=format\&n=3ZfDJ4olE1CvCMVP\&q=85\&s=1caae58ad5675b83e223ba96e14529d3)

**4. Configure a custom period**

If you selected **Custom**, enter the retention duration (e.g., `30`) in the **Period** field and select the unit from the dropdown: **Hours**, **Days**, **Weeks**, **Months**, or **Years**. The minimum period is 1 hour.

![Agent Data Retention custom retention period](https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-retention-custom-period.png?fit=max\&auto=format\&n=3ZfDJ4olE1CvCMVP\&q=85\&s=c7d874b7d663758807cec43e4c04197b)

**5. Save**

Click **Save** to apply the retention settings. Cassidy automatically deletes chat history older than the configured period, for every user who has chatted with this Agent.

## Manually delete chat history

You can delete all existing chat history for an Agent at any time, regardless of the retention setting.

**1. Open data retention settings**

Follow the steps above to navigate to the **Data Retention** settings for your Agent.

**2. Delete chat history**

Click **Delete Agent Chat History**, then click **Delete** again to confirm.

![Agent Data Retention custom retention period](https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-retention-delete-history.png?fit=max\&auto=format\&n=3ZfDJ4olE1CvCMVP\&q=85\&s=9b6e1acff96b0aa31d6a969f4bebc6b2)

> [!WARNING]
>
> Deleting chat history -- whether by retention policy or manual deletion --
> removes it for every user who has chatted with the Agent, and it cannot be
> recovered. Make sure your settings align with your organization's data
> governance requirements before configuring retention.

## Next steps

> [card] [Manage roles and permissions](https://docs.cassidyai.com/settings/roles-and-groups.md)
>
> Grant the Manage Agent Data Retention privilege to a custom role.

> [card] [Enterprise security features](https://docs.cassidyai.com/security/enterprise-readiness.md)
>
> Learn about SSO, SAML, RBAC, and other enterprise controls.


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