Actions
These docs are for version 1.x of Rasa Open Source.
User Guide
- Installation
- Tutorial: Rasa Basics
- Tutorial: Building Assistants
- Command Line Interface
- Architecture
- Messaging and Voice Channels
- Testing Your Assistant
- Setting up CI/CD
- Validate Data
- Configuring the HTTP API
- Deploying Your Rasa Assistant
- Cloud Storage
NLU
- About
- Using NLU Only
- Training Data Format
- Language Support
- Choosing a Pipeline
- Components
- Entity Extraction
Core
- About
- Stories
- Domains
- Responses
- Actions
- Reminders and External Events
- Policies
- Slots
- Forms
- Retrieval Actions
- Interactive Learning
- Fallback Actions
- Knowledge Base Actions
Conversation Design
API Reference
- Action Server
- HTTP API
- Jupyter Notebooks
- Agent
- Custom NLU Components
- Rasa SDK
- Events
- Tracker
- Tracker Stores
- Event Brokers
- Lock Stores
- Training Data Importers
- Featurization of Conversations
- TensorFlow Configuration
- Migration Guide
- Rasa Open Source Change Log
Migrate from (beta)
Reference
Actions
Actions are the things your bot runs in response to user input. There are four kinds of actions in Rasa:
Utterance actions: start with
utter_and send a specific message to the user.Retrieval actions: start with
respond_and send a message selected by a retrieval model.Custom actions: run arbitrary code and send any number of messages (or none).
Default actions: e.g.
action_listen,action_restart,action_default_fallback.
Utterance Actions
To define an utterance action (ActionUtterTemplate), add a response to the domain file
that starts with utter_:
responses:
utter_my_message:
- "this is what I want my action to say!"
If you use an external NLG service, you don’t need to specify the responses in the domain, but you still need to add the utterance names to the actions list of the domain.
Retrieval Actions
Retrieval actions make it easier to work with a large number of similar intents like chitchat and FAQs.
Custom Actions
An action can run any code you want. Custom actions can turn on the lights, add an event to a calendar, check a user’s bank balance, or anything else you can imagine.
Rasa will call an endpoint you can specify, when a custom action is predicted. This endpoint should be a webserver that reacts to this call, runs the code and optionally returns information to modify the dialogue state.
To specify, your action server use the endpoints.yml:
action_endpoint:
url: "http://localhost:5055/webhook"
Custom Actions Written in Python
For actions written in python, we have a convenient Rasa SDK which starts this action server for you.
Default Actions
The available default actions are:
action_listen |
Stop predicting more actions and wait for user input. |
action_restart |
Reset the whole conversation. Can be triggered during a conversation by entering /restart. |
action_session_start |
Start a new conversation session. |
action_default_fallback |
Undo the last user message and |
| utter a message that the bot did not | |
| understand. | |
action_deactivate_form |
Deactivate the active form and reset the requested slot. |
action_back |
Undo the last user message. |
All actions can be overridden by adding their name to the list in the domain.