Running a Rasa SDK Action Server

Running the Action Server

There are two ways to run the action server, depending on whether you are using an environment with rasa installed or not:

If rasa is installed, you can run the action server using a rasa command:

rasa run actions

Alternatively, you can make your assistant listen on a specific address using the SANIC_HOST environment variable:

SANIC_HOST=192.168.69.150 rasa run actions

If rasa is not installed, you can run the action server directly as a python module:

python -m rasa_sdk --actions actions

Running the action server directly as a python module allows for SANIC_HOST too:

SANIC_HOST=192.168.69.150 python -m rasa_sdk --actions actions

Using the command above, rasa_sdk will expect to find your actions in a file called actions.py or in a package directory called actions. You can specify a different actions module or package with the --actions flag.

Options for Running the Action Server

The full list of options for running the action server with either command is:

usage: __main__.py [-h] [-p PORT] [--cors [CORS ...]] [--actions ACTIONS]
                    [--ssl-keyfile SSL_KEYFILE]
                    [--ssl-certificate SSL_CERTIFICATE]
                    [--ssl-password SSL_PASSWORD] [--auto-reload] [-v] [-vv]
                    [--quiet] [--log-file LOG_FILE]
                    [--logging-config_file LOGGING_CONFIG_FILE]

Options: