Configurer Hermes Agent sur Slack

Configurer Hermes Agent sur Slack

Cette page fait partie du guide pratique francophone consacré à Hermes Agent. Elle répond à l'intention de recherche : connecter Slack.

Le contenu s'appuie sur la documentation officielle Hermes Agent associée à cette page. L'objectif n'est pas de remplacer la documentation de Nous Research, mais de fournir une lecture claire en français, structurée pour aller vite, avec un maillage logique vers les pages complémentaires du même site.

À retenir

  • Sujet principal : hermes agent slack.
  • Type de page : spoke.
  • Cluster : messagerie.
  • Source canonique : documentation officielle Hermes Agent.
  • Aucun lien vers l'autre domaine n'est utilisé dans cette page.

Quand utiliser cette page

Utilisez cette page quand vous voulez connecter Slack. Elle part du principe que Hermes Agent est déjà identifié comme l'outil à mettre en place ou à comprendre, puis détaille les points importants issus de la documentation officielle.

Si vous découvrez seulement l'outil, revenez d'abord au hub parent puis suivez les liens internes proposés en fin de page.

Base officielle

Connect Hermes Agent to Slack as a bot using Socket Mode. Socket Mode uses WebSockets instead of

public HTTP endpoints, so your Hermes instance doesn't need to be publicly accessible — it works

behind firewalls, on your laptop, or on a private server.

Classic Slack apps (using RTM API) were fully deprecated in March 2025. Hermes uses the modern

Bolt SDK with Socket Mode. If you have an old classic app, you must create a new one following

the steps below.

Overview

  • Component — Value
  • Libraryslack-bolt / slack_sdk for Python (Socket Mode)
  • Connection — WebSocket — no public URL required
  • Auth tokens needed — Bot Token (xoxb-) + App-Level Token (xapp-)
  • User identification — Slack Member IDs (e.g., U01ABC2DEF3)

---

Step 1: Create a Slack App

The fastest path is to paste a manifest Hermes generates for you. It

declares every built-in slash command (/btw, /stop, /model, …),

every required OAuth scope, every event subscription, and enables Socket

Mode — all at once.

Option A: From a Hermes-generated manifest (recommended)

  1. Generate the manifest:

```bash

hermes slack manifest --write

```

This writes ~/.hermes/slack-manifest.json and prints paste-in

instructions.

  1. Go to https://api.slack.com/apps →

Create New AppFrom an app manifest

  1. Pick your workspace, paste the JSON contents, review, click Next

Create

  1. Skip ahead to Step 6: Install App to Workspace. The manifest

handled scopes, events, and slash commands for you.

Option B: From scratch (manual)

  1. Go to https://api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Enter an app name (e.g., "Hermes Agent") and select your workspace
  5. Click Create App

You'll land on the app's Basic Information page. Continue with

Steps 2–6 below.

---

Step 2: Configure Bot Token Scopes

Navigate to Features → OAuth & Permissions in the sidebar. Scroll to Scopes → Bot Token Scopes and add the following:

  • Scope — Purpose
  • chat:write — Send messages as the bot
  • app_mentions:read — Detect when @mentioned in channels
  • channels:history — Read messages in public channels the bot is in
  • channels:read — List and get info about public channels
  • groups:history — Read messages in private channels the bot is invited to
  • im:history — Read direct message history
  • im:read — View basic DM info
  • im:write — Open and manage DMs
  • mpim:history — Read group direct message (multi-person DM) history
  • mpim:read — View basic group DM info
  • users:read — Look up user information
  • files:read — Read and download attached files, including voice notes/audio
  • files:write — Upload files (images, audio, documents)

Without channels:history and groups:history, the bot will not receive messages in channels

it will only work in DMs. Without files:read, Hermes can chat but cannot reliably read user-uploaded attachments.

These are the most commonly missed scopes.

Optional scopes:

  • Scope — Purpose
  • groups:read — List and get info about private channels

---

Step 3: Enable Socket Mode

Socket Mode lets the bot connect via WebSocket instead of requiring a public URL.

  1. In the sidebar, go to Settings → Socket Mode
  2. Toggle Enable Socket Mode to ON
  3. You'll be prompted to create an App-Level Token:

- Name it something like hermes-socket (the name doesn't matter)

- Add the connections:write scope

- Click Generate

  1. Copy the token — it starts with xapp-. This is your SLACK_APP_TOKEN

You can always find or regenerate app-level tokens under Settings → Basic Information → App-Level Tokens.

---

Step 4: Subscribe to Events

This step is critical — it controls what messages the bot can see.

  1. In the sidebar, go to Features → Event Subscriptions
  2. Toggle Enable Events to ON
  3. Expand Subscribe to bot events and add:
  • Event — Required? — Purpose
  • message.imYes — Bot receives direct messages
  • message.mpimYes — Bot receives messages in group DMs (multi-person DMs) it's added to
  • message.channelsYes — Bot receives messages in public channels it's added to
  • message.groupsRecommended — Bot receives messages in private channels it's invited to
  • app_mentionYes — Prevents Bolt SDK errors when bot is @mentioned
  1. Click Save Changes at the bottom of the page

danger Missing event subscriptions is the #1 setup issue

If the bot works in DMs but not in channels, you almost certainly forgot to add

message.channels (for public channels) and/or message.groups (for private channels).

Without these events, Slack simply never delivers channel messages to the bot.

---

Step 5: Enable the Messages Tab

This step enables direct messages to the bot. Without it, users see "Sending messages to this app has been turned off" when trying to DM the bot.

  1. In the sidebar, go to Features → App Home
  2. Scroll to Show Tabs
  3. Toggle Messages Tab to ON
  4. Check "Allow users to send Slash commands and messages from the messages tab"

danger Without this step, DMs are completely blocked

Even with all the correct scopes and event subscriptions, Slack will not allow users to send direct messages to the bot unless the Messages Tab is enabled. This is a Slack platform requirement, not a Hermes configuration issue.

---

Step 6: Install App to Workspace

  1. In the sidebar, go to Settings → Install App
  2. Click Install to Workspace
  3. Review the permissions and click Allow
  4. After authorization, you'll see a Bot User OAuth Token starting with xoxb-
  5. Copy this token — this is your SLACK_BOT_TOKEN

If you change scopes or event subscriptions later, you must reinstall the app for the changes

to take effect. The Install App page will show a banner prompting you to do so.

---

Step 7: Find User IDs for the Allowlist

Hermes uses Slack Member IDs (not usernames or display names) for the allowlist.

To find a Member ID:

  1. In Slack, click on the user's name or avatar
  2. Click View full profile
  3. Click the (more) button
  4. Select Copy member ID

Member IDs look like U01ABC2DEF3. You need your own Member ID at minimum.

---

Step 8: Configure Hermes

Add the following to your ~/.hermes/.env file:

SLACK_BOT_TOKEN=xoxb-your-bot-token-here
SLACK_APP_TOKEN=xapp-your-app-token-here
SLACK_ALLOWED_USERS=U01ABC2DEF3              # Comma-separated Member IDs

SLACK_HOME_CHANNEL=C01234567890              # Default channel for cron/scheduled messages
SLACK_HOME_CHANNEL_NAME=general              # Human-readable name for the home channel (optional)

Or run the interactive setup:

hermes gateway setup    # Select Slack when prompted

Then start the gateway:

hermes gateway              # Foreground
hermes gateway install      # Install as a user service
sudo hermes gateway install --system   # Linux only: boot-time system service

---

Step 9: Invite the Bot to Channels

After starting the gateway, you need to invite the bot to any channel where you want it to respond:

/invite @Hermes Agent

The bot will not automatically join channels. You must invite it to each channel individually.

---

Slash Commands

Every Hermes command (/btw, /stop, /new, /model, /help, ...)

is a native Slack slash command — exactly the way they work on Telegram

and Discord. Type / in Slack and the autocomplete picker lists every

Hermes command with its description.

Under the hood: Hermes ships with a generated Slack app manifest (see

Step 1, Option A) that declares every command in

COMMAND_REGISTRY

as a slash command. In Socket Mode, Slack routes the command event

through the WebSocket regardless of the manifest's url field.

Refreshing slash commands after updates

When Hermes adds new commands (e.g. after hermes update), regenerate

the manifest and update your Slack app:

hermes slack manifest --write

Then in Slack:

  1. Open https://api.slack.com/apps →

your Hermes app

  1. Features → App Manifest → Edit
  2. Paste the new contents of ~/.hermes/slack-manifest.json
  3. Save. Slack will prompt to reinstall the app if scopes or slash

commands changed.

Legacy /hermes <subcommand> still works

For backward compatibility with older manifests, you can still type

/hermes btw run the tests — Hermes routes it the same way as `/btw

run the tests. Free-form questions also work: /hermes what's the

weather?` is treated as a regular message.

Using commands inside threads (the !cmd prefix)

Slack itself blocks native slash commands inside thread repli

Points de vigilance

  • Vérifiez toujours la version active de Hermes Agent avant d'appliquer une commande ou une configuration.
  • Ne collez pas de clé API dans un chat public ou dans une page visible.
  • Gardez les secrets dans les fichiers ou gestionnaires prévus pour cela.
  • Si une fonctionnalité dépend d'un provider, d'un plugin ou d'une plateforme de messagerie, vérifiez que le composant est bien activé dans votre profil.
  • Pour une installation de production, testez d'abord le flux complet sur une machine ou un profil isolé.

Exemple de parcours logique

  1. Lire la page courante pour comprendre hermes agent slack.
  2. Ouvrir le hub parent du cluster messagerie.
  3. Passer ensuite aux pages complémentaires proposées dans « À lire ensuite ».
  4. Revenir à la documentation officielle si vous avez besoin du détail exact ou d'une commande récemment modifiée.

FAQ rapide

Cette page remplace-t-elle la documentation officielle ?

Non. Elle sert de guide francophone structuré. Le lien vers la source officielle est disponible en bas de page.

Les commandes sont-elles garanties à jour ?

Elles sont basées sur la documentation officielle récupérée au moment de la génération. Pour un usage critique, vérifiez toujours la page officielle liée en bas.

Pourquoi autant de liens internes ?

Hermes Agent est un système modulaire. L'installation, les providers, les outils, la mémoire, les skills, la sécurité et les plateformes se répondent. Le maillage interne aide à suivre ce chemin sans tomber sur des pages orphelines.