Agent

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


User Guide

NLU

Core

Conversation Design

API Reference

Migrate from (beta)

Reference

Versions

viewing: 1.10.15


Agent

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)

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

execute_action( sender_id, action, output_channel, policy, confidence)

Handle a single message.

handle_channels( channels, http_port=5005, route='/webhooks/', cors=None)

Start a webserver attaching the input channels and handling msgs.

handle_message( message, message_preprocessor=None, **kwargs)

Handle a single message.

handle_text( text_message, message_preprocessor=None, output_channel=None, sender_id='default)

Handle a single message.

is_core_ready()

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

is_ready()

Check if all necessary components are instantiated to use agent.

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)

Load a persisted model from the passed path.

load_data( training_resource, remove_duplicates=True, **kwargs)

Load training data from a resource.

log_message( message, message_preprocessor=None, **kwargs)

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

parse_message_using_nlu_interpreter( message_data, tracker=None)

Handles message text and intent payload input messages.

persist( model_path)

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

predict_next( sender_id, **kwargs)

Handle a single message.

toggle_memoization( activate)

Toggles the memoization on and off.

train( training_trackers, **kwargs)

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

trigger_intent( intent_name, entities, output_channel, tracker)

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

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