# What purpose we use action.py file?

**URL:** <https://forum.rasa.com/t/what-purpose-we-use-action-py-file/25735>\
**Category:** Getting Started with Rasa\
**Created:** [March 6, 2020, 9:07am UTC](https://forum.rasa.com/t/what-purpose-we-use-action-py-file/25735 "2020-03-06T09:07:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skjainmiah](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@skjainmiah](https://forum.rasa.com/u/skjainmiah)\
**Post date:** [March 6, 2020, 9:07am UTC](https://forum.rasa.com/t/what-purpose-we-use-action-py-file/25735/1 "2020-03-06T09:07:42Z")

</div>

In my models folder I have different files along with those I also have actions.py and what is the exact use of this action.py file and when should we use it. I have gone through the document but I didn’t get exactly what it is.

---

<div class="post-metadata">

**Author:** ![Ayad0net](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ayad0net/32/7457_2.png) [@Ayad0net](https://forum.rasa.com/u/Ayad0net)\
**Post date:** [March 7, 2020, 6:42pm UTC](https://forum.rasa.com/t/what-purpose-we-use-action-py-file/25735/2 "2020-03-07T18:42:03Z")

</div>

File `action.py` code for your **custom actions** Please see the documentation in:

> [https://rasa.com/docs/rasa/user-guide/rasa-tutorial/](https://rasa.com/docs/rasa/user-guide/rasa-tutorial/)

Actions are the things your bot runs in response to user input. There are four kinds of actions in Rasa:

> 1. **Utterance actions** : start with `utter_` and send a specific message to the user
> 2. **Retrieval actions** : start with `respond_` and send a message selected by a retrieval model
> 3. ☑ **Custom actions** : run arbitrary code and send any number of messages (or none).
> 4. **Default actions** : e.g. `action_listen` , `action_restart` , `action_default_fallback`
