Yesterday, this project entered in my radar:
GitHub, Inc., wrote the first version of Hubot to automate our company chat room. Hubot knew how to deploy the site, automate a lot of tasks, and be a source of fun in the company. Eventually he grew to become a formidable force in GitHub. But he led a private, messy life. So we rewrote him.
Today’s version of Hubot is open source, written in CoffeeScript onNode.js, and easily deployed on platforms like Heroku. More importantly, Hubot is a standardized way to share scripts between everyone’s robots.
Some months ago, I started to play with autonomous agents, see my Spanish post
(Node.js version was easier, less types, no friction)
My idea is to implement autonomous agents a la Russell Norvig:
And now, a bot in Node.js with plugins could be a first path to explore, to have a concrete implementation. An “intelligent” bot is an agent. Let’s explore the idea and implementation.
First: the bot is not related to chat, SMS, email servers, git account, etc. No. A bot is an entity with:
– Input channels (“percepts” in the above picture), to receive message from the environment
– Output channels, to send message to the environment
Each plug-in could:
– Implement an input channel, i.e., a plug-in could connect to a chat session, read message from it, and send them to the bot. Or a plug-in that reads messages from a remote queue. Or a plug-in that reads data from a physical sensor.
– Implement an output channel, the same bot could send message from bot to the chat room. Or an output channel could manage LEDs in Raspberry or Arduino.
– Subscribe to messages, i.e. saying “all message that starts with ‘github ‘” are important to me.
– Send message to bot output channel(s)
– Do something, imagine a plug-in to run Grunt tasks, or run tests in a project
A message can be:
– A simple string
– A simple object (ready to be serialized as JSON, if needed)
Some methods would receive a message, and an additional object (named options?) with additional information, like original channel, etc… But I prefer to start simple. Remember:
Baby steps, make it works, make it right, make it fast
More ideas: there could be channels between bots, even distributed bots.
Some of these ideas are implemented in projects mentioned in my post
It’s time to put these ideas to work.