Skip to content

[Bug]: Mattermost configuration parsing fails #3511

@MPavleski

Description

@MPavleski

Bug Description

When a message is sent to the agent on Mattermost gateway throws error:

Traceback (most recent call last):
  File "/home/green/hermes-agent/gateway/run.py", line 2481, in _handle_message_with_agent
    agent_result = await self._run_agent(
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/green/hermes-agent/gateway/run.py", line 4908, in _run_agent
    enabled_toolsets = sorted(_get_platform_tools(user_config, platform_key))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/green/hermes-agent/hermes_cli/tools_config.py", line 416, in _get_platform_tools
    default_ts = PLATFORMS[platform]["default_toolset"]

Steps to Reproduce

  1. Configure mattermost
  2. Send message to agent

Expected Behavior

Mattermost working.

Actual Behavior

Mattermost not working, with bot replying in chat with:

Sorry, I encountered an error (KeyError).
'mattermost'
Try again or use /reset to start a fresh session.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Operating System

Ubuntu 24.04

Python Version

3.11.11

Hermes Version

Hermes Agent v0.4.0 (2026.3.23)

Relevant Logs / Traceback

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions