Skip to main content

Vity Memory for Hermes Agent

Vity by Maximem AI provides persistent, cross-session semantic memory for Hermes Agent, distributed as a standalone plugin.

Vity gives the agent a long-term memory graph covering facts, preferences, episodes, knowledge, and profile. It recalls relevant context before each turn and captures the conversation after each turn, so the agent remembers users and projects across sessions.

Built on the maximem-vity-sdk Python client (0.3.1 or newer).

Install

First, get an API key at app.maximem.ai/api-keys. It starts with mx_. Then:

pip install hermes-maximem-vity
hermes-maximem-vity install

hermes-maximem-vity install does everything in one step:

  1. Copies the plugin into ~/.hermes/plugins/maximem_vity/, where Hermes discovers it.
  2. Prompts for your API key and saves it to ~/.hermes/.env without duplicates.
  3. Activates the provider by setting memory.provider: maximem_vity.

It prints a confirmation when finished. Start the agent with hermes.

If Hermes or the gateway was already running during install, restart it to load the newly activated provider. Gateway users run hermes gateway restart.

For non-interactive or scripted installs, pass the key as a flag to skip the prompt:

hermes-maximem-vity install --api-key mx_your_key
Hitting a PEP 668 "externally-managed-environment" or "pip: command not found" error?

System Python (for example Homebrew) blocks global pip install. Use pipx (recommended) or a virtual environment:

pipx install hermes-maximem-vity        # install pipx first if needed: brew install pipx
hermes-maximem-vity install

You do not need to match Python versions. The maximem-vity-sdk dependency is installed into the Hermes environment automatically.

Verify

hermes-maximem-vity status   # plugin installed, SDK available to Hermes
hermes memory status         # shows maximem_vity as active
hermes maximem_vity status   # API key set, SDK installed, connection ok

Update

pip install -U hermes-maximem-vity
hermes-maximem-vity install

Re-running install is required: it refreshes the plugin files Hermes loads and upgrades maximem-vity-sdk in the Hermes environment if needed. Your API key and vity.json settings are kept. Restart Hermes afterwards.

Remove

hermes-maximem-vity uninstall

Troubleshooting

hermes maximem_vity status still reports maximem-vity-sdk not installed, even after pip install.

Hermes runs inside its own isolated environment, which is usually not the Python that ran pip install (such as Anaconda or system Python). The SDK must live in the Hermes environment, and hermes-maximem-vity install puts it there. Re-run it:

hermes-maximem-vity install
hermes-maximem-vity status     # confirm the SDK is available to Hermes

Windows: hermes-maximem-vity is not recognized as a command.

pip install --user on Windows places the console script in a Scripts folder that may not be on PATH. Add it for the session in PowerShell, then run install:

$env:Path += ";$(python -m site --user-base)\Python$($(python -c 'import sys;print(f"{sys.version_info.major}{sys.version_info.minor}")'))\Scripts"
hermes-maximem-vity install

Alternatively, call it by full path once: & "$(python -m site --user-base)\Python313\Scripts\hermes-maximem-vity.exe" install. To make it permanent, add that Scripts folder to your user PATH in Environment Variables.

Configuration

API key (secret, stored in ~/.hermes/.env):

Env var Required Description
MAXIMEM_API_KEY Yes Your Maximem API key (mx_...). VITY_API_KEY is also accepted.

The API key defines the memory space. Use a separate key for each account that needs isolated memories.

Re-running the installer keeps the existing key. To replace it, pass the new key explicitly; it overwrites the old entry:

hermes-maximem-vity install --api-key mx_your_new_key

You can also edit ~/.hermes/.env directly, then restart Hermes (gateway users run hermes gateway restart).

Tunables (optional, non-secret, stored in $HERMES_HOME/vity.json, created on install):

Key Default Description
auto_recall true Inject relevant memories before each turn.
auto_capture true Capture the conversation after each turn.
max_recall_tokens 1000 Size cap for the injected recall context.
min_prompt_length 5 Skip recall for very short prompts.
recall_timeout 6.0 Maximum seconds for a single pre-turn recall request.
recall_deadline 3.0 Maximum total seconds pre-turn recall may take before the turn proceeds without memory.
recall_min_score 0.3 Minimum relevance for an auto-injected memory.
profile_warmup true Inject the user's Profile Card once at the start of each session.

For a self-hosted backend, set MAXIMEM_ENDPOINT, or endpoint in vity.json, to a non-default Maximem API URL.

Usage telemetry

The plugin sends anonymous usage events (install, session start, recall latency and hit/miss, tool name and latency, capture outcome) to the Maximem API, authenticated with your API key. Events never include prompts, queries, responses or memory content. To turn this off, set MAXIMEM_ANALYTICS=0 in ~/.hermes/.env.

How it works

  • Recall before each turn. A semantic search runs against the current message. If it completes within recall_deadline (default 3 seconds), the matches are injected as context; otherwise the turn proceeds with no memory rather than waiting. Only matches above recall_min_score are injected, so weak matches are not presented as fact. Each memory is labelled with its age and relevance, for example [3d ago · 82%], so the agent can tell stale facts from fresh ones. Hermes shows a "recalled N memories" line on every platform when memory is used.
  • Follow-up resolution. A short follow-up such as "why?" or "tell me more" has no subject of its own to search on. The plugin detects these and prepends the last substantial message, so the search still finds the right memories. Self-contained messages are searched verbatim, so a clean topic change is never diluted.
  • Profile at session start. When profile_warmup is on, the user's Profile Card (name, role and company, location, education, expertise, skills, interests, active goals and preferences) is loaded off-turn and injected once at the start of a session as background context. Only confident, current values are included; the email address and speculative values never are. The card is built automatically from the user's memories, so a brand-new user gets no profile block until theirs exists. It is cached across sessions for an hour.
  • Capture after each turn. The user and assistant exchange is saved to long-term memory in the background. Hermes' own system notices (for example context-compaction summaries) are not saved as if the user said them.
  • Memory mirroring. When the Hermes built-in memory tool adds a fact, it is also stored in Vity. When it replaces or removes one, the old copy in Vity is removed too, but only if it matches exactly; anything less certain is left alone rather than risk deleting the wrong memory.
  • Long sessions. After Hermes compresses a long conversation, the Profile Card is injected again so it is not lost in the summary.

