What ChatOps Solutions Should You Use Today?

Janne Kemppainen |

Over the years we have seen many tools that enable communication with computer systems using a chat interface. Many of them are now obsolete as their development has ceased, though they still seem to be recommended everywhere. What are the tools that you should use today?

The big elephant in the room is of course Hubot, which now hasn’t seen new commits in over three years. It was originally created by GitHub as they embraced the ChatOps methodology and wanted to make a version inspired by their internal tooling available for everyone. Now the project seems to be abandoned and failing npm audit checks. So where should you go from here?

This post should help you find the best alternatives that are still under active maintenance. After all, you probably don’t want to switch to another obsolete solution.

So let’s start going through the list!

Botkit

Botkit logo

Botkit is a popular open source tool for writing chatbots, apps and integrations for major messaging platforms. It’s part of the Microsoft Bot Framework, so it seems to have a real company backing.

Botkit bots are written in JavaScript and they run on Node.js, so if JavaScript is your strongest language then you should definitely consider using it.

There are already many integrations available, but if the service you’re using is missing it is possible to extend the framework with custom integrations.

If you’re also interested in Natural Language Processing (NLP) you can directly integrate with luis.ai which is Microsoft’s language understanding service. Similarly, adapters are available for Amazon Lex, Google Dialogflow, IBM Watson, and so on.

Session data can be stored to a database which lets you to scale the bot to multiple servers, if needed.

Errbot

Errbot logo

Errbot is a chatbot written in Python, it comes with a ton of features, and it is extendable with custom plugins. If Python is your strongest language, then this might be your best choice as the project has a sizeable user base as well as lots of code contributors.

You write bots as Python apps, and by default they react to !commands in your chatroom. Commands can also trigger on regular expression matches, with or without a bot prefix. If you disable the bot prefix, the function could trigger on specific keywords that it sees in the conversation.

A command handler can send multiple messages. This can be really useful when you want to provide intermediate feedback when you have long-running processes.

Errbot also supports Markdown responses with Jinja2 templating. The bot command handler just needs to return the data that should be included in the template. The templating engine will take care of the rest!

Errbot supports webhooks; It has a small web server that can translate endpoints to your custom plugins. This way you can send notifications to the chat channel when the event hook gets triggered. It’s recommended that you configure this behind a web server such as nginx or Apache.

StackStorm

StackStorm logo

StackStorm is not only a chatbot, but also an automation engine that is able to create complex workflows with lots of integrations to different services. StackStorm used to be a separate company with some advanced features being behing a subscription, but when the project was moved under the Linux Foundation umbrella all features were made open source.

It works with the If This Then That (IFTTT) principle, meaning that you define a set of rules that the system then uses to take action. When an event happens somewhere in your system it can be caught by a rule that then results in a series of actions.

ChatOps is only a small part of StackStorm, though the principles are still the same. Something in the chatroom triggers an event that leads to a series of steps being taken, and then feedback can be sent back to the channel. The rule system could also act on events such as security incidents, and inform you about the situation.

StackStorm might a bit involved if all you want is a chatbot. Still, it comes with a great number of cool features such as workflows with multiple branches, a web interface with a visual workflow builder, role-based access control, and more.

However, there is a caveat to using StackStorm for chatops: it is using a Hubot plugin under the hood. So, if you’re not willing to use Hubot, then StackStorm might be out of question too. On the other hand, you could also try the Errbot integration..

Lita

Lita logo

Lita is a chat bot written in Ruby. Like the other bots I’ve mentioned, it is also open source and supports different chat platforms via plugins.

The plugin page contains hundreds of handlers that you can give your chatbot cool new capabilities such as sending pictures of baby elephants or Chuck Norris jokes. Naturally, if you know your way around Ruby you could develop your own plugins.

Lita handlers can act on any message that is sent directly to it, or that it hears in a chatroom. It only comes with a shell adapter that you can use to test chat commands by default. Chat platform integrations must be installed and configured separately.

