Using IM Bots for Jabber
By Tony Cheung, Chatopus
Oct 20, 2004 (Last updated: June 25, 2005)
An IM bot (roBOT) is an interactive agent that uses instant messaging (IM) as an application interface. IM user can add the name of an IM bot to their buddy list and interact with them as if they are talking to a real person. IM bots provide many convenience functions for IM users, including news, weather reports and dictionary. They are especially useful for mobile users, because they require much lower bandwidth comparing to a graphical web interface.
Many IM bots are available on the public Jabber network. We have already discussed JabRSS, an IM bot that provides real-time RSS news feeds. In this article, we are going to show you some more.
First, we would like to show you a dictionary bot. To add a dictionary to your Jabber client, add email@example.com to your buddy list. Then simply send a word to that contact and it would reply you with the word's definition from multiple dictionaries.
This is a good example of an IM bot that looks up a database. The bot actually connects to a dictd (dictionary) server and requests information on words for you. Some Jabber clients, such as Chatopus, provide IM history. Thus, you can easily go back to the message history and read through previous word definitions. This is a good way to learn new vocabularies and memorize them.
Step-by-step Guide for Chatopus
The following shows you how to use this dictionary bot using Chatopus,
- Log in your Jabber server, then choose "Tools->Add Contact" and enter "firstname.lastname@example.org".
- You would receive an authorization request from the bot to see your presence. You need to accept the authorization request.
- You are now ready to use the dictionary bot! Simply send a word to it and the definition will arrive as a new message.
Optionally, enter a nickname for this dictionary bot and assign it to one group. Click "OK".
Some IM bots use artificial intelligence (AI) to interact with IM users. If you wish to get some fun or simply want to show off your Jabber client to your friends, chat with this psychotherapist, email@example.com.
This IM bot is a faithful implementation of the original Eliza program. Eliza is a very famous computer program, which emulates a non-directive psychotherapist. The original Eliza was written by Professor Joseph Weizenbaum of MIT and described in the Communications of the ACM in 1967 (Vol. 10, No. 8). Eliza accepts text input from a user, and then performs syntactic pattern patching to come up with a response, usually a follow-up question to stimulate users' interests. This makes certain kinds of natural language conversation between man and computer possible.
IM provides a good interface for delivery of real-time information. Using a Jabber cliet, you can get real-time push of weather updates for any major city.
A good weather bot is provided at jabber.zim.net.au. To use the service, you would need to perform a service registration with weather.jabber.zim.net.au. After that, you would need to add <city code>@weather.jabber.zim.net.au to obtain real-time weather updates for that city. The real-time weather information is reflected in the detail online status of that contact.
The following are some examples of city codes and their corresponding JIDs,
|New York Cityfirstname.lastname@example.org|
Looking up the City Code
If you want to look up a city code of your local city, simply go to weather.yahoo.com. Enter the city name in the search box. After you get the weather page of the city, you can look at the URL of the page to find out its city code. For example, the weather page for the city, Hong Kong, is http://weather.yahoo.com/forecast/CHXX0049.html. Thus, the city code is chxx0049 and you can add email@example.com.
Step-by-step Guide for Chatopus
The following step-by-step guide serves as an example on how to use this weather bot. It requires Chatopus v1.61 or later.
- Log in your Jabber server, then choose "Tools->Register with a Service" and enter "weather.jabber.zim.net.au".
- If the registration request is successful, you would see the following form.
- You would receive an authorization request from the service to see your presence. You need to accept the authorization request.
- Next, add <CITY CODE>@weather.jabber.zim.net to get weather update for your city.
- You would then see the contact you just added online. Choose "Info" and then click on the contact to see its detail online status.
So, we have shown you several IM bots that provide something fun and useful for everyday's use. If you have discovered some other cool IM bots, feel free to drop us a line at firstname.lastname@example.org.