You are viewing documentation for our open source project which is maintained by the community. If you want to get started building assistants with Rasa please check out our latest [documentation here](/content/docs/index.html).

Internally, Rasa conversations are represented as a list of [events](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events). Rasa SDK provides classes for each event, and takes care of turning instances of event classes into properly formatted event payloads.

This page is about the event classes in `rasa_sdk`. The side effects of events and their underlying payloads are identical regardless of whether you use `rasa_sdk` or another action server. For details about the side effects of an event, its underlying payload and the class in Rasa it is translated to see the [documentation for events for all action servers](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events) (also linked to in each section).

##### Importing events

All events written in a Rasa SDK action server need to be imported from `rasa_sdk.events`.

## Event Classes [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#event-classes "Direct link to heading")

### SlotSet [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#slotset "Direct link to heading")

```python
rasa_sdk.events.SlotSet(
    key: Text,
    value: Any = None,
    timestamp: Optional[float] = None
)
```

**Underlying event**: [`slot`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#slot)

**Parameters**:

- `key`: Name of the slot to set
- `value`: Value to set the slot to. The datatype must match the [type](https://legacy-docs-oss.rasa.com/docs/rasa/domain#slot-types) of the slot
- `timestamp`: Optional timestamp of the event

**Example**

```python
evт = SlotSet(key="name", value="Mary")
```

### AllSlotsReset [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#allslotsreset "Direct link to heading")

```python
rasa_sdk.events.AllSlotsReset(timestamp: Optional[float] = None)
```

**Underlying event**: [`reset_slots`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#reset_slots)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = AllSlotsReset()
```

### ReminderScheduled [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#reminderscheduled "Direct link to heading")

```python
rasa_sdk.events.ReminderScheduled(
    intent_name: Text,
    trigger_date_time: datetime.datetime,
    entities: Optional[Union[List[Dict[Text, Any]], Dict[Text, Text]]] = None,
    name: Optional[Text] = None,
    kill_on_user_message: bool = True,
    timestamp: Optional[float] = None,
)
```

**Underlying event**: [`reminder`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#reminder)

**Parameters**:

- `intent_name`: Intent which the reminder will trigger
- `trigger_date_time`: Datetime at which the execution of the action should be triggered.
- `entities`: Entities to send with the intent
- `name`: ID of the reminder. If there are multiple reminders with the same id only the last will be run.
- `kill_on_user_message`: Whether a user message before the trigger time will abort the reminder
- `timestamp`: Optional timestamp of the event

**Example**:

```python
from datetime import datetime

evт = ReminderScheduled(
    intent_name="EXTERNAL_dry_plant",
    trigger_date_time=datetime(2020,9,15,0,36,0,851609),
    entities=[{"name":"plant","value":"orchid"}],
    name="remind_water_plants",
)
```

### ReminderCancelled [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#remindercancelled "Direct link to heading")

```python
ReminderCancelled(
    name: Optional[Text] = None,
    intent_name: Optional[Text] = None,
    entities: Optional[Union[List[Dict[Text, Any]], Dict[Text, Text]]] = None,
    timestamp: Optional[float] = None,
)
```

**Underlying event**: [`cancel_reminder`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#cancel_reminder)

**Parameters**:

- `name`: ID of the reminder.
- `intent_name`: Intent which the reminder triggers
- `entities`: Entities sent with the intent
- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = ReminderCancelled(name="remind_water_plants")
```

### ConversationPaused [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#conversationpaused "Direct link to heading")

```python
ConversationPaused(timestamp: Optional[float] = None)
```

**Underlying event**: [`pause`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#slot)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = ConversationPaused()
```

### ConversationResumed [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#conversationresumed "Direct link to heading")

```python
ConversationResumed(timestamp: Optional[float] = None)
```

**Underlying event**: [`resume`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#resume)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = ConversationResumed()
```

### FollowupAction [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#followupaction "Direct link to heading")

```python
FollowupAction(
    name: Text,
    timestamp: Optional[float] = None
)
```

**Underlying event**: [`followup`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#followup)

**Parameters**:

- `name`: The name of the follow up action that will be executed.
- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = FollowupAction(name="action_say_goodbye")
```

### UserUtteranceReverted [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#userutterancereverted "Direct link to heading")

```python
UserUtteranceReverted(timestamp: Optional[float] = None)
```

**Underlying event**: [`rewind`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#rewind)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = UserUtteranceReverted()
```

### ActionReverted [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#actionreverted "Direct link to heading")

```python
ActionReverted(timestamp: Optional[float] = None)
```

**Underlying event**: [`undo`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#undo)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = ActionReverted()
```

### Restarted [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#restarted "Direct link to heading")

```python
Restarted(timestamp: Optional[float] = None)
```

**Underlying event**: [`restart`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#restart)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = Restarted()
```

### SessionStarted [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#sessionstarted "Direct link to heading")

```python
SessionStarted(timestamp: Optional[float] = None)
```

**Underlying event**: [`session_started`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#session_started)

**Parameters**:

- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = SessionStarted()
```

### UserUttered [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#useruttered "Direct link to heading")

```python
UserUttered(
    text: Optional[Text],
    parse_data: Optional[Dict[Text, Any]] = None,
    timestamp: Optional[float] = None,
    input_channel: Optional[Text] = None,
)
```

**Underlying event**: [`user`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#user)

**Parameters**:

- `text`: Text of the user message
- `parse_data`: Parsed data of user message. This is ordinarily filled by NLU.
- `input_channel`: The channel on which the message was received
- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = UserUttered(text="Hallo bot")
```

### BotUttered [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#botuttered "Direct link to heading")

```python
BotUttered(
    text: Optional[Text] = None,
    data: Optional[Dict[Text, Any]] = None,
    metadata: Optional[Dict[Text, Any]] = None,
    timestamp: Optional[float] = None,
)
```

**Underlying event**: [`bot`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#bot)

**Parameters**:

- `text`: The text the bot sends to the user
- `data`: Any non-text elements of the bot response. The structure of `data` matches that of `responses` given in the [API spec](https://legacy-docs-oss.rasa.com/docs/rasa/pages/action-server-api).
- `metadata`: Arbitrary key-value metadata
- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = BotUttered(text="Hallo user")
```

### ActionExecuted [\#](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/sdk-events/#actionexecuted "Direct link to heading")

```python
ActionExecuted(
    action_name,
    policy=None,
    confidence: Optional[float] = None,
    timestamp: Optional[float] = None,
)
```

**Underlying event**: [`action`](https://legacy-docs-oss.rasa.com/docs/rasa/action-server/events#action)

**Parameters**:

- `action_name`: Name of the action that was called
- `policy`: The policy used to predict the action
- `confidence`: The confidence with which the action was predicted
- `timestamp`: Optional timestamp of the event

**Example**:

```python
evт = ActionExecuted("action_greet_user")
```
