fix(deps): add hindsight-client as optional dependency#9194
Conversation
|
I'm running the agent using the official docker image and hindsight in another container (local external) and can't find a way to get hindsight-client to install on boot. Hoping this solves it. |
|
Thanks for working on this. I wanted to add a data point from an immutable container/Kubernetes deployment use case, because this is a real packaging problem for us. We run Hermes as a derived container image built from Our current workaround is to bake FROM nousresearch/hermes-agent:v2026.4.8
RUN python3 -m pip install --no-cache-dir --break-system-packages "hindsight-client==0.5.0"That has worked well for us. It makes hindsight support reproducible and keeps restarts and rollbacks predictable. From our perspective, the important requirement is:
Why this matters for us:
I do not have a strong opinion on whether the right answer is this PR specifically (it seems to be slightly incomplete?) or some adjacent packaging change, but I do want to confirm that the underlying problem is real and that a solution for build-time inclusion would solve it cleanly for our deployment model. |
|
This looks related to support thread: "Hermes Docker does not contain hindsight pip package" in discord |
599e86e to
cae1928
Compare
|
Ok. I just went ahead and regenerated the |
…sight-optional-dep
…hindsight-optional-dep; regenerated uv.lock
…hindsight-optional-dep
|
@jbotwell Why did this get closed? |
|
@descention , It was waiting for a maintainer review for a long time, and in the meantime they added a |
|
@jbotwell I'd prefer to see it natively supported. I don't like having to manually add additional packages to use built-in features. Your PR addresses that well. |
…hindsight-optional-dep
|
Cool. Should be good to go again? It'll keep getting into conflicts with uv.lock, though. Easy to fix, but heads-up that that divergence is a thing |
|
@alt-glitch can you take a look at this one? Putting Would prefer to keep the |
|
@teknium1 , this is
if that understanding is flawed or there is a different way we're not thinking of, please correct me. If not, it might be that another issue/PR would be useful to allow dependency groups to be declared |
…hindsight-optional-dep
|
Is this PR going to be merged? I'm having this exact issue with the Hermes agent on NixOS. |
|
Hey @jbotwell, @descention, @mrhwick! Thanks for the patience on this one and for pushing on the issue. The discussion here (especially the comment about We've split this into two PRs that solve the problem without polluting 1. #21818 — Adds pip install hermes-agent[hindsight]2. #21817 — This addresses the gap @jbotwell identified — services.hermes-agent.extraDependencyGroups = [ "hindsight" ];This is cleaner than the The two together give every environment a clean path:
Would appreciate your eyes on both if you get a chance — especially @jbotwell since you traced the |
Yeah, took a look at those. No issues jumping out at me. I think the separation makes a lot more sense. Thanks! |
|
Closed in favour of: #21818 |
Expose the dependency-groups parameter from python.nix through
hermes-agent.nix and the NixOS module, allowing users to opt into
pyproject.toml optional extras (e.g. hindsight, voice, matrix) that
are resolved by uv inside the sealed venv.
Unlike extraPythonPackages (which appends to PYTHONPATH and requires
collision checking), extraDependencyGroups resolves the full dependency
graph in a single uv pass — no PYTHONPATH patching, no version
conflicts, no collision risk.
When to use which:
- extraDependencyGroups: enable a pyproject.toml optional extra
- extraPythonPackages: add an external Python plugin not in pyproject.toml
Usage:
services.hermes-agent.extraDependencyGroups = [ "hindsight" ];
Or via overlay:
pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; }
Refs: #8873, #9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
…arch#21817) Expose the dependency-groups parameter from python.nix through hermes-agent.nix and the NixOS module, allowing users to opt into pyproject.toml optional extras (e.g. hindsight, voice, matrix) that are resolved by uv inside the sealed venv. Unlike extraPythonPackages (which appends to PYTHONPATH and requires collision checking), extraDependencyGroups resolves the full dependency graph in a single uv pass — no PYTHONPATH patching, no version conflicts, no collision risk. When to use which: - extraDependencyGroups: enable a pyproject.toml optional extra - extraPythonPackages: add an external Python plugin not in pyproject.toml Usage: services.hermes-agent.extraDependencyGroups = [ "hindsight" ]; Or via overlay: pkgs.hermes-agent.override { extraDependencyGroups = [ "hindsight" ]; } Refs: NousResearch#8873, NousResearch#9194
Title:
fix(deps): add hindsight-client as optional dependencyBody:
What does this PR do?
Adds
hindsight-clientas an optional dependency ([hindsight]extra) so it can be included at build time by package managers that pre-build the venv (NixOS/uv2nix, Docker, Homebrew, etc.Currently the hindsight memory plugin lists
hindsight-client>=0.4.22inplugins/memory/hindsight/plugin.yamlwhich triggers a runtimepip install. This works for standard `pip installRelated Issue
Fixes #8873
Type of Change
Changes Made
pyproject.toml: Addedhindsight = ["hindsight-client>=0.4.22"]optional dependency group, matching the version already required by the pluginpyproject.toml: Addedhermes-agent[hindsight]to theallextrauv.lock: Regenerated — addshindsight-client v0.5.0and its transitive depsHow to Test
uv sync --extra hindsight— verifyhindsight-clientis installeduv sync --extra all— verifyhindsight-clientis includedhermes config set memory.provider hindsight) and start a session — thehindsight_clientimport should resolve without runtime pipTested on NixOS 26.05 with a uv2nix-built venv including the
[hindsight]extra. Hindsight memory provider initializes and works correctly.Checklist
Code
fix(deps):)pytest tests/ -qand all tests passDocumentation & Housekeeping