Skip to content
AddHunt
Slack apps

SlackBot WS

Elixir framework for Slack bots on Socket Mode

Open source

  • Open source
  • Licence: MIT

In short

SlackBot WS is an open-source Elixir framework for building Slack bots over Socket Mode, with reconnection, backoff, heartbeats and rate limiting handled for the developer. It is for Elixir developers who want production-ready Slack bots without exposing public webhooks.

What you get

  • Socket Mode connection with no public endpoints
  • Automatic reconnects, backoff and heartbeats
  • Tier-aware rate limiting per channel and workspace
  • Compile-time DSL for slash command parsing
  • ETS or Redis cache adapters
  • Telemetry and LiveDashboard-ready metrics

The details

SlackBot WS takes care of the plumbing behind a Slack bot so the developer can concentrate on what the bot does. It targets Slack's Socket Mode, which keeps a persistent connection for real-time events instead of receiving webhooks, so a bot can run behind a firewall without public HTTP endpoints and be developed locally without a tunnel.

Built-in reliability

  • A supervised connection layer that retries with jitter and backoff, drops duplicate events and keeps heartbeats going
  • Rate limiting per channel and per workspace that enforces Slack's published tier quotas
  • Defaults that switch these protections on once tokens are added and the module is supervised
  • Handlers that run in supervised tasks, so a slow command does not block the socket loop

Developer ergonomics

A compile-time DSL parses slash commands into structured maps, replacing hand-written regular expressions. Event handlers, slash commands and Plug-like middleware compose into pipelines, and interactive payloads, from shortcuts and message actions to block suggestions and modal submissions, are handled by that same pipeline. The package ships with an AGENTS.md file so coding agents understand its features.

Production operation

ETS is the default cache, with Redis available for multi-node setups. For observability it emits telemetry spans, keeps a replayable diagnostics ring buffer and exposes metrics ready for LiveDashboard. SlackBot WS is MIT licensed and published as a Hex package.

Alternatives to SlackBot WS

Questions

Why does SlackBot WS use Socket Mode?

Socket Mode delivers events over a persistent connection, so bots work behind firewalls without public HTTP endpoints and need no tunnel during local development.

Can it run on several nodes?

Yes. The default cache is ETS, and it can be switched to Redis for multi-node deployments.

More like this