The recommended way to deploy Lita is to use a Docker container. This should make it easy to run Lita pretty much anywhere.

Gort

Gort is a newer entrant to the ChatOps space. As the name suggests it has been written in Go, and it is still under active development. Right now the project is considered “minimally viable”, so expect more features to come over time.

According to the user documentation, Gort was initially inspired by a Slack bot called Cog (another abandoned project). The initial idea of was to rewrite Cog in a more maintainable way, stripping away seldom used features and implemented in a language that was known for a larger base of developers. Therefore Gort can be said to be the “spiritual successor” to Cog.

The Gort commands are built as container images, so they can be created in any language. Commands can be triggered with the command character (defaults to !), followed by the command like you would enter it on the command line. The command actually gets sent as if it was typed on the command line, so you could use any command line interpreter.

Gort comes with a rule system that can be used to compose really granular user permissions, down to the allowed flags and parameters. All commands are recorded in an audit log.

Bolt SDK for Slack

Bolt SDK logos

If you only need to support Slack then you could use their Bolt SDKs to implement ChatOps. The SDKs support JavaScript, Python and Java, so you can choose your preferred language from those options. Since it’s the “official” way to integrate with Slack you can expect the SDKs to remain relevant in the foreseeable future.

Your app can be installed using OAuth 2.0 to any workspace, so it doesn’t even need to be restricted to your own organization.

The SDKs support real time events and messages, interactive messages that use the Block Kit, the ability to react to slash commands, shortcuts and interactive messages, as well as a wide variety of Slack’s web API methods.

The Block Kit is especially interesting since it can be used to configure the UI to add interactive buttons, menus, date and time pickers, text input fields, radio buttons and checkboxes.

Opsdroid

Opsdroid logo

Opsdroid is another Open Source, Python based bot. It has connectors to many chat services, can persist information in databases, supports advanced parsers, and is extendable with custom skills.

In addition to chat services like Slack, Mattermost or Telegram, Opsdroid can connect to GitHub too. This means that you can build your ChatOps functionality on top of GitHub issues and pull requests.

Skills are Python functions that are triggered by matcher decorators. You could use a basic parser to interpret the messages, but many of the NLP services that you can use with Botkit are available here, too. Functions can also be triggered on schedule with a crontab, or they can react to events such as new files and images.

There are some community skills available, though the selection doesn’t seem to be that huge. Many skills are made as some sort of a joke, or they implement one small feature and haven’t been updated in a long time. Still, it’s Python, so you can probably write your own skills quite easily..

Yetibot

Yetibot logo

Last on the list we have Yetibot, a ChatOps platform written in Clojure. It has been designed to run on Docker or Kubernetes.

Getting the bot up and running on Kubernetes should be quite straightforward using the official Helm template. Yetibot also requires some minor configuration and a Postgres database to function properly.

Yetibot expressions start with the exclamation mark, like we’re used to with other bots. However, the expressions are more powerful than what you’re probably used to. You can create complex expressions by piping commands together with the | character. The next command receives the output from the previous one as its input.

Subexpressions add even more complexity as you can nest an expression within each other. When you combine these with utilities such as range, xargs or grep you can unleash their full power.

Picking some examples from the long list of features, Yetibot can also query basic information from GitHub, and even create JIRA issues.

If you want to extend Yetibot you may have to learn Clojure, though.

Conclusion

Maybe this selection contained at least one option that would suit your need. As you can see there are quite many options to choose from with different levels of complexity as. In my opinion you should consider choosing a platform that has been written in a programming language that you’re already familiar with. That should make it easier for you to extend it with the features you need.

Did I miss something on the list? If so, send a tweet towards my way. I hope to see you in the next article!

Subscribe to my newsletter

What’s new with PäksTech? Subscribe to receive occasional emails where I will sum up stuff that has happened at the blog and what may be coming next.

powered by TinyLetter | Privacy Policy