We made a robot.
Our foray into chatbots began with Steambot. Rocketeer Josh Davey wrote a Markov Chain text generator in Clojure, then trained it on some Kafka, Russell, Aristotle, Nietzsche, and a special ingredient: Steam, Its Generation and Use by Babcock & Wilcox Company (35th edition, copyright 1919).
He named his program Steambot and configured it as an outgoing webhook in Slack. This was Steambot’s first message, triggered with the keyword ‘steambot’:
‘The Mean man will be vexed, but only moderately and as their age changes so likewise do their pleasures.’ -Steambot (November 6, 2014)
We pinged Steambot for a few days, asking it Turing Test-style questions like ‘Steambot, what is love?’. Steambot responded:
‘It is the test of a K. W. steam engine turbine unit, Mr. H. G. Stott and Mr. R. G. S.’ -Steambot (December 18, 2014)
Pretty soon there was so much traffic that we needed a dedicated Slack channel just for these inane conversations. The #steamroom was born.
Soon there were other bots, written by Rocketeers across the company. We made Madbot, a robot that returns slightly wrong proverbs such as: ‘When the going gets loud, the shaky get going.’ We made Artbot, a robot who draws you an abstract picture. We made Fightbot, a robot who creates hypothetical battle matchups like this:
‘A hipster, can turn to steel, has a hostage *VS* an evil doll, afraid of nachos, hands glued to hips’ -Fightbot (December 18, 2015)
Like any good sitcom, a spin-off was inevitable. Wouldn’t it be cool, we thought, to build a web app that made it easy and fun to create chat bots? One meta-bot to rule them all.
We are proud to introduce Metabot, a new side project from Hashrocket.
How It Works
Metabot makes it easy to create your own bot. Simply click ‘Make a bot’, choose between the two bot types we’ve built (Markov Bot or Substitution Bot), feed your bots any text files you choose, and we’ll provide you with an endpoint you can easily integrate into Slack.
Soon your chat log will be alive with a fun, randomly coherent robot that you created. There’s no limit to the personality you can give your bot, or the amount of bots you can create.
Technically, Metabot was a chance for us to showcase our process and hone competency in new technologies.
The backend is written in Go with a PostgreSQL database. We saw this as an opportunity to build a small code base using solid design patterns such as the Respository Pattern and a custom responsive caching system.
The Markov and Substitution algorithms are our own and were refined over months of dogfooding.
The frontend features a Middleman site generator and was written in React.js. It includes some cool CSS tricks that add personality to the robot.
On the devops side, Metabot features a rapid deployment with Nginx using Mina and a custom database backup.
Look for more detail about the technology in forthcoming blog posts. In the future we plan to add more bot types and integrations, so everybody can have a bot.
To quote Steambot:
‘As this is growing wearisome, I would now be generally adopted.’ -Steambot (October 5, 2015)
Make your own bot with Metabot, and let us know what you think.