# Custom actions
Botfront makes coding and using Rasa custom actions very easy.
In your project you should have the following folders:
| ||Project configuration files, docker-compose files|
| ||Custom actions for the actions server|
| ||MongoDB persisted files|
| ||Persisted models|
| ||Rasa image material|
You probably figured it out:
actions is our folder of interest.
# Launch the watcher
The first thing to do is to launch the watcher. Symply run
botfront watch from the root of your project. Any change in the
actions folder will rebuild and restart the actions server so you can test the actions in Botfront
# Write custom actions
All actions in the
actions folder will be found by the watcher. You can add actions to the default
my_actions.py file or add new files.
Importing modules in your actions
Your imports must include
actions. If you want to import a module in the
# Verify that your actions are registered
botfront logs and verify that your actions are correctly imported. You should see something like
INFO:rasa_sdk.executor:Registered function for 'action_guests'. for each action in the folder.
# Add your action to the conversation
From the conversation builder guide, add your action to the conversation.
You can build your action server Docker image with the
Dockerfile.production in the
actions folder of your project.