rasa
💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Top Related Projects
The open-source hub to build & deploy GPT/LLM Agents ⚡️
Bot Framework provides the most comprehensive experience for building conversation applications.
Pretrained models for TensorFlow.js
💫 Industrial-strength Natural Language Processing (NLP) in Python
Quick Overview
Rasa is an open-source machine learning framework for automated text and voice-based conversations. It allows developers to build contextual AI assistants and chatbots that can understand user intents, maintain context, and respond appropriately. Rasa provides tools for natural language understanding (NLU) and dialogue management.
Pros
- Highly customizable and flexible, allowing developers to create complex conversational AI systems
- Supports multiple languages and can be deployed on various platforms
- Active community and extensive documentation for support and learning
- Open-source nature allows for transparency and contributions from the community
Cons
- Steep learning curve for beginners, especially those new to machine learning
- Requires significant training data for optimal performance
- Can be resource-intensive for large-scale deployments
- Some advanced features may require additional setup or integration with other tools
Code Examples
- Training a Rasa model:
from rasa.cli.scaffold import create_initial_project
from rasa.model_training import train
# Create a new project
create_initial_project("./my_chatbot")
# Train the model
train(domain="domain.yml", config="config.yml", training_files="data/")
- Loading and using a trained model:
from rasa.core.agent import Agent
# Load the trained model
agent = Agent.load("models/20210101-120000.tar.gz")
# Use the model to predict intents and actions
result = agent.parse("Hello, how are you?")
print(result)
- Running a Rasa server:
from rasa.core.run import serve_application
# Start the Rasa server
serve_application(
model_path="models/20210101-120000.tar.gz",
endpoints="endpoints.yml",
port=5005
)
Getting Started
- Install Rasa:
pip install rasa
- Create a new project:
rasa init
- Train the model:
rasa train
- Test the chatbot in the command line:
rasa shell
- Start the Rasa server:
rasa run
Competitor Comparisons
The open-source hub to build & deploy GPT/LLM Agents ⚡️
Pros of Botpress
- User-friendly visual flow builder for easier bot design
- Built-in analytics and conversation testing tools
- Supports multiple channels out-of-the-box (e.g., web, Messenger, Slack)
Cons of Botpress
- Less flexibility for complex NLU tasks
- Smaller community and fewer third-party integrations
- Steeper learning curve for developers familiar with Python
Code Comparison
Botpress (JavaScript):
bp.hear(/hello/i, (event, next) => {
bp.messaging.sendText(event.channel, 'Hello, human!')
})
Rasa (Python):
class ActionGreet(Action):
def name(self) -> Text:
return "action_greet"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message(text="Hello, human!")
return []
Both frameworks offer different approaches to building conversational AI. Botpress focuses on visual development and ease of use, while Rasa provides more flexibility and control for complex NLU tasks. The choice between them depends on the specific project requirements and the development team's expertise.
Bot Framework provides the most comprehensive experience for building conversation applications.
Pros of botframework-sdk
- Seamless integration with Microsoft Azure services and other Microsoft technologies
- Supports multiple programming languages (C#, JavaScript, Python)
- Extensive documentation and community support
Cons of botframework-sdk
- Steeper learning curve for developers new to Microsoft ecosystem
- Less flexibility in customization compared to Rasa
- Potential vendor lock-in with Microsoft services
Code Comparison
Rasa (Python):
from rasa_sdk import Action
class ActionGreet(Action):
def name(self) -> str:
return "action_greet"
def run(self, dispatcher, tracker, domain):
dispatcher.utter_message(text="Hello! How can I help you?")
return []
botframework-sdk (JavaScript):
const { ActivityHandler, MessageFactory } = require('botbuilder');
class GreetingBot extends ActivityHandler {
constructor() {
super();
this.onMessage(async (context, next) => {
await context.sendActivity(MessageFactory.text('Hello! How can I help you?'));
await next();
});
}
}
Both frameworks allow for easy creation of conversational AI, but Rasa offers more flexibility and customization options, while botframework-sdk provides better integration with Microsoft services and multi-language support. The choice between the two depends on specific project requirements and the development team's expertise.
Pretrained models for TensorFlow.js
Pros of tfjs-models
- Runs in the browser, enabling client-side machine learning
- Offers a variety of pre-trained models for common tasks
- Lightweight and optimized for performance on web and mobile devices
Cons of tfjs-models
- Limited to JavaScript/TypeScript environments
- Narrower scope, focusing primarily on computer vision and natural language processing tasks
- Less customizable for complex conversational AI applications
Code Comparison
tfjs-models (Object Detection):
const model = await cocoSsd.load();
const predictions = await model.detect(img);
predictions.forEach(prediction => {
console.log(prediction.class, prediction.score);
});
Rasa (Intent Classification):
from rasa.nlu.model import Interpreter
interpreter = Interpreter.load("./models/nlu")
result = interpreter.parse("Hello, how are you?")
print(result["intent"]["name"], result["intent"]["confidence"])
Summary
While tfjs-models excels in client-side ML applications with pre-trained models, Rasa is better suited for building comprehensive conversational AI systems. tfjs-models offers ease of use and browser compatibility, but Rasa provides more flexibility and customization for complex dialogue management and natural language understanding tasks.
💫 Industrial-strength Natural Language Processing (NLP) in Python
Pros of spaCy
- More focused on core NLP tasks like tokenization, part-of-speech tagging, and named entity recognition
- Faster processing speed for large volumes of text
- Extensive pre-trained models for multiple languages
Cons of spaCy
- Less suitable for building conversational AI systems
- Requires more custom coding for complex language understanding tasks
- Limited built-in support for dialogue management
Code Comparison
spaCy:
import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp("Apple is looking at buying U.K. startup for $1 billion")
for ent in doc.ents:
print(ent.text, ent.label_)
Rasa:
from rasa.nlu.model import Interpreter
interpreter = Interpreter.load("./models/nlu")
result = interpreter.parse("I want to book a flight to Berlin")
print(result["intent"]["name"])
print(result["entities"])
Summary
spaCy excels in core NLP tasks and processing speed, while Rasa is better suited for building conversational AI systems. spaCy offers more pre-trained models and languages, but Rasa provides built-in support for dialogue management. The choice between the two depends on the specific requirements of your project.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Rasa Open Source
ð§ Note: Maintenance Mode ð§
Rasa Open Source is currently in maintenance mode.
The future of building AI agents with Rasa is Hello Rasa and CALM.
ð The Future of Rasa: Hello Rasa
Building reliable AI agents just got easier.
Hello Rasa is our new interactive playground for prototyping AI agents. It combines LLM fluency with the reliability of business logic using our CALM (Conversational AI with Language Models) engine.
Why switch to Hello Rasa?
- No setup required: Open the playground, pick a template (Banking, Telecom, Support), and start building in your browser.
- No NLU training: We have moved beyond intents. The LLM handles dialogue understanding while you define the business flows.
- Built-in copilot: A specialized AI assistant helps you generate code, debug flows, and expand your agent instantly.
- Production ready: Hello Rasa is not just a toy. Export your agent to the Rasa Platform when you are ready to scale.
Core concepts
- CALM: Combines LLM flexibility with strict business logic. The LLM understands the user; the code enforces the rules.
- Flows: Describe logical steps (e.g., collect money, transfer funds) rather than rigid dialogue trees.
- Inspector: See real-time decision-making. No black boxes.
ð Start building for free at Hello Rasa
ð§ Join the Agent Engineering Community
We are building a home for people shipping real-world AI agents.
Agent Engineering is evolving faster than any single framework. This is a vendor-neutral space to discuss architectures, memory, orchestration, and safety with builders across the industry.
What you get:
- Network: Meet engineers building production agents
- Learn: Discuss practical patterns, not just theory
- Access: Direct influence on the Hello Rasa roadmap and early access to features
| Channel | Purpose |
|---|---|
| #agent-design | Architectures, reasoning, memory, testing |
| #showcase | Show your builds, demos, and repos |
| #ask-anything | Debugging and workflow questions |
ð Join the Community
Rasa Open Source (Legacy)
Note: The documentation and installation instructions below apply to the classic Rasa Open Source framework. For the latest CALM-based experience, see the Hello Rasa section above.
Rasa is an open source machine learning framework for automating text and voice-based conversations. With Rasa, you can build contextual assistants on:
- Facebook Messenger
- Slack
- Google Hangouts
- Webex Teams
- Microsoft Bot Framework
- Rocket.Chat
- Mattermost
- Telegram
- Twilio
- Your own custom conversational channels
Rasa helps you build contextual assistants that can handle layered conversations with lots of back-and-forth.
ð Resources
- ð¤ Read the docs
- ð Install Rasa
- ð Learn all about Conversational AI
- ð¢ Explore the enterprise platform
Development Internals & Contributing
We are happy to receive contributions. Please review our Contribution Guidelines before getting started.
Installation for Development
Rasa uses Poetry for packaging and dependency management.
- Install Poetry: Follow the official guide.
- Build from source:
Note for macOS users: If you run into compiler issues, trymake installexport SYSTEM_VERSION_COMPAT=1before installation.
Running Tests
Make sure you have development requirements installed:
make prepare-tests-ubuntu # Ubuntu/Debian
make prepare-tests-macos # macOS
make test # Run tests
Releases
Rasa follows Semantic Versioning.
- Major: Incompatible API changes
- Minor: Backward-compatible functionality
- Patch: Backward-compatible bug fixes
For full details on our release cadence and maintenance policy, visit our Product Release and Maintenance Policy.
License
Licensed under the Apache License, Version 2.0. Copyright 2022 Rasa Technologies GmbH. Copy of the license.
Top Related Projects
The open-source hub to build & deploy GPT/LLM Agents ⚡️
Bot Framework provides the most comprehensive experience for building conversation applications.
Pretrained models for TensorFlow.js
💫 Industrial-strength Natural Language Processing (NLP) in Python
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot