> ## 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](/agents/overview). This helps you manage data storage and comply with your organization's data governance policies.

<Info>
  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.
</Info>

## Required privilege

<Info>
  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](/settings/roles-and-groups). Saving changes or deleting
  chat history also requires edit access to that specific Agent.
</Info>

## Set a retention policy

<Steps>
  <Step title="Open the Agent">
    Navigate to the Agent you want to configure and click the **...** menu.
  </Step>

  <Step title="Access data retention settings">
    Select **Data Retention**. If you also have Agent export access, you'll find it nested under **Advanced** instead.

    <Frame>
      <img src="https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-menu-chat-retention.png?fit=max&auto=format&n=3ZfDJ4olE1CvCMVP&q=85&s=3fd772328ecc8d01d6f77eb8fa772f95" alt="Agent Advanced Settings Menu showing Data Retention" width="3840" height="1722" data-path="images/agents/agent-menu-chat-retention.png" />
    </Frame>
  </Step>

  <Step title="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.

    <Frame>
      <img src="https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-rentention-config-options.png?fit=max&auto=format&n=3ZfDJ4olE1CvCMVP&q=85&s=1caae58ad5675b83e223ba96e14529d3" alt="Agent Data Retention configuration options" width="3840" height="1722" data-path="images/agents/agent-chat-rentention-config-options.png" />
    </Frame>
  </Step>

  <Step title="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.

    <Frame>
      <img src="https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-retention-custom-period.png?fit=max&auto=format&n=3ZfDJ4olE1CvCMVP&q=85&s=c7d874b7d663758807cec43e4c04197b" alt="Agent Data Retention custom retention period" width="3840" height="1722" data-path="images/agents/agent-chat-retention-custom-period.png" />
    </Frame>
  </Step>

  <Step title="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.
  </Step>
</Steps>

## Manually delete chat history

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

<Steps>
  <Step title="Open data retention settings">
    Follow the steps above to navigate to the **Data Retention** settings for your Agent.
  </Step>

  <Step title="Delete chat history">
    Click **Delete Agent Chat History**, then click **Delete** again to confirm.

    <Frame>
      <img src="https://mintcdn.com/cassidy/3ZfDJ4olE1CvCMVP/images/agents/agent-chat-retention-delete-history.png?fit=max&auto=format&n=3ZfDJ4olE1CvCMVP&q=85&s=9b6e1acff96b0aa31d6a969f4bebc6b2" alt="Agent Data Retention custom retention period" width="3840" height="1722" data-path="images/agents/agent-chat-retention-delete-history.png" />
    </Frame>
  </Step>
</Steps>

<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.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Manage roles and permissions" icon="user-gear" href="/settings/roles-and-groups">
    Grant the Manage Agent Data Retention privilege to a custom role.
  </Card>

  <Card title="Enterprise security features" icon="shield-check" href="/security/enterprise-readiness">
    Learn about SSO, SAML, RBAC, and other enterprise controls.
  </Card>
</CardGroup>
