Agent
These docs are for version 1.x of Rasa Open Source.
User Guide
- Installation
- Tutorial: Rasa Basics
- Tutorial: Building Assistants
- Command Line Interface
- Architecture
- Messaging and Voice Channels
- Evaluating Models
- Validate Data
- Configuring the HTTP API
- Deploying your Rasa Assistant
- Cloud Storage
NLU
- About
- Using NLU Only
- Training Data Format
- Choosing a Pipeline
- Language Support
- Entity Extraction
- Components
Core
- About
- Stories
- Domains
- Responses
- Actions
- Reminders and External Events
- Policies
- Slots
- Forms
- Retrieval Actions
- Interactive Learning
- Fallback Actions
- Knowledge Base Actions
Conversation Design
API Reference
- Action Server
- HTTP API
- Jupyter Notebooks
- Agent
- Custom NLU Components
- Rasa SDK
- Events
- Tracker
- Tracker Stores
- Event Brokers
- Lock Stores
- Training Data Importers
- Featurization of Conversations
- TensorFlow Configuration
- Migration Guide
- Rasa Open Source Change Log
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)
- Instantiates a processor based on the set state of the agent.
Return type: MessageProcessor
async execute_action(sender_id, action, output_channel, policy, confidence)
- Handle a single message.
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)