# Using rasa as a python library to interact with the bot

**URL:** <https://forum.rasa.com/t/using-rasa-as-a-python-library-to-interact-with-the-bot/38711>\
**Category:** Rasa Open Source\
**Created:** [January 6, 2021, 1:40pm UTC](https://forum.rasa.com/t/using-rasa-as-a-python-library-to-interact-with-the-bot/38711 "2021-01-06T13:40:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [January 7, 2021, 10:34am UTC](https://forum.rasa.com/t/using-rasa-as-a-python-library-to-interact-with-the-bot/38711/2 "2021-01-07T10:34:36Z")

</div>

Hi @souvikg10. Great to see you here! Overall, the previous way of running the agent as a python module has been deprecated and replaced with the cli. However, you can still access the methods that can be used to train or run the models. For example, a very basic way of training the model would look as follows:

```auto
import rasa

config = "config.yml"
training_files = "data/"
domain = "domain.yml"
output = "models/"

model_path = rasa.train(domain, config, training_files, output)

```

---

_[View the full topic](https://forum.rasa.com/t/using-rasa-as-a-python-library-to-interact-with-the-bot/38711)._
