Blog / channel guide
Hermes Agent Matrix Setup: Any Homeserver, One Bot
To connect Hermes Agent to Matrix, create a bot account on your homeserver, authorise the gateway with it, then invite the bot to rooms and mention it. Matrix is the most portable option in the messenger list because the assistant works with any homeserver, including your own, and direct messages do not require a mention.
- 01
Choose the homeserver the bot will live on
Decide whether the assistant runs on your own Synapse, Conduit, or Dendrite server or on matrix.org. A self-hosted homeserver keeps message history under your control.
- 02
Create a dedicated bot account
Register a separate account for the assistant rather than reusing a human login. A dedicated account makes audit, revocation, and display identity much clearer.
- 03
Store the bot credentials as a secret
Add the bot account credentials to the Hermes Agent deployment screen. Treat the access token like a password, because it can read every room the bot has joined.
- 04
Invite the bot and test a direct message
Start with a direct message, where the assistant answers every message with no mention required. That proves the account, token, and runtime before you involve a room.
- 05
Add one room and confirm mention gating
Invite the bot to a single room and send a message without a mention, then with one. In rooms the assistant should stay silent until it is mentioned.
- 06
Decide the threading and encryption policy
Choose whether replies are threaded automatically, and decide whether end-to-end encryption is required for the rooms the bot joins.
Four-step path
How do you connect Hermes Agent to Matrix?
Five checkpoints: choose a homeserver, create a dedicated bot account, store the credentials, invite the bot to one room, then tune mentions and threads.
- Step 01
Choose the homeserver the bot will live on
Decide whether the assistant runs on your own Synapse, Conduit, or Dendrite server or on matrix.org. A self-hosted homeserver keeps message history under your control.
- Step 02
Create a dedicated bot account
Register a separate account for the assistant rather than reusing a human login. A dedicated account makes audit, revocation, and display identity much clearer.
- Step 03
Store the bot credentials as a secret
Add the bot account credentials to the Hermes Agent deployment screen. Treat the access token like a password, because it can read every room the bot has joined.
- Step 04
Invite the bot and test a direct message
Start with a direct message, where the assistant answers every message with no mention required. That proves the account, token, and runtime before you involve a room.
- Step 05
Add one room and confirm mention gating
Invite the bot to a single room and send a message without a mention, then with one. In rooms the assistant should stay silent until it is mentioned.
- Step 06
Decide the threading and encryption policy
Choose whether replies are threaded automatically, and decide whether end-to-end encryption is required for the rooms the bot joins.
Which Matrix homeserver should you use?
Any of them. Hermes Agent works with Synapse, Conduit, Dendrite, and matrix.org, so the deciding factor is who owns the message history rather than compatibility.
- Self-hosted Synapse is the most common choice for teams that want their own data.
- Dendrite and Conduit are lighter alternatives with the same bot behaviour.
- matrix.org is fine for evaluation and small deployments.
- The bot account must exist on the same homeserver as the rooms it joins.
When does the Matrix bot reply?
Direct messages always get a reply, while rooms require an explicit mention by default. That default is what keeps the assistant from answering every message in a busy room.
- Direct messages: every message is a prompt, and each DM keeps its own session.
- Rooms: an @mention is required unless you change the behaviour.
- Free-response rooms can be allowed individually for channels where the bot is the point.
- Once the bot has joined a thread, further replies in that thread do not need a mention.
How do threads work in Matrix?
The assistant supports Matrix threads and can create one automatically for each answer in a room, which keeps a long exchange out of the main timeline.
- Automatic threading is the default for room replies and can be disabled.
- Direct messages are flat by default, with threading available when mentioned.
- Threaded context is isolated from the main room timeline.
- Threading is usually the difference between a clean room and an unusable one.
How does end-to-end encryption affect setup?
Encryption keeps message content private to the participants but adds device verification work, so decide early rather than enabling it after a room is already in use.
- Encrypted rooms require the bot device to be verified and trusted.
- Unverified devices may be unable to read history or decrypt older messages.
- Test the bot in an encrypted room before making it the default policy.
- Plan for what happens if the bot device identity is lost or reset.
Which primary sources support this page?
Product behavior is checked against the current deployment flow. These external links provide the upstream project or channel documentation used for setup details.
Direct answers
Frequently asked questions
Do I need a public URL for Matrix?
No. The gateway keeps an outbound connection to the homeserver, so the bot works without exposing an inbound endpoint.
Can the assistant answer without an @mention in a room?
Only if you allow it. Mention gating is on by default in rooms, and you can either turn it off or allow specific rooms to skip it.
Are slash commands supported in Matrix?
Yes. If your client reserves the slash character for local commands, the assistant also accepts the bang-prefixed form and normalises it.
What should I do if the bot cannot read a room?
Check membership and encryption state first. In encrypted rooms an unverified device is the usual reason the assistant cannot see messages.
Key takeaways
- To connect Hermes Agent to Matrix, create a bot account on your homeserver, authorise the gateway with it, then invite the bot to rooms and mention it. Matrix is the most portable option in the messenger list because the assistant works with any homeserver, including your own, and direct messages do not require a mention.
- Start with one model, one channel, and one controlled test conversation.
- Use managed hosting when deployment speed matters more than operating the server yourself.
Continue the setup
Related Hermes Agent guides
Blog guide
How to Choose a Hermes Agent Channel
Compare Telegram, Discord, and WhatsApp for Hermes Agent deployment. Choose the best channel for support, daily briefings, and team operations.
Read nextBlog guide
Hermes Agent Mattermost Setup for Self-Hosted Teams
Add Hermes Agent to a self-hosted Mattermost server: enable bot accounts, create the bot, scope it to the right teams, and choose thread or flat replies.
Read nextBlog guide
Why Hermes Agent Is Not Sending or Receiving Messages
Troubleshoot Hermes Agent message failures across Telegram, Discord, and WhatsApp by checking channel access, runtime state, model keys, and logs.
Read nextBlog guide
Hermes Agent Microsoft Teams Setup for Work Accounts
Add Hermes Agent to Microsoft Teams with a bot registration, tenant admin consent, and a private chat test. Covers scopes, policies, and silent-bot fixes.
Read next