fix(setup): auto-install matrix-nio during hermes setup#1978
Closed
Gutslabs wants to merge 1 commit into
Closed
Conversation
When a user configures Matrix during `hermes setup`, the setup wizard saved credentials to .env but never installed the required matrix-nio package. The gateway then failed to start with "matrix-nio not installed". This follows the same auto-install pattern already used by Modal and Daytona backends: try to import the package, and if missing, install it via uv pip (or pip fallback). Installs matrix-nio[e2e] when E2EE is enabled, plain matrix-nio otherwise. Also adds the matrix extra to pyproject.toml [all] so that `pip install hermes-agent[all]` includes matrix-nio.
|
@Gutslabs I think you forgot one line in the beginning of the file "setup.py". without this line I get following error |
This was referenced Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Auto-install
matrix-nioduringhermes setupwhen the user configures Matrix. Previously, setup only saved credentials to.envbut never installed the required Python package, causing the gateway to fail with "matrix-nio not installed".The Bug
hermes setupand configures MatrixMATRIX_HOMESERVER,MATRIX_ACCESS_TOKEN, etc. to.envmatrix-nio— just prints a manual hintmatrix-niowas not included in the[all]extra inpyproject.toml, so evenpip install hermes-agent[all]didn't install itThe Fix
hermes_cli/setup.py, following the same pattern already used by Modal (swe-rex[modal]) and Daytona backends:try: import nio / except ImportError: subprocess.run(uv pip install ...)matrix-nio[e2e]when E2EE is enabled, plainmatrix-niootherwisepip installifuvis not availablehermes-agent[matrix]to the[all]extra inpyproject.tomlTest Plan
hermes setup, configure Matrix, verifymatrix-niois installed automaticallypip install hermes-agent[all]now includesmatrix-nioCloses #1973