# 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.9.7/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.

### Functionality
- **applied_events()**  
  Returns all actions that should be applied - w/o reverted events.  
  Return type: `List`[`Event`]

- **as_dialogue()**  
  Return a `Dialogue` object containing all of the turns.  
  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`](https://legacy-docs-v1.rasa.com/1.9.7/api/tracker/#rasa.core.trackers.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.  
  Returns the dumped tracker as a string.  
  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`](https://legacy-docs-v1.rasa.com/1.9.7/api/tracker/#rasa.core.trackers.DialogueStateTracker)

- **generate_all_prior_trackers()**  
  Returns a generator of the previous trackers of this tracker.  
  Return type: `Generator`[`DialogueStateTracker`, `None`, `None`]

- **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.  
  Return type: `Optional`[`Event`]

- **get_latest_entity_values(_entity_type_, _entity_role=None_, _entity_group=None_)**  
  Get entity values found for the passed entity type and optional role and group in latest message.  
  Return type: `Iterator`[`str`]

- **get_latest_input_channel()**  
  Get the name of the input_channel of the latest UserUttered event  
  Return type: `Optional`[`str`]

- **get_slot(_key_)**  
  Retrieves the value of a slot.  
  Return type: `Optional`[`Any`]

- **idx_after_latest_restart()**  
  Return the idx of the most recent restart in the list of events.  
  Return type: `int`

- **init_copy()**  
  Creates a new state tracker with the same initial values.  
  Return type: [`DialogueStateTracker`](https://legacy-docs-v1.rasa.com/1.9.7/api/tracker/#rasa.core.trackers.DialogueStateTracker)

- **is_paused()**  
  State whether the tracker is currently paused.  
  Return type: `bool`

- **last_executed_action_has(_name_, _skip=0_)**  
  Returns whether last ActionExecuted event had a specific name.  
  Return type: `bool`

- **past_states(_domain_)**  
  Generate the past states of this tracker based on the history.  
  Return type: `deque`

- **recreate_from_dialogue(_dialogue_)**  
  Use a serialised Dialogue to update the trackers state.  
  Return type: `None`

- **reject_action(_action_name_)**  
  Notify active form that it was rejected  
  Return type: `None`

- **replay_events()**  
  Update the tracker based on a list of events.  
  Return type: `None`

- **set_form_validation(_validate_)**  
  Toggle form validation  
  Return type: `None`

- **set_latest_action_name(_action_name_)**  
  Set latest action name and reset form validation and rejection parameters  
  Return type: `None`

- **travel_back_in_time(_target_time_)**  
  Creates a new tracker with a state at a specific timestamp.  
  Return type: [`DialogueStateTracker`](https://legacy-docs-v1.rasa.com/1.9.7/api/tracker/#rasa.core.trackers.DialogueStateTracker)

- **trigger_followup_action(_action_)**  
  Triggers another action following the execution of the current.  
  Return type: `None`

- **update(_event_, _domain=None_)**  
  Modify the state of the tracker according to an `Event`.  
  Return type: `None`

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