RiveScript.comWelcome to the official homepage of RiveScript, the Artificial Intelligence Scripting Language.
RiveScript makes it easy to add intelligence to chatterbots by writing simple text files that define responses to the user's input.
If you're new to chatterbot programming, or just new to RiveScript, see the links under "Use RiveScript" for help getting started.
I just did my presentation about using RiveScript in web applications at the Chatbots 3.3 Conference in Philadelphia.
I'm working on a chatbot hosting service for RiveScript bots. This will enable you to get your own chatbot up and running without needing any programming experience. There will be a beta of this service up and running here in the near future.
Some early FAQ's about it:
Q: Will it be free?
A: Absolutely! Chatbots are a pretty difficult thing to monetize anyway, and I think the majority of my users will be running relatively "small" chatbots that won't put too much stress on my server anyway. However, I may introduce fees for hosting very large bots (ones with tens of thousands of custom responses) since these will require more resources to run on my server.
Q: Can I have an Alice clone?
A: Kind of. You will have a choice of a "Base Brain" to use for your bot. Alice will be one of the options for the base brain.
Q: How do Base Brains work?
A: You'll be able to create custom responses for your bot, for example you can say, "when the user says hello, the bot should say Hi there!". Whenever a user says something to your bot that matches one of your custom replies, they will get the reply you created. But, if they say something that doesn't match any of your custom replies, the Base Brain will be the one that provides them with a response instead. So, if you use Alice as your base brain, Alice will be the "fall back" source of responses for your bot.
Q: What are the options for Base Brains?
A: The options are going to be Alice (Dr. Wallace's Alice, who has about 90,000 responses), and Eliza (the classic therapist bot by Joseph Weizenbaum). However, you can elect to not use a base brain at all, in which case your bot's custom responses will be the only source of replies.
Q: How many custom replies can I have?
A: To start out with, there will be a limit of several thousand custom replies. This, I think, is more than enough for the majority of users. Alice has about 90,000 custom replies, and it takes a RiveScript interpreter several seconds to load that many responses from disk. If everybody who runs a RiveScript bot were to upload their own individual copies of Alice, this would put the server under a lot of stress for each message the bots receive. The limit will probably be about 10,000 custom responses.
Q: How is the Alice base brain going to work then?
A: The Alice base brain will run as a background service on the server. This way she only needs to be loaded from disk once and will be able to serve as the backup reply source for many bots simultaneously.
Q: Will there be a way to host bots as large as Alice?
A: We'll cross that bridge when we get to it. One idea I have will be to run large custom bots as background services like the Alice base brain.
Q: Will my bots be able to sign on to AIM, MSN, or Yahoo?
A: The bot hosting service, at least to begin with, will only host web-based bots (ones where you chat with them via a web browser). However, there will be an API (Application Programming Interface) for third party developers to be able to hook their apps into the hosting service. So, somebody could write an AIM bot for example that uses the RiveScript hosting service to get responses for users over instant messenger.
Q: What will the limitations be?
I think that should cover it for now. Stay tuned!
There is a demo available right here. That will let you chat with the standard RiveScript brain that tends to ship with all the libraries.
If you're feeling more adventurous, I also have a demo where you can chat with Dr. Wallace's A.L.I.C.E.! Be warned though, Alice is a large A.I. and you'll be running her entirely in your web browser. On my system though she runs just fine, and can respond instantly -- even faster than the Perl and Python RiveScript libraries!
What's so great about RiveScript.js? With this, you can easily add a chatbot to your website, and it doesn't even require any fancy server-side setting up! Unlike the Perl, Python and Java versions of RiveScript, this one will run in your end user's web browser. All your server needs to do is host your RiveScript source files!
Disclaimer: this library is very recent. While it seems to work and it passes the whole test suite, there may be--and probably are--some bugs. If you find any, let me know so I can fix them!
I've written a RiveScript tutorial! You can see it here. It covers just about everything you can do with RiveScript, but it doesn't go in-depth with topic inheritence and inclusion (as these are advanced subjects). The initial version is released, so if you've been wanting to learn RiveScript, give it a read-through and let me know if any parts of it are confusing or need to be expanded on some more.
I've released the Python version of RiveScript!
rivescript.py can also be executed as a stand-alone Python script. In this case, it will behave exactly like the
rivescript command that ships with the Perl version: you'll be able to interactively test out your RiveScript bot. It also supports JSON Mode, so a C++ program for example could still use
rivescript.py to be able to get responses from your bot.
The bugs I found in the Perl version while writing this have also been fixed. The Perl version has also moved to github: rivescript-perl. Furthermore, the Java version of RiveScript is on github now too: rivescript-java.