Skip to content

Add an experimental native Hermes memory provider - #940

Merged
zlareb1 merged 6 commits into
mainfrom
feat/hermes-memory-provider
Nov 19, 2026
Merged

zlareb1 merged 6 commits into
mainfrom
feat/hermes-memory-provider

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

Changelog entry

Add an experimental native memory provider for Hermes with model-selected Loom recall, point reads and fact writes. Automatic turn and transcript synchronization stay off.

Why

Hermes's native memory-provider API accepts separate plugins. An MCP server connection does not register a memory provider. This adapter supplies native tool schemas and dispatch through the released Loom memory HTTP operations, without patching Hermes core or adding Python dependencies.

Scope and risk

The adapter fixes the server, token, organization, namespace, named user and writer agent per profile. Search reads only that user's private facts in one namespace, across writer agents and sessions, with recall-credit writes disabled. Point facts use a stable session identity. Revision writes can carry a content-hash precondition.

The model can select the write tool. There is no automatic prefetch, transcript capture, turn synchronization, built-in-memory mirroring or code-index integration. Single-user profiles are required. Non-primary agent contexts cannot write. No Loom server behavior or identity invariant changes.

The client uses Hermes's public credential-aware HTTP helper, refuses redirected responses, caps responses and does not retry. It returns the full successful receipt and preserves uncertainty after a failed write response. It does not declare session protection; deployments requiring that contract refuse it. A mirrored-source result blocks subsequent writes for the provider instance.

Compatibility, rollout and rollback

  • Wire: use existing Loom 1.2.0 memory.search, memory.get and memory.set fields. No operation, field or default changes. The server derives the actor; writes request the permitted derived source class.
  • Operator steps: this is an experimental source plugin targeting Hermes 0.23.2 public APIs. Install in one user profile and configure a namespace-scoped reader or writer token. Live Loom write/read qualification is pending. No catalog listing or published package is claimed.
  • Rollback: disable/remove the provider. Facts explicitly written through Loom remain in the configured namespace; reverting this adapter does not delete them.

Tests

  • Seventeen offline behavior tests pass, covering fixed identity, receipts, hash preconditions, no automatic capture, argument limits, profile mismatch, HTTP refusals, uncertain writes, response limits, redirects, mirrored-source refusal, subagent writes and URL policy. Regression cases confirm that truncated successful responses return JSON errors, while unreadable HTTP error bodies retain the known status and write uncertainty.
  • Ruff check passes on the adapter and its tests.
  • Ruff format-check, Prettier 3.9.9 checks on the affected Markdown/YAML, and the prose checker pass. Prettier only aligns the integration-map and provider README tables.
  • Hermes native admission passes all 15 checks with no warnings, including isolated registration and host readiness.
  • The normal native loader loads the real MemoryProvider subclass, initializes it with dummy configuration in an isolated single-profile process, exposes all three tool schemas and runs no-op lifecycle hooks. An audit hook refuses network connections and resolution throughout that check; no Loom operation runs. This does not qualify a multiplexed gateway.
  • Native checks use the full Hermes release 0.23.2, commit ae2a81ccc00e9b7c06301523e5bb09608397149c, on Linux AArch64 with Python 3.14.7. The normal loader and isolated admission import the pinned released source; HTTP behavior tests use doubles. No live Loom operation, provider model or benchmark was called.
  • Full repository checks remain for CI; only the affected source and contracts were checked locally.
  • The new integration-map link resolves to the source README. Full documentation-site and repository-wide checks remain for CI. Earlier canonical gate refusals were respected; checks resumed only after disk and memory actually recovered.
  • The repository's public-copy predicates pass on the seven changed files; the repository-wide scan remains for CI.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the adapter and checked the released wire models, native public API contracts and focused test results.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed. Full repository checks are deferred to CI.
  • No generated files, migrations, frontend files or existing Claude Code/Codex plugin files change.
  • The README states setup, data flow, write controls, native qualification and live-test limits.
  • No server invariant changes require an architecture-page update.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

Native registration and offline memory contracts pass. Live server qualification and final prose checks remain pending.

Signed-off-by: zlareb1 <[email protected]>
Keep the known HTTP refusal when its diagnostic body cannot be read, and report uncertain writes when a successful response truncates.

Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit fe3cd6e into main Nov 19, 2026
57 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 19, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant