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

# NLU

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

# Core

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

# Conversation Design

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

# API Reference

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

# Migrate from (beta)

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

# Reference

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

# Versions

viewing: 1.10.23

[**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/agent/)

# Agent [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#agent "Permalink to this headline")

_class_`rasa.core.agent.``Agent`( _domain=None_, _policies=None_, _interpreter=None_, _generator=None_, _tracker_store=None_, _lock_store=None_, _action_endpoint=None_, _fingerprint=None_, _model_directory=None_, _model_server=None_, _remote_storage=None_, _path_to_model_archive=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent "Permalink to this definition")

The Agent class provides a convenient interface for the most important
Rasa functionality.

This includes training, handling messages, loading a dialogue model,
getting the next action, and handling a channel.

`create_processor`( _preprocessor=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.create_processor "Permalink to this definition")

Instantiates a processor based on the set state of the agent.

Return type

`MessageProcessor`

_async_`execute_action`( _sender_id_, _action_, _output_channel_, _policy_, _confidence_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.execute_action "Permalink to this definition")

Handle a single message.

Return type

[`DialogueStateTracker`](https://legacy-docs-v1.rasa.com/1.10.23/api/tracker/#rasa.core.trackers.DialogueStateTracker "rasa.core.trackers.DialogueStateTracker")

`handle_channels`( _channels_, _http_port=5005_, _route='/webhooks/'_, _cors=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.handle_channels "Permalink to this definition")

Start a webserver attaching the input channels and handling msgs.

Return type

`Sanic`

_async_`handle_message`( _message_, _message_preprocessor=None_, _**kwargs_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.handle_message "Permalink to this definition")

Handle a single message.

Return type

`Optional`[`List`[`Dict`[`str`, `Any`]]

_async_`handle_text`( _text_message_, _message_preprocessor=None_, _output_channel=None_, _sender_id='default') [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.handle_text "Permalink to this definition")

Handle a single message.

If a message preprocessor is passed, the message will be passed to that
function first and the return value is then used as the
input for the dialogue engine.

The return value of this function depends on the `output_channel`. If
the output channel is not set, set to `None`, or set
to `CollectingOutputChannel` this function will return the messages
the bot wants to respond.

Example

```python
>>> from rasa.core.agent import Agent
>>> from rasa.core.interpreter import RasaNLUInterpreter
>>> agent = Agent.load("examples/restaurantbot/models/current")
>>> await agent.handle_text("hello")
[u'how can I help you?']
```

Return type

`Optional`[`List`[`Dict`[`str`, `Any`]]

`is_core_ready`() [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.is_core_ready "Permalink to this definition")

Check if all necessary components and policies are ready to use the agent.

Return type

`bool`

`is_ready`() [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.is_ready "Permalink to this definition")

Check if all necessary components are instantiated to use agent.

Policies might not be available, if this is an NLU only agent.

Return type

`bool`

_classmethod_`load`( _model_path_, _interpreter=None_, _generator=None_, _tracker_store=None_, _lock_store=None_, _action_endpoint=None_, _model_server=None_, _remote_storage=None_, _path_to_model_archive=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.load "Permalink to this definition")

Load a persisted model from the passed path.

Return type

[`Agent`](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent "rasa.core.agent.Agent")

_async_`load_data`( _training_resource_, _remove_duplicates=True_, _unique_last_num_states=None_, _augmentation_factor=50_, _tracker_limit=None_, _use_story_concatenation=True_, _debug_plots=False_, _exclusion_percentage=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.load_data "Permalink to this definition")

Load training data from a resource.

Return type

`List`[ `DialogueStateTracker`](https://legacy-docs-v1.rasa.com/1.10.23/api/tracker/#rasa.core.trackers.DialogueStateTracker "rasa.core.trackers.DialogueStateTracker")

_async_`log_message`( _message_, _message_preprocessor=None_, _**kwargs_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.log_message "Permalink to this definition")

Append a message to a dialogue - does not predict actions.

Return type

_async_`parse_message_using_nlu_interpreter`( _message_data_, _tracker=None_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.parse_message_using_nlu_interpreter "Permalink to this definition")

Handles message text and intent payload input messages.

The return value of this function is parsed_data.

Parameters

- **message_data** ( _Text_) – Contain the received message in text or intent payload format.

- **tracker** ( [_DialogueStateTracker_](https://legacy-docs-v1.rasa.com/1.10.23/api/tracker/#rasa.core.trackers.DialogueStateTracker "rasa.core.trackers.DialogueStateTracker")) – Contains the tracker to be used by the interpreter.

Returns

The parsed message.

Example

{ “text”: ‘/greet{“name”:”Rasa”}’, “intent”: {“name”: “greet”, “confidence”: 1.0}, “intent_ranking”: [{“name”: “greet”, “confidence”: 1.0}], “entities”: [{“entity”: “name”, “start”: 6, “end”: 21, “value”: “Rasa”}], }

Return type

`Dict`[`str`, `Any`]

`persist`( _model_path_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.persist "Permalink to this definition")

Persists this agent into a directory for later loading and usage.

Return type

`None`

_async_`predict_next`( _sender_id_, _**kwargs_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.predict_next "Permalink to this definition")

Handle a single message.

Return type

`Optional`[`Dict`[`str`, `Any`]

`toggle_memoization`( _activate_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.toggle_memoization "Permalink to this definition")

Toggles the memoization on and off.

If a memoization policy is present in the ensemble, this will toggle
the prediction of that policy. When set to `False` the Memoization
policies present in the policy ensemble will not make any predictions.

Return type

`None`

`train`( _training_trackers_, _**kwargs_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.train "Permalink to this definition")

Train the policies / policy ensemble using dialogue data from file.

Parameters

- **training_trackers** – trackers to train on

- **kwargs** – additional arguments passed to the underlying ML trainer (e.g. keras parameters)

Return type

`None`

_async_`trigger_intent`( _intent_name_, _entities_, _output_channel_, _tracker_) [¶](https://legacy-docs-v1.rasa.com/1.10.23/api/agent/#rasa.core.agent.Agent.trigger_intent "Permalink to this definition")

Trigger a user intent, e.g. triggered by an external event.

Return type

`None`
