Connect Hermes Agent to Mattermost Team Edition

Connect Hermes Agent to Mattermost as a bot: enable bot accounts, create a token, set three variables, start the gateway, chat from DMs or channels.

Deploy Mattermost Team Edition as a fully managed service starting at €9/month. Get automated backups, SSL, updates, monitoring, and human support, all included.

DANIAN runs Mattermost Team Edition as a fully managed service: installation, updates, backups, monitoring and security are handled for you.

See the mattermost hosting page for plans, pricing and a free trial.

 

Hermes Agent, the open-source agent from Nous Research, ships a native Mattermost channel. Once connected, you chat with the agent from direct messages or team channels, and every transcript stays inside your own Mattermost database. The setup takes about ten minutes.

For channel architecture, private-room design, per-channel prompts and troubleshooting, see the deep guide Hermes Agent on Mattermost: the complete guide.

What you need

A running Mattermost instance (your DANIAN app URL), a System Admin account in Mattermost, and Hermes Agent installed on the machine that will run it. The install command and requirements are on the

Hermes Agent quickstart.

 

Step 1: Enable bot accounts in Mattermost

Log in to Mattermost as System Admin. Open System Console, then Integrations, then Bot Accounts. Set Enable Bot Account Creation to true and save.

Step 2: Create the bot and copy its token

Open the main menu, choose Integrations, then Bot Accounts, then Add Bot Account. Use username hermes and display name Hermes Agent; the Member role is enough. Mattermost shows the bot token once, so copy it immediately and store it safely. Anyone holding that token controls the bot.

Step 3: Add the bot where you want it

Use Add Members in any channel where the agent should answer mentions, and open a direct message with the bot for one-to-one use. The bot responds in DMs without any mention.

Step 4: Find your Mattermost User ID

While logged in to Mattermost, open this address in a new browser tab, with your own instance URL: https://YOUR-SERVER/api/v4/users/me. Copy the value of the id field. This 26-character ID is not your username, and it controls who is allowed to talk to the agent.

Step 5: Point Hermes at your Mattermost

Run hermes gateway setup and select Mattermost when prompted, then paste your server URL, bot token and user ID. For manual configuration, add three lines to ~/.hermes/.env:

MATTERMOST_URL=https://your-mattermost-url

MATTERMOST_TOKEN=your-bot-token

MATTERMOST_ALLOWED_USERS=your-user-id

Step 6: Start the gateway and test

Start the gateway with hermes gateway, then send the bot a direct message such as hello. In channels, mention @hermes to get a response. Each direct message keeps its own session, and threads keep long tasks out of the main channel flow.

 

Useful behavior settings

Set MATTERMOST_REPLY_MODE=thread to keep replies in threads, or MATTERMOST_REQUIRE_MENTION=false to let the agent answer channel messages without a mention. Full option reference, including troubleshooting for 403 errors and authentication failures, is in the official

Hermes Agent Mattermost guide.

 

Related guides:

connecting OpenClaw to Mattermost and

connecting the Pi coding agent.

For the wider picture on private channels for AI agents, see the guide

The private chat platform for your AI agents.

Explore the platform

Find more information about our company, platform, and services on our website.

Visit danian.co