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.8.1

Warning

This document is for an old version of Rasa. The latest version is 1.10.26.

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.

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,
)

create_processor(preprocessor=None)

Return type: MessageProcessor

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

Return type: DialogueStateTracker

>>> 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]]]

... (More methods and details)