# Dynamic KnowledgeBase : update inmemoryknowledgebase using custom action

**URL:** <https://forum.rasa.com/t/dynamic-knowledgebase-update-inmemoryknowledgebase-using-custom-action/52736>\
**Category:** Rasa Open Source\
**Created:** [April 21, 2022, 9:43am UTC](https://forum.rasa.com/t/dynamic-knowledgebase-update-inmemoryknowledgebase-using-custom-action/52736 "2022-04-21T09:43:47Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![yashjn72](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yashjn72](https://forum.rasa.com/u/yashjn72)\
**Post date:** [April 21, 2022, 9:43am UTC](https://forum.rasa.com/t/dynamic-knowledgebase-update-inmemoryknowledgebase-using-custom-action/52736/1 "2022-04-21T09:43:47Z")

</div>

Hi Rasa Members,

I am working on building a chatbot where my requirement is to update InMemoryKnowledgeBase data based on requirement.

Currently, whenever I start action server InMemoryKnowledgeBase gets updated using below class.

```auto
class MyKnowledgeBaseAction(ActionQueryKnowledgeBase):
    def __init__ (self):
        knowledge_base = InMemoryKnowledgeBase("userdata.json")
        super(). __init__ (knowledge_base)

```

Above class is reading data from productlist.json file. I have a custom actions which updates “userdata.json” based on user’s ask.

Now, I am not able to reload data in InMemoryKnowledgeBase whenever that file is updated. Can someone share on how to update InMemoryKnowledgeBase using any other custom action or code snippet.

---

_[View the full topic](https://forum.rasa.com/t/dynamic-knowledgebase-update-inmemoryknowledgebase-using-custom-action/52736)._
