hermes - ✅(Solved) Fix [Bug]: agent.transports sub-package missing from built distribution (setuptools include glob) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#13581Fetched 2026-04-22 08:05:36
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1cross-referenced ×1subscribed ×1

Error Message

ModuleNotFoundError: No module named 'agent.transports'

Root Cause

In pyproject.toml, [tool.setuptools.packages.find].include:

include = ["agent", "tools", "tools.*", "hermes_cli", "gateway", "gateway.*", ...]

agent is listed without agent.*. Setuptools packages.find with an explicit include list does not recurse into sub-packages unless the * glob is present. Every other namespace with sub-packages (tools, gateway, plugins) already has its glob — agent is the only one missing.

Fix Action

Fixed

PR fix notes

PR #13580: fix(packaging): add agent.* to setuptools packages.find include

Description (problem / solution / changelog)

What does this PR do?

Adds the missing agent.* glob to [tool.setuptools.packages.find].include in pyproject.toml, so that sub-packages like agent.transports are included in the built distribution.

Without this, any install from source (pip, Nix, etc.) is missing agent/transports/ and crashes at runtime with:

ModuleNotFoundError: No module named 'agent.transports'

Related Issue

Fixes #13581

Introduced by commit 432772d (PR #13543), which added the agent/transports/ sub-package but did not update pyproject.toml.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • pyproject.toml: added "agent.*" next to "agent" in [tool.setuptools.packages.find].include — matching the existing pattern used by tools, gateway, and plugins.

How to Test

  1. Build from source: pip install .
  2. Verify the sub-package is present: python -c "import agent.transports" — should succeed instead of raising ModuleNotFoundError.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix (no unrelated commits)
  • I've tested on my platform: macOS 15 (Nix build)

Documentation & Housekeeping

  • N/A — no doc changes needed for a packaging fix

Changed files

  • pyproject.toml (modified, +1/-1)

Code Example

ModuleNotFoundError: No module named 'agent.transports'

---

include = ["agent", "tools", "tools.*", "hermes_cli", "gateway", "gateway.*", ...]
RAW_BUFFERClick to expand / collapse

Bug Description

agent.transports sub-package is not included in the built distribution because pyproject.toml lists "agent" in [tool.setuptools.packages.find].include without the corresponding "agent.*" glob.

Any install from source (pip, Nix, etc.) is missing agent/transports/ and crashes at runtime:

ModuleNotFoundError: No module named 'agent.transports'

This affects all users on the native Anthropic provider since commit 432772d (PR #13543) introduced the agent/transports/ sub-package.

Steps to Reproduce

  1. Install hermes-agent from source (pip install . or via Nix)
  2. Configure the native Anthropic provider
  3. Start a conversation
  4. run_agent.py:6552 calls from agent.transports import get_transport
  5. Crash: ModuleNotFoundError: No module named 'agent.transports'

Expected Behavior

agent.transports should be importable after a source install, like every other sub-package (tools.*, gateway.*, plugins.*).

Actual Behavior

agent/transports/ directory is absent from the installed package. The 4 files (__init__.py, anthropic.py, base.py, types.py) are never copied.

Affected Component

Setup / Installation

Root Cause Analysis

In pyproject.toml, [tool.setuptools.packages.find].include:

include = ["agent", "tools", "tools.*", "hermes_cli", "gateway", "gateway.*", ...]

agent is listed without agent.*. Setuptools packages.find with an explicit include list does not recurse into sub-packages unless the * glob is present. Every other namespace with sub-packages (tools, gateway, plugins) already has its glob — agent is the only one missing.

Proposed Fix

Add "agent.*" next to "agent" in the include list. One-line change.

PR ready: #13580

Environment

  • OS: macOS 15 (Nix build)
  • Python: 3.12
  • Hermes: v0.10.0

extent analysis

TL;DR

Add "agent.*" to the include list in pyproject.toml to ensure the agent.transports sub-package is included in the built distribution.

Guidance

  • Verify the issue by checking the pyproject.toml file for the missing "agent.*" glob in the [tool.setuptools.packages.find].include section.
  • To fix, update the include list in pyproject.toml to include "agent.*" next to "agent", like other namespaces with sub-packages.
  • After applying the fix, reinstall the package from source using pip install . or via Nix to ensure the agent/transports/ directory is included.
  • Test the installation by running a conversation with the native Anthropic provider to confirm that the ModuleNotFoundError is resolved.

Example

No code snippet is necessary, as the fix involves a simple update to the pyproject.toml file.

Notes

This fix assumes that the issue is solely due to the missing "agent.*" glob in the pyproject.toml file. If other issues are present, additional debugging may be required.

Recommendation

Apply the workaround by adding "agent.*" to the include list in pyproject.toml, as this is a straightforward fix that addresses the identified root cause.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: agent.transports sub-package missing from built distribution (setuptools include glob) [1 pull requests, 1 comments, 2 participants]