These docs are for version 1.x of Rasa Open Source.

## User Guide
- [Installation](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/installation/)
- [Tutorial: Rasa Basics](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/rasa-tutorial/)
- [Tutorial: Building Assistants](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/building-assistants/)
- [Command Line Interface](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/command-line-interface/)
- [Architecture](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/architecture/)
- [Messaging and Voice Channels](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/messaging-and-voice-channels/)
- [Evaluating Models](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/evaluating-models/)
- [Validate Data](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/validate-files/)
- [Configuring the HTTP API](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/configuring-http-api/)
- [Deploying your Rasa Assistant](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/how-to-deploy/)
- [Cloud Storage](https://legacy-docs-v1.rasa.com/1.8.2/user-guide/cloud-storage/)

## NLU
- [About](https://legacy-docs-v1.rasa.com/1.8.2/nlu/about/)
- [Using NLU Only](https://legacy-docs-v1.rasa.com/1.8.2/nlu/using-nlu-only/)
- [Training Data Format](https://legacy-docs-v1.rasa.com/1.8.2/nlu/training-data-format/)
- [Choosing a Pipeline](https://legacy-docs-v1.rasa.com/1.8.2/nlu/choosing-a-pipeline/)
- [Language Support](https://legacy-docs-v1.rasa.com/1.8.2/nlu/language-support/)
- [Entity Extraction](https://legacy-docs-v1.rasa.com/1.8.2/nlu/entity-extraction/)
- [Components](https://legacy-docs-v1.rasa.com/1.8.2/nlu/components/)

## Core
- [About](https://legacy-docs-v1.rasa.com/1.8.2/core/about/)
- [Stories](https://legacy-docs-v1.rasa.com/1.8.2/core/stories/)
- [Domains](https://legacy-docs-v1.rasa.com/1.8.2/core/domains/#)
- [Responses](https://legacy-docs-v1.rasa.com/1.8.2/core/responses/)
- [Actions](https://legacy-docs-v1.rasa.com/1.8.2/core/actions/)
- [Reminders and External Events](https://legacy-docs-v1.rasa.com/1.8.2/core/reminders-and-external-events/)
- [Policies](https://legacy-docs-v1.rasa.com/1.8.2/core/policies/)
- [Slots](https://legacy-docs-v1.rasa.com/1.8.2/core/slots/)
- [Forms](https://legacy-docs-v1.rasa.com/1.8.2/core/forms/)
- [Retrieval Actions](https://legacy-docs-v1.rasa.com/1.8.2/core/retrieval-actions/)
- [Interactive Learning](https://legacy-docs-v1.rasa.com/1.8.2/core/interactive-learning/)
- [Fallback Actions](https://legacy-docs-v1.rasa.com/1.8.2/core/fallback-actions/)
- [Knowledge Base Actions](https://legacy-docs-v1.rasa.com/1.8.2/core/knowledge-bases/)

## Conversation Design
- [Dialogue Elements](https://legacy-docs-v1.rasa.com/1.8.2/dialogue-elements/dialogue-elements/)
- [Small Talk](https://legacy-docs-v1.rasa.com/1.8.2/dialogue-elements/small-talk/)
- [Completing Tasks](https://legacy-docs-v1.rasa.com/1.8.2/dialogue-elements/completing-tasks/)
- [Guiding Users](https://legacy-docs-v1.rasa.com/1.8.2/dialogue-elements/guiding-users/)

## API Reference
- [Action Server](https://legacy-docs-v1.rasa.com/1.8.2/api/action-server/)
- [HTTP API](https://legacy-docs-v1.rasa.com/1.8.2/api/http-api/)
- [Jupyter Notebooks](https://legacy-docs-v1.rasa.com/1.8.2/api/jupyter-notebooks/)
- [Agent](https://legacy-docs-v1.rasa.com/1.8.2/api/agent/)
- [Custom NLU Components](https://legacy-docs-v1.rasa.com/1.8.2/api/custom-nlu-components/)
- [Rasa SDK](https://legacy-docs-v1.rasa.com/1.8.2/api/rasa-sdk/)
- [Events](https://legacy-docs-v1.rasa.com/1.8.2/api/events/)
- [Tracker](https://legacy-docs-v1.rasa.com/1.8.2/api/tracker/)
- [Tracker Stores](https://legacy-docs-v1.rasa.com/1.8.2/api/tracker-stores/)
- [Event Brokers](https://legacy-docs-v1.rasa.com/1.8.2/api/event-brokers/)
- [Lock Stores](https://legacy-docs-v1.rasa.com/1.8.2/api/lock-stores/)
- [Training Data Importers](https://legacy-docs-v1.rasa.com/1.8.2/api/training-data-importers/)
- [Featurization of Conversations](https://legacy-docs-v1.rasa.com/1.8.2/api/core-featurization/)
- [TensorFlow Configuration](https://legacy-docs-v1.rasa.com/1.8.2/api/tensorflow_usage/)
- [Migration Guide](https://legacy-docs-v1.rasa.com/1.8.2/migration-guide/)
- [Rasa Open Source Change Log](https://legacy-docs-v1.rasa.com/1.8.2/changelog/)

## Migrate from (beta)
- [Dialogflow](https://legacy-docs-v1.rasa.com/1.8.2/migrate-from/google-dialogflow-to-rasa/)
- [Wit.ai](https://legacy-docs-v1.rasa.com/1.8.2/migrate-from/facebook-wit-ai-to-rasa/)
- [LUIS](https://legacy-docs-v1.rasa.com/1.8.2/migrate-from/microsoft-luis-to-rasa/)
- [IBM Watson](https://legacy-docs-v1.rasa.com/1.8.2/migrate-from/ibm-watson-to-rasa/)

## Reference
- [Glossary](https://legacy-docs-v1.rasa.com/1.8.2/glossary/)

## Versions
viewing: 1.8.2

# Domains 
The `Domain` defines the universe in which your assistant operates. It specifies the `intents`, `entities`, `slots`, and `actions` your bot should know about. Optionally, it can also include `responses` for the things your bot can say.

### An example of a Domain
As an example, the domain created by `rasa init` has the following yaml definition:

```yaml
intents:
  - greet
  - goodbye
  - affirm
  - deny
  - mood_great
  - mood_unhappy
  - bot_challenge

responses:
  utter_greet:
  - text: "Hey! How are you?"

utter_cheer_up:
  - text: "Here is something to cheer you up:"
    image: "https://i.imgur.com/nGF1K8f.jpg"

utter_did_that_help:
  - text: "Did that help you?"

utter_happy:
  - text: "Great, carry on!"

utter_goodbye:
  - text: "Bye"

utter_iamabot:
  - text: "I am a bot, powered by Rasa."

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true
```

**What does this mean?**
Your NLU model will define the `intents` and `entities` that you need to include in the domain. The `entities` section lists all entities extracted by any [entity extractor](https://legacy-docs-v1.rasa.com/1.8.2/nlu/entity-extraction/#entity-extraction) in your NLU pipeline.

### Example of Entities
For example:

```yaml
entities:
   - PERSON          # entity extracted by SpacyEntityExtractor
   - time            # entity extracted by DucklingHTTPExtractor
   - membership_type # custom entity extracted by CRFEntityExtractor
   - priority        # custom entity extracted by CRFEntityExtractor
```

### Slots
[Slots](https://legacy-docs-v1.rasa.com/1.8.2/core/slots/#slots) hold information you want to keep track of during a conversation.
A categorical slot called `risk_level` would be defined like this:

```yaml
slots:
   risk_level:
      type: categorical
      values:
      - low
      - medium
      - high
```

[Actions](https://legacy-docs-v1.rasa.com/1.8.2/core/actions/#actions) are the things your bot can actually do. For example, an action could respond to a user,
make an external API call, query a database, or just about anything!

### Custom Actions and Slots
To reference slots in your domain, you need to reference them by their **module path**. To reference custom actions, use their **name**. For example, if you have a module called `my_actions` containing a class `MyAwesomeAction`, and module `my_slots` containing `MyAwesomeSlot`, you would add these lines to the domain file:

```yaml
actions:
  - my_custom_action

slots:
  - my_slots.MyAwesomeSlot
```

### Responses
Responses are messages the bot will send back to the user. There are two ways to use these responses:

1. If the name of the response starts with `utter_`, the response can directly be used as an action. You would add the response to the domain:

```yaml
responses:
     utter_greet:
  - text: "Hey! How are you?"
```

2. You can use the responses to generate response messages from your custom actions using the dispatcher:
`dispatcher.utter_message(template="utter_greet")`. This allows you to separate the logic of generating the messages from the actual copy. In your custom action code, you can send a message based on the response like this:

```python
from rasa_sdk.actions import Action

class ActionGreet(Action):
     def name(self):
         return 'action_greet'

def run(self, dispatcher, tracker, domain):
         dispatcher.utter_message(template="utter_greet")
         return []
```

### Images and Buttons
Responses defined in a domain’s yaml file can contain images and buttons as well:

```yaml
responses:
  utter_greet:
  - text: "Hey! How are you?"
    buttons:
    - title: "great"
      payload: "great"
    - title: "super sad"
      payload: "super sad"
  utter_cheer_up:
  - text: "Here is something to cheer you up:"
    image: "https://i.imgur.com/nGF1K8f.jpg"
```

### Custom Output Payloads
You can also send any arbitrary output to the output channel using the `custom:` key. Note that since the domain is in yaml format, the json payload should first be converted to yaml format.

### Channel-Specific Responses
For each response, you can have multiple **response templates** (see [Variations](https://legacy-docs-v1.rasa.com/1.8.2/core/domains/#variations)).
If you have certain response templates that you would like sent only to specific channels, you can specify this with the `channel:` key.

### Variables
You can also use **variables** in your responses to insert information collected during the dialogue. You can either do that in your custom python code or by using the automatic slot filling mechanism.

## Variations
If you want to randomly vary the response sent to the user, you can list multiple **response templates** and Rasa will randomly pick one of them.

## Ignoring entities for certain intents
If you want all entities to be ignored for certain intents, you can add the `use_entities: []` parameter to the intent in your domain file.

## Session configuration
A conversation session represents the dialogue between the assistant and the user. Conversation sessions can begin in three ways:

1. the user begins the conversation with the assistant,
2. the user sends their first message after a configurable period of inactivity, or
3. a manual session start is triggered with the `/session_start` intent message.

You can define the period of inactivity after which a new conversation session is triggered in the domain under the `session_config` key.

👋 I can help you get started with Rasa and answer your technical questions.
