Integrating Hermes with Slack turns your AI agent into a 24/7 command center, allowing you to message it, automate workflows, and receive notifications directly in your workspace.
Follow these steps to set it up:
Step 1: Generate the Slack App Manifest
Instead of configuring Scopes and Socket Mode manually in the Slack UI, you can let Hermes generate an App Manifest for you.
- Open your terminal and run the following command to generate the manifest file:
hermes slack manifest --write
- This creates a file containing all required permissions, event subscriptions, and Socket Mode settings optimized for Hermes. Open and copy the contents of this file.
Step 2: Create the Slack App
- Go to the Slack API Apps Dashboard and click Create New App.
- Select From an app manifest.
- Choose your target workspace, paste the generated manifest code, and click Create.
Step 3: Install and Get Your Tokens
- Go to the OAuth & Permissions page in the left sidebar and click Install to Workspace. Authorize the app.
- Once installed, copy the Bot User OAuth Token (starts with
xoxb-). - Go to the Basic Information tab and copy the Signing Secret.
- Go to the Socket Mode tab, generate an App-Level Token (starts with
xapp-), and copy it.
Step 4: Configure Hermes
- Open your Hermes configuration file:
nano ~/.hermes/config.yaml
- Add your Slack tokens to the
config.yamlfile:
slack:
botToken: "xoxb-YOUR_BOT_TOKEN_HERE"
appToken: "xapp-YOUR_APP_TOKEN_HERE"
signingSecret: "YOUR_SIGNING_SECRET_HERE"
Step 5: Start the Gateway
- Run the setup wizard in your terminal:
hermes gateway setup
- Select Slack (use your spacebar to select and enter to confirm).
- Paste the requested tokens when prompted.
- Start the gateway by running:
hermes gateway run
Step 6: Authorize Your Slack User ID
Hermes restricts access by default for security.
- Message your newly created bot in Slack (e.g., say
@Hermes hello). - Because you aren't authorized yet, the terminal logs will print an error reading:
gateway run unauthorized useralong with your specific Slack user ID. - Copy that user ID from the logs and authorize yourself in Hermes by running:
hermes config set Slack allowed_users [YOUR_USER_ID]
Step 7: Test the Bot
Restart the Hermes gateway. You can now chat directly with your Hermes AI agent in Slack!
Top comments (0)