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

- [Docs for the new version 2.0 can be found here.](/content/docs/rasa/index.html)

## User Guide

- [Installation](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/installation/)
- [Tutorial: Rasa Basics](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/rasa-tutorial/)
- [Tutorial: Building Assistants](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/building-assistants/)
- [Command Line Interface](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/command-line-interface/)
- [Architecture](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/architecture/)
- [Messaging and Voice Channels](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/messaging-and-voice-channels/)
- [Testing Your Assistant](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/testing-your-assistant/)
- [Setting up CI/CD](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/setting-up-ci-cd/)
- [Validate Data](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/validate-files/)
- [Configuring the HTTP API](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/configuring-http-api/)
- [Deploying Your Rasa Assistant](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/how-to-deploy/)
- [Cloud Storage](https://legacy-docs-v1.rasa.com/1.10.21/user-guide/cloud-storage/)

## NLU

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

## Core

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

## Conversation Design

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

## API Reference

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

## Migrate from (beta)

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

## Reference

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

## Versions

viewing: 1.10.21

[**Warning:** This document is for an old version of Rasa. The latest version is 1.10.26.](https://legacy-docs-v1.rasa.com/1.10.26/api/tracker/)

# 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 behavior, check out the docs on [Session configuration](https://legacy-docs-v1.rasa.com/1.10.21/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.

### `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.

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`](https://legacy-docs-v1.rasa.com/1.10.21/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.  The dump should be an array of dumped events. When restoring the tracker, these events will be replayed to recreate the state.

Return type: [`DialogueStateTracker`](https://legacy-docs-v1.rasa.com/1.10.21/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 the 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.10.21/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 serialized Dialogue to update the tracker's 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.10.21/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.
