feat: add Hermes Agent memory provider - #2
Draft
antas-marcin wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛡️ The following SAST misconfigurations have been detected
| NAME | FILE | ||
|---|---|---|---|
| Security Risks of Using the Subprocess Module | ...s/engram/__init__.py | View in code |
antas-marcin
marked this pull request as draft
July 24, 2026 11:44
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.
What
Adds a second integration to the repo: a Hermes Agent memory provider backed by Weaviate Engram, alongside the existing Claude Code plugin (
plugin/, unchanged). First step toward making this repo the home of all Engram integrations (à la mem0'sintegrations/).How it works
Implements Hermes'
MemoryProviderABC (theplugins/memory/<name>/contract):on_turn_start/queue_prefetchrun a backgroundmemories.searchon the current prompt;prefetch()joins it briefly (≤3s) and injects the results as bullet-form context. The agent can also search on demand via tool.sync_turn()ships each completed turn viamemories.addin a daemon thread (never blocks a response), tagged with thesession_idscope property; skipped for non-primary agent contexts (subagent/cron/flush).engram_search(semantic recall) andengram_add(explicit fact storage).on_memory_write()mirrors Hermes' built-inMEMORY.md/USER.mdadd/replacewrites into Engram.removeis intentionally not propagated (Engram is append-only from this provider).user_id→ gateway-native id →git config user.email. Deliberately no shared fallback: a non-unique id would commingle different users' memories.Install
hermes/install.shauto-detects the right target:$HERMES_HOME/plugins/engram/— user-installed providers (surviveshermes update), preferred when the installed Hermes supports it;<checkout>/plugins/memory/engram/— bundled fallback for older versions (--bundledto force,--linkfor development).The provider package (
hermes/engram/) is self-contained — no repo-local imports — so it can be dropped into aNousResearch/hermes-agentPR unchanged.Testing
hermes/tests/) — Hermes ABC,hermes_constants, and the Engram SDK stubbed; the provider is loaded by file path mirroring Hermes' own discovery, so the suite doubles as a drop-in compatibility check..github/workflows/test.yml) — syntax checks + the test suite on Python 3.11/3.12.discover_memory_providers()listsengram, andload_memory_provider("engram")returns the provider with both tools registered.Follow-ups (Phase 2, not in this PR)
NousResearch/hermes-agentcli.py(hermes engram status, …),on_session_end/on_pre_compresshooks