Recall runs on the pre-turn path but is bounded by recall_deadline, so a slow or unhealthy backend degrades to no memory for that turn instead of hanging. After three failed recalls in a row, auto-recall pauses for a minute so an outage does not slow every turn. If the API key is rejected or the account runs out of credits, the agent is told once that memory is unavailable, instead of acting as if it knows nothing about you.

All writes (captured turns and mirrored facts) go through one queue, in order, and never block the reply. A write that still fails after a retry, or is still queued when Hermes exits, is kept in $HERMES_HOME/vity_pending_writes.jsonl (owner-only permissions, at most 200 entries) and delivered on the next start.

Agent tools

The plugin exposes these tools to the agent:

Tool Parameters Purpose
vity_recall query (required), top_k (default 10, max 50) Retrieve specific stored memories.
vity_knowledge query (required), limit (default 10, max 100) Retrieve consolidated, topic-level knowledge.
vity_profile none Retrieve the user's Profile Card: who the user is, at a glance.
vity_store content (required), memory_type (fact, preference, emotion, episode, knowledge, profile) Save a new memory.
vity_forget query (required), dry_run (default true) Delete matching memories, previewing first.
vity_meeting_recall question (required), meeting_type, status Answer questions about meetings, decisions and attendees. Requires Meeting Memory on the account; otherwise it says so.

vity_recall and vity_knowledge are complementary: use recall for a specific fact the user stated, and knowledge for what the user broadly knows about a topic.

In chat this is transparent. Ask the agent to "remember that ..." and it calls vity_store; ask "what do you know about ..." and it calls vity_recall or vity_knowledge. No special commands are required.

CLI

Manage memory directly from the terminal:

hermes maximem_vity status                          # config and live connection check
hermes maximem_vity search "favorite color"         # semantic search
hermes maximem_vity search "deadlines" --limit 20 --json
hermes maximem_vity store "I prefer dark mode" --type preference
hermes maximem_vity forget "old project"            # dry run (preview)
hermes maximem_vity forget "old project" --yes      # confirm deletion

To reactivate the provider, run hermes config set memory.provider maximem_vity. Prefer this to the provider selection in the interactive hermes memory setup wizard, where buffered or pasted terminal input can drop the selection and leave the provider unset.

Development

pip install -e ".[dev]"
pytest -q

Tests stub the Hermes host modules (agent.memory_provider, tools.registry, hermes_constants, utils) so they run without a full Hermes checkout. See tests/conftest.py.

Layout

Path Purpose
src/hermes_maximem_vity/installer.py The hermes-maximem-vity console command (install, uninstall, status).
src/hermes_maximem_vity/payload/provider.py VityMemoryProvider and register(), copied to ~/.hermes/plugins/maximem_vity/__init__.py on install.
src/hermes_maximem_vity/payload/cli.py The hermes maximem_vity ... subcommands.
src/hermes_maximem_vity/payload/analytics.py Usage telemetry (see Usage telemetry).
src/hermes_maximem_vity/payload/vity_support.py Stateless helpers: Profile Card rendering, recall labels, fact matching, the pending-writes file.
src/hermes_maximem_vity/payload/plugin.yaml Plugin manifest (dependencies, required env).
src/hermes_maximem_vity/payload/vity.json.example Tunables template, seeded to vity.json on install.
tests/ Unit tests and host-module stubs.

License

MIT. See LICENSE.

Support

Metadata

Release files for hermes-maximem-vity 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermes-maximem-vity 1.4.0
File Size Uploaded Provenance Actions
hermes_maximem_vity-1.4.0.tar.gz 68.2 kB Without provenance Details for hermes_maximem_vity-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hermes-maximem-vity 1.4.0
File Interpreter ABI Platform Actions
hermes_maximem_vity-1.4.0-py3-none-any.whl Python 3 none any Details for hermes_maximem_vity-1.4.0-py3-none-any.whl

Total release size: 114.8 kB

Release files / hermes_maximem_vity-1.4.0.tar.gz

Download URL hermes_maximem_vity-1.4.0.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4172f64dd5c4ec4dc6eb8fc3751c5f1b66acfc75ec547a1751c03acee7e417ab
BLAKE2b-256 checksum
How to use checksums
17011f07ffb406bfc7a8af7f186beda35d5d22285511e58cedb6f9bf9596fbc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / hermes_maximem_vity-1.4.0-py3-none-any.whl

Download URL hermes_maximem_vity-1.4.0-py3-none-any.whl
Size 46.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03c8e566a6d108b1ffa4930dfb0ff5aad167b74ffef442eee92c99402d7742a1
BLAKE2b-256 checksum
How to use checksums
2a286d12a004263a02310a66a79f713b314d83961d58011d8020a10c8a0f033b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for hermes-maximem-vity 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page