Slack Machine

A simple, yet powerful and extendable Slack bot

Last verified:

Visit Slack Machine

What is Slack Machine?

Slack Machine is a simple, yet powerful and extendable Slack bot framework that transforms your Slack workspace into a ChatOps powerhouse. More than just a bot, it is a framework designed to help developers build Slack bots quickly using an intuitive plugin system that allows for easy code organization.

The framework is built on top of Python's AsyncIO library for high performance, using the Slack Events API and Socket Mode so bots don't need to be exposed to the internet. It provides both high-level and low-level APIs for building plugins, with features like regex-based message listening, slash command support, reactions, threads, ephemeral messages, DMs, blocks, modals, and interactive elements. Persistent storage is supported through Redis, DynamoDB, SQLite, and in-memory backends.

Slack Machine is ideal for Python developers who want to create Slack bots for automation, ChatOps, and workspace integration. It is particularly suited for building complex bots with multiple plugins where code organization matters. The project uses MIT licensing and is actively maintained with support for Python 3.9-3.13.

Slack Machine pricing

Pricing model: Freemium

Slack Machine is completely free and open-source under the MIT License. There are no paid plans, subscription tiers, or premium features. The package is published on PyPI and can be installed via uv add slack-machine, poetry add slack-machine, or pip install slack-machine. All features including persistent storage backends, scheduling, modals, blocks, and interactive elements are included at no cost.

Slack Machine pros

  • Simple minimal configuration to get started
  • Intuitive plugin system for quick bot development
  • Built on Slack Events API for smooth real-time responses
  • Socket Mode support - bot doesn't need internet exposure
  • AsyncIO-based for concurrent high-performance operation
  • High-level API for maximum developer convenience
  • Low-level API for maximum flexibility
  • Support for regex-based message listening and responding
  • Built-in slash command support
  • Persistent storage with Redis, DynamoDB, SQLite, in-memory
  • Support for blocks, modals, and interactive elements
  • Scheduling functionality for messages and plugin functions
  • Help texts automatically generated for plugins
  • Event emission and listening for inter-plugin communication
  • MIT license - free to use and modify
  • Active maintenance with Python 3.9-3.13 support
  • Easy plugin organization with package structure

Slack Machine cons

  • Only supports Slack backend - no other chat platforms
  • No built-in AI capabilities in the core
  • Requires Python knowledge - not for non-programmers
  • All plugin functions must be async coroutines
  • Dropped Python 3.8 support in v0.38.0
  • Does not support shortcuts yet (coming soon)
  • Installation from pip not recommended - prefer uv/Poetry
  • Requires virtual environment setup for proper installation

Frequently asked questions about Slack Machine

What is Slack Machine?

Slack Machine is a simple, yet powerful and extendable Slack bot framework. More than just a bot, it is a framework that helps you develop your Slack workspace into a ChatOps powerhouse. It is built with an intuitive plugin system that lets you build bots quickly while allowing for easy code organization.

How do I install Slack Machine?

You can install Slack Machine using uv add slack-machine for uv projects, poetry add slack-machine for Poetry projects, or pip install slack-machine (not recommended). It is strongly recommended to install inside a virtual environment. Alternatively, you can install from source by cloning the GitHub repository.

What Python versions are supported?

As of version 0.38.0, Slack Machine supports Python 3.9, 3.10, 3.11, 3.12, and 3.13. Support for Python 3.8 was dropped in v0.38.0 because Python 3.8 reached end-of-life on 2024-10-07. Python 3.7 support was removed in v0.34.0.

How do I create a plugin?

Plugins are classes that subclass MachineBasePlugin. Create a plugins folder in your bot directory with _init_.py, then create a Python file for your plugin. Import MachineBasePlugin and decorators like listen_to, create your plugin class, and decorate functions with @listen_to(regex=...) or @respond_to(). Enable the plugin in local_settings.py under the PLUGINS list.

What decorators are available for plugins?

Slack Machine provides decorators like @listen_to for listening to any regular expression, @respond_to for responding to messages, and support for slash commands. Functions can listen and respond to regex patterns, capture parts of messages as variables, respond in channels/groups/DMs, with reactions, in threads, with ephemeral messages, and listen to any Slack Event API event.

Does Slack Machine require my bot to be exposed to the internet?

No, Slack Machine uses Socket Mode so your bot doesn't need to be exposed to the internet. It is built on top of the Slack Events API for smoothly responding to events in semi real-time, which works through Socket Mode for secure connections.

What storage backends are supported?

Slack Machine supports persistent storage through Redis, DynamoDB, SQLite, and in-memory storage. You can store and retrieve any kind of data using these backends. SQLite was added in v0.34.0, DynamoDB in v0.27.0, and Redis has been supported since early versions.

Is Slack Machine free to use?

Yes, Slack Machine is completely free and open-source under the MIT License. You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software without any restrictions or fees.

What is the difference between Slack Machine and Bolt?

While Slack Team created Bolt which is similar to Slack Machine, there are differences in how code is organized. Slack Machine is better suited for building complex Slack bots where code is organized in multiple plugins. Bolt does not support organizing code in multiple plugins as well as Slack Machine does.

What features are coming soon?

Support for shortcuts is listed as coming soon. The framework author also mentions that much more functionality is planned. The project is actively maintained with regular updates to dependencies and new features being added in each release.

Categories

Use cases

Browse all AI tools on NeedAnAI