> ## Content Index
> Fetch the complete content index at: https://blog.getzep.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Announcing Zep Archive: Records Retention and Right To Be Forgotten
- URL: https://blog.getzep.com/announcing-zep-archive-regulatory-compliance-and/
- Published: 2023-10-13T14:18:41.000Z
- Updated: 2023-10-13T15:13:48.000Z
- Description: Zep Simplifies LLM App Compliance with Data Privacy Regulations like GDPR and CCPA
- Author: Daniel Chalef

Building a production-ready user-facing app requires complying with data privacy regulations such as California's CCPA and the EU's GDPR. For many applications, retention of records for a period of time is also required. Apps with conversational interfaces powered by LLMs are no different.

*Zep Archive* is a collection of features available in Zep that support meeting these data governance challenges, including archiving all message histories and executing *Right To Be Forgotten* requests. 

Implementation is fast and simple. If you're using LangChain, [adding the ZepMemory class](https://docs.getzep.com/sdk/chat%5Fhistory/memories/?ref=blog.getzep.com) to your chain and [creating users](https://docs.getzep.com/sdk/chat%5Fhistory/users/?ref=blog.getzep.com) automatically enables *Zep Archive* features.

### Archive all user data, including message histories

When using Zep's MemoryStore, all user sessions and messages, including AI responses, are timestamped and archived. Timestamping and Zep's soft-delete and purge capabilities (described in more detail below) allow time-based retention policies to be efficiently implemented. 

While periodic time-based record deletion needs to be configured manually today, we are considering how to offer this as a core feature to enterprise customers.

![Zep Web UI](https://storage.ghost.io/c/79/c4/79c4903e-2432-4c0e-b8c8-c8988fef71ec/content/images/2023/10/zep-web-ui.png)

Timestamped Chat History Archiving

### Fulfill *Right To Be Forgotten* requests

Zep makes it simple to execute *Right To Be Forgotten* requests. When using the Zep UserStore, all [user data can be deleted](https://docs.getzep.com/sdk/chat%5Fhistory/users/?ref=blog.getzep.com#deleting-a-user) with a single API call or via the Zep Web UI. 

This dataset includes the user and their chat message history texts and derived data such as extracted metadata, intent analysis results, and embeddings used to search over historical conversations.

```typescript
await client.user.delete("user123");
```

A single API call to fulfill Right to Be Forgotten Requests

### Retrieve Chat Histories by Date and Search Terms

Zep's MemoryStore [search functionality](https://docs.getzep.com/sdk/chat%5Fhistory/search/?ref=blog.getzep.com#hybrid-search-for-messages-using-message-metadata) allows for datetime and keyword searches over a user's chat history, supporting many discovery use cases.

```typescript
const searchPayload = new MemorySearchPayload({ 
  metadata: {
    "start_date": "2022-01-01",
    "end_date": "2022-01-31"
  },
  text: searchText
});

const searchResults = await zepClient.searchMemory(
  sessionID,
  searchPayload
);
```

TypeScript example code demonstrating search by timestamp

### Soft-Deletes and Batched Expunge

Zep soft-deletes data before [periodically purging it](https://docs.getzep.com/deployment/data/?ref=blog.getzep.com). This applies to all deleted data, including user data deleted via executed *Right To Be Forgotten* requests. For customers with large user bases, any impact on application performance is mitigated.

The period between purges can [easily be configured](https://docs.getzep.com/deployment/data/?ref=blog.getzep.com) and defaults to once an hour.

### Next Steps

- Zep [Quick Start Guide](https://docs.getzep.com/deployment/quickstart/?ref=blog.getzep.com)
- [Documentation](https://docs.getzep.com/?ref=blog.getzep.com)