# Constrain how long Rasa X maintains tracker events (chat history)

**URL:** <https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [January 25, 2022, 4:08pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872 "2022-01-25T16:08:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScienceGuy](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ScienceGuy](https://forum.rasa.com/u/ScienceGuy)\
**Post date:** [January 25, 2022, 4:08pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/1 "2022-01-25T16:08:11Z")

</div>

Is there any way to constrain how long Rasa X keeps track of conversations? I would like that it forgets/deletes events after a session or period to minimize data privacy issues.

If it does not have a function, would it be enough to run a script periodically that deletes events in the tracker store (or triggers the Rasas X API)?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [January 25, 2022, 4:16pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/2 "2022-01-25T16:16:21Z")

</div>

@ScienceGuy you means storing the chat history of bot/user while using database? or you are talking about InMemoryTrackerStore?

---

<div class="post-metadata">

**Author:** ![ScienceGuy](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ScienceGuy](https://forum.rasa.com/u/ScienceGuy)\
**Post date:** [January 25, 2022, 4:23pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/3 "2022-01-25T16:23:13Z")

</div>

I mean in the case that I use a Rasa X stack where the tracker seems to be a database (no in-memory store).

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [January 25, 2022, 4:57pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/4 "2022-01-25T16:57:55Z")

</div>

@ScienceGuy Ok.I guess Rasa X not store any of the conversation or track the conversation.

When running locally, Rasa X **uses SQLite to store data** , including the conversations between your users and your assistant. As, our Github repo is connected with Rasa X, so it also stored the training examples. You can delete the database anytime.

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [January 26, 2022, 6:04am UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/5 "2022-01-26T06:04:41Z")

</div>

> [@ScienceGuy](#):
>
> If it does not have a function, would it be enough to run a script periodically that deletes events in the tracker store (or triggers the Rasas X API)?

Yes, that’s the solution 🙂

---

<div class="post-metadata">

**Author:** ![ScienceGuy](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ScienceGuy](https://forum.rasa.com/u/ScienceGuy)\
**Post date:** [January 26, 2022, 9:49am UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/6 "2022-01-26T09:49:46Z")

</div>

While thinking about it, is there a difference between deleting the events directly or using the Rasa X API?

I could imagine, that the API call triggers more than just deleting the events (e.g. removing related data somewhere else).

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [January 26, 2022, 7:39pm UTC](https://forum.rasa.com/t/constrain-how-long-rasa-x-maintains-tracker-events-chat-history/50872/7 "2022-01-26T19:39:41Z")

</div>

Everything in the Tracker Store is inside a single table, so there are no foreign keys and cascade deletes that needs to be done.

It all really boils down to your own preference.
