Skip to content

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

Closed

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.

Activity

  1. Bartok9 commented on May 29, 2026

    @Bartok9

    Thanks for the detailed root-cause write-up — the diagnosis (plugin discovery skips dirs without plugin.yaml, so the adapters never register()) is correct for the 0.15.1 PyPI build.

    The good news: this is already fixed on main. I verified it end-to-end:

    1. The manifests exist in the source tree. All 8 platform adapters were given a plugin.yaml during the built-in→bundled-plugin migrations (May 18–24):

    plugins/platforms/discord/plugin.yaml      (cc8e5ec2a — Discord migration)
    plugins/platforms/mattermost/plugin.yaml   (af973e407 — Mattermost migration)
    plugins/platforms/ntfy/plugin.yaml         (6a8e131a0 — ntfy migration)
    plugins/platforms/{irc,teams,google_chat,line,simplex}/plugin.yaml  (0392cf53b)
    

    2. The packaging gap was fixed by #34484 (fix(packaging): ship bundled plugin.yaml manifests in wheel and sdist, merge commit 2765b02021c1e6eb743e2ce2eb359fc66a5aa89e, merged 2026-05-29 08:23 UTC — confirmed ancestor of current main). It added:

    • pyproject.toml → [tool.setuptools.package-data] plugins += "**/plugin.yaml", "**/plugin.yml" (wheel)
    • MANIFEST.in → recursive-include plugins plugin.yaml plugin.yml (sdist)
    • a regression test in tests/test_packaging_metadata.py

    3. Runtime-proved on current main. Built the wheel from main (HEAD c0b17b3c) and inspected it:

    0.15.1 (PyPI) current main
    plugin.yaml files in wheel 0 69
    plugins/platforms/discord/plugin.yaml not shipped shipped
    irc / teams / google_chat / line / mattermost / ntfy / simplex not shipped all 8 shipped

    So the directory-skip → No adapter available for discord chain you traced no longer triggers, because _scan_directory() now finds the plugin.yaml that ships in the package.

    The one caveat for you right now: the fix is on main but not yet on PyPI — the latest release is still 0.15.1, which predates #34484. Until the next release cuts:

    • Install from git to get the fix today: pip install git+https://github.com/NousResearch/hermes-agent.git@main
    • Or keep using your plugin.yaml workaround until the next PyPI release.

    Recommend closing this as fixed by #34484 (and tracking the next release for the PyPI artifact). Happy to leave it open if maintainers want it as the release-blocker tracker.

  2. kagura-chen commented on May 29, 2026

    @kagura-chen

    This was fixed on main earlier today in commit 2765b02 ("fix(packaging): ship bundled plugin.yaml manifests in wheel and sdist"), which references the original issue #34034.

    The fix adds **/plugin.yaml and **/plugin.yml to [tool.setuptools.package-data] for the plugins key, plus the corresponding MANIFEST.in entry for sdist builds.

    Until the next release is published to PyPI, you can install from main:

    pip install git+https://github.com/NousResearch/hermes-agent.git@main
  3. added
    type/bugSomething isn't working
    P1High — major feature broken, no workaround
    comp/pluginsPlugin system and bundled plugins
    comp/gatewayGateway runner, session dispatch, delivery
    on May 29, 2026
  4. alt-glitch commented on May 29, 2026

    @alt-glitch

    Duplicate of #34034 — same root cause (plugin.yaml manifests missing from PyPI package).

    Fix already merged on main as #34484 (consolidates #34072, #28170, #28162, #31753). The v0.15.1 release still ships the broken package; the fix will be in the next release.

  5. konsisumer commented on May 29, 2026

    @konsisumer

    Thanks for the thorough root-cause write-up — your diagnosis is exactly right for the 0.15.1 PyPI build (plugin discovery skips directories without plugin.yaml, so the adapters never register()).

    This is already resolved on main and is a duplicate of an existing tracker. For completeness, here is the state of each referenced item:

    The one caveat: the fix is on main but not yet on PyPI — the latest release is still 0.15.1, which predates #34484.

    Could you confirm the platform adapters load when installed from main (pip install git+https://github.com/NousResearch/hermes-agent.git@main)? If they do, this can be closed as a duplicate of #34034 and tracked for the next PyPI release.

  6. teknium1 commented on May 29, 2026

    @teknium1
    Collaborator

    Fixed on main and verified end-to-end.

    The fix is commit 2765b0202 ("fix(packaging): ship bundled plugin.yaml manifests in wheel and sdist"), which adds **/plugin.yaml and **/plugin.yml to [tool.setuptools.package-data] for the plugins key in pyproject.toml. Your root-cause write-up was exactly right — the wheel shipped each adapter's Python code but none of its plugin.yaml manifests, so PluginManager.discover_and_load() skipped every platform directory and register() was never called.

    Verification: built the wheel from current main and confirmed all 8 platform manifests ship —

    plugins/platforms/discord/plugin.yaml
    plugins/platforms/google_chat/plugin.yaml
    plugins/platforms/irc/plugin.yaml
    plugins/platforms/line/plugin.yaml
    plugins/platforms/mattermost/plugin.yaml
    plugins/platforms/ntfy/plugin.yaml
    plugins/platforms/simplex/plugin.yaml
    plugins/platforms/teams/plugin.yaml
    

    Duplicate of #34034 (same root cause). The fix lands in the next release; the published 0.15.1 PyPI artifact still has the broken package. Until then, an editable/source install (pip install -e . from a clone) has the manifests in place.

    Thanks for the detailed report — closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundarea/install-updateInstaller, updater, packaging, wheels, doctorcomp/gatewayGateway runner, session dispatch, deliverycomp/pluginsPlugin system and bundled pluginstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions