# Tracker

Trackers maintain the state of a dialogue between the assistant and the user in the form of conversation sessions. To learn more about how to configure the session behaviour, check out the docs on [Session configuration](https://legacy-docs-v1.rasa.com/1.7.1/core/domains/#session-config).

## `class rasa.core.trackers.DialogueStateTracker(sender_id, slots, max_event_history=None, sender_source=None)`
Maintains the state of a conversation.

The field `max_event_history` will only give you these last events, it can be set in the tracker_store.

### `applied_events()`
Returns all actions that should be applied - without reverted events.

Return type: `List[Event]`

### `as_dialogue()`
Return a `Dialogue` object containing all of the turns.

This can be serialized and later used to recover the state of this tracker exactly.

Return type: `Dialogue`

### `change_form_to(form_name)`
Activate or deactivate a form.

Return type: `None`

### `clear_followup_action()`
Clears follow up action when it was executed.

Return type: `None`

### `copy()`
Creates a duplicate of this tracker.

Return type: `DialogueStateTracker`

### `current_slot_values()`
Return the currently set values of the slots.

Return type: `Dict[str, Any]`

### `current_state(event_verbosity=<EventVerbosity.NONE: 1>)`
Return the current tracker state as an object.

Return type: `Dict[str, Any]`

### `events_after_latest_restart()`
Return a list of events after the most recent restart.

Return type: `List[Event]`

### `export_stories(e2e=False, include_source=False)`
Dump the tracker as a story in the Rasa Core story format.

Return type: `str`

### `export_stories_to_file(export_path='debug.md')`
Dump the tracker as a story to a file.

Return type: `None`

### `classmethod from_dict(sender_id, events_as_dict, slots=None, max_event_history=None)`
Create a tracker from dump.

Return type: `DialogueStateTracker`

### `get_last_event_for(event_type, action_names_to_exclude=None, skip=0)`
Gets the last event of a given type which was actually applied.

Returns `event` which matched the query or `None` if no event matched.

Return type: `Optional[Event]`

### `current_slot_values()`
Return the currently set values of the slots.

Return type: `Dict[str, Any]`

### `get_slot(key)`
Retrieves the value of a slot.

Return type: `Optional[Any]`

### `trigger_followup_action(action)`
Triggers another action following the execution of the current.

Return type: `None`
