Skip to content

Platform plugins (Discord, IRC, Teams, etc.) missing plugin.yaml in pip package — adapters cannot be discovered #34576

@cat-xierluo

Description

@cat-xierluo

Bug: Platform adapters not loadable after pip install hermes-agent

Summary

After installing hermes-agent 0.15.1 via pip install hermes-agent, platform adapters under plugins/platforms/ (Discord, IRC, Teams, Google Chat, LINE, Mattermost, ntfy, SimpleX) are completely non-functional. The plugin discovery system cannot find them because the required plugin.yaml manifest files are not included in the pip package.

Environment

  • hermes-agent version: 0.15.1
  • Install method: pip install hermes-agent (also pip install 'hermes-agent[messaging]')
  • OS: macOS (also affects Linux)
  • Python: 3.11

Root Cause

The platform adapters were moved from the built-in _create_adapter() if/elif chain in gateway/run.py to the plugin system under plugins/platforms/. However, the pip package does not include plugin.yaml files for any of these plugins.

The plugin discovery pipeline is:

  1. PluginManager.discover_and_load()_scan_directory() looks for plugin.yaml in each subdirectory
  2. Without plugin.yaml, the directory is skipped (recursed into at depth 0, then skipped at depth 1)
  3. register() in each adapter's __init__.py is never called
  4. platform_registry has no entry for these platforms
  5. Gateway falls through both the plugin path and the built-in path → "No adapter available for discord"

Additionally, GatewayConfig._scan_bundled_plugin_platforms() explicitly requires both __init__.py AND plugin.yaml:

# gateway/config.py:177
if (
    child.is_dir()
    and (child / "__init__.py").exists()
    and (
        (child / "plugin.yaml").exists()
        or (child / "plugin.yml").exists()
    )
):
    names.add(child.name.lower())

Affected Files

All 8 platform plugin directories in the pip package are missing plugin.yaml:

plugins/platforms/discord/       — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/irc/           — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/teams/         — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/google_chat/   — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/line/          — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/mattermost/    — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/ntfy/          — __init__.py, adapter.py  (no plugin.yaml)
plugins/platforms/simplex/       — __init__.py, adapter.py  (no plugin.yaml)

Evidence

Gateway logs after fresh pip install:

WARNING gateway.run: No adapter available for discord

Despite discord.py being installed and DISCORD_BOT_TOKEN configured in .env.

The _create_adapter() built-in chain has Telegram, Feishu, Slack, WhatsApp, Signal, etc. but not Discord — it was moved to the plugin system without the required manifest file.

Workaround

Manually create plugin.yaml for each needed platform adapter. For Discord:

# /path/to/site-packages/plugins/platforms/discord/plugin.yaml
name: discord
version: "0.15.1"
kind: platform
description: Discord platform adapter for Hermes
requires_env:
  - DISCORD_BOT_TOKEN

⚠️ This file will be overwritten on pip install --upgrade.

Expected Fix

Include plugin.yaml manifests for all platform plugins in the pip package (i.e., add them to the source tree under plugins/platforms/*/plugin.yaml so they're picked up by the build system).

Impact

This is a blocking issue for any user who installs via pip and needs Discord (or IRC, Teams, etc.). The platform simply cannot connect, with no clear error message pointing to the root cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundarea/dockerDocker image, Compose, packagingcomp/gatewayGateway runner, session dispatch, deliverycomp/pluginsPlugin system and bundled pluginstype/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