Skip to main content

Standalone Hermes memory-provider plugin scaffold for Metronix

Project description

hermes-memory-metronix

Standalone Hermes MemoryProvider backed by Metronix Memory.

This repository owns the Hermes-native adapter layer:

  • Hermes plugin packaging
  • config and auth resolution
  • prefetch and write-through behavior
  • Hermes-focused unit, integration, and smoke tests

Metronix backend contracts and MCP integration docs remain in the metronix-memory repository.

Status

This is a scaffold, not a finished public plugin release.

What it already does:

  • Implements the Hermes MemoryProvider contract
  • Prefetches relevant Metronix memory records before a turn
  • Mirrors Hermes memory(action="add") writes into Metronix
  • Optionally writes completed turns as session-scoped Metronix memory
  • Supports bearer-token auth, with email/password login fallback

What is intentionally still conservative:

  • No custom Hermes setup wizard yet
  • No extra provider-specific model tools yet
  • Prefetch currently targets /api/v1/memory/search
  • Knowledge-document / page retrieval is left as a follow-up

Layout

The installable Hermes plugin is this repository root. Its provider implementation lives in:

  • plugin/metronix/

Hermes discovers user-installed memory providers from:

  • ~/.hermes/plugins/<name>/__init__.py

Install for Hermes

Install the repository into your Hermes plugin directory:

hermes plugins install mtrnix/hermes-memory-metronix --no-enable

Then set Hermes to use it:

memory:
  provider: metronix

Python distribution

pip install hermes-memory-metronix distributes the adapter for development and Hermes-hosted environments. It does not register the provider with Hermes. For Hermes discovery, install this GitHub plugin with:

hermes plugins install mtrnix/hermes-memory-metronix --no-enable

Plugin config

The plugin reads non-secret config from:

  • $HERMES_HOME/metronix.json

And secrets from:

  • $HERMES_HOME/.env
  • process environment

Example metronix.json:

{
  "base_url": "http://localhost:8000",
  "workspace_id": "MTRNIX",
  "agent_id": "hermes",
  "prefetch": true,
  "prefetch_top_k": 8,
  "prefetch_types": ["fact", "preference", "pinned"],
  "cite_sources": true,
  "write_through": true,
  "write_scope": "workspace",
  "sync_turns": true
}

Secrets:

METRONIX_AUTH_TOKEN=...
# or:
METRONIX_EMAIL=admin@metronix.local
METRONIX_PASSWORD=...

Important:

  • METRONIX_AUTH_TOKEN must be a REST JWT or personal API key for /api/v1/*
  • METRONIX_MCP_API_KEY is for /mcp, not /api/v1/memory/*
  • if you provide both a bearer token and login credentials, the client will retry once with a fresh login JWT when the original bearer gets a 401

Mapping notes

Hermes write scopes map to Metronix scopes like this:

  • per_agent -> per_agent
  • workspace -> global
  • shared -> global
  • session -> session

The current prefetch path uses Metronix memory search, so prefetch_types maps to Metronix memory kinds:

  • fact
  • preference
  • pinned

page is not wired yet because the current scaffold does not call a unified knowledge-search endpoint.

Migrating an existing llm-wiki into Metronix

Hermes's bundled llm-wiki skill maintains a directory of markdown pages (entities/, concepts/, comparisons/, queries/, raw/) at $WIKI_PATH (default ~/wiki). To bulk-ingest an existing wiki into Metronix's Knowledge Base (chunked, embedded, searchable via metronix_search_fast/metronix_get):

python scripts/migrate_wiki.py \
  --wiki-path ~/wiki \
  --base-url http://localhost:8000 \
  --workspace-id MTRNIX \
  --auth-token "$METRONIX_AUTH_TOKEN"

Each page becomes a document with source_type="hermes_llm_wiki" and a deterministic doc_label derived from its wiki-relative path, so re-running the script updates existing documents instead of duplicating them. By default, only raw/, entities/, concepts/, comparisons/, and queries/ are ingested; SCHEMA.md, index.md, log*.md, and _archive/** are skipped (pass --include-archive to include archived pages instead).

Requires METRONIX_AUTH_TOKEN to be a REST JWT or personal API key for /api/v1/*, not METRONIX_MCP_API_KEY, which is for /mcp only.

Development

Run the fast local checks:

uv run --extra dev pytest tests/unit -v
RUN_INTEGRATION_TESTS=1 uv run --extra dev pytest tests/integration/test_live_metronix.py -v

Verify against Hermes

Clone a clean Hermes checkout separately, then verify both the current MemoryProvider abstract base class and Hermes's real plugin loader:

HERMES_AGENT_SRC=/absolute/path/to/hermes-agent \
  uv run --extra dev pytest \
  tests/unit/test_real_abc_contract.py tests/unit/test_hermes_plugin.py -v

The compatibility tests skip with an explicit reason when HERMES_AGENT_SRC does not point to a Hermes checkout. They should pass before publishing a plugin release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_memory_metronix-0.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_memory_metronix-0.1.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file hermes_memory_metronix-0.1.2.tar.gz.

File metadata

  • Download URL: hermes_memory_metronix-0.1.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hermes_memory_metronix-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2af27cbecb858a1de325db22ff2892ae3a5b01ef98a125155167c4c72ef140fc
MD5 7738de9f5efa9816dce00f1d24230351
BLAKE2b-256 e180665792c2efe48e19e95e55fb0bc22375308d76f39f681a5d0bbe4bc6881b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_memory_metronix-0.1.2.tar.gz:

Publisher: pypi-publish.yml on mtrnix/hermes-memory-metronix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermes_memory_metronix-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_memory_metronix-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f92bf6cf378da3d58c066fc8fcaf3efccd08459b0e84f1060be90780196e93ea
MD5 bb6e904e87e0ce9db52d8b24a5adc2d9
BLAKE2b-256 57cf157422e536f89d2b44fceba9923b2d60c47ef0416b2f45e3a20c3ed29a04

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_memory_metronix-0.1.2-py3-none-any.whl:

Publisher: pypi-publish.yml on mtrnix/hermes-memory-metronix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page