Mike Perez has an interesting blog post about jabberwacky chat bot. I too have an interest on chat bots about since year ago and I have stockpiled a lot of bots raging from Alice bots to voice enabled bots like pandorabots. After much tinkering around with lines and lines of botscripts and downloading the massive knowledge base, I found pandorabots the most suitable for all my needs. Pandora bot's basically runs as a webservice so you can use any of your favorite scripting language such as PHP, Perl, and Ruby to directly post user queries to the bot's URL. The interface was kept plain and simple so you can use screen-scraping methods to capture the bot's response. Pandora bots has a web interface that you can use to add new knowledge using AI Markup Language (AIML) or train using question and response (in which you can change the bot's response to some question if you don't like it).
You can use pandorabots in tandem with kannel and glue it up with a simple script as I mentioned above, this will give you an SMS based chatbot. If you like to use pandorabot with IM's then you can hook it up a jabber server, I used the PHP jabber API to hook my pandorabot to my Yahoo messenger :))
If you like bots that "do things" other than chat with you then try our smarter child. You can command the bot ranging from taking down notes to search google. Smarter child is also available for chat in AOL, MSN, and ICQ messenger.