All plugins

optmem-hermes

Independent Hermes integration of Victor Taelin's OptMem design: local, append-only memory with regex/BM25 recall and a bounded wake digest. Hybrid and guarded OptMem-only modes; verified migration and rollback. Local by default. Compaction is manual unless auto_nap is enabled. Optional LLM summaries run only when both auto_nap and llm_summary are on; they send memory blocks to the configured provider via host-owned authentication and may incur token costs. Summaries are lossy, raw records remain recoverable, and conflicts are not resolved automatically. Wake consumes model context. See README for upstream attribution. Disclosure — memory is stored locally under HERMES_HOME; optional auto_nap+llm_summary sends stored memory lines to the user's configured model provider; the optmem-only mode (explicit CLI with --yes) disables Hermes' built-in MEMORY.md/USER.md injection after a verified backup.

rarf23Memoryv0.3.3Updated 1 month ago

About

Independent Hermes integration of Victor Taelin's OptMem design: local, append-only memory with regex/BM25 recall and a bounded wake digest. Hybrid and guarded OptMem-only modes; verified migration and rollback. Local by default. Compaction is manual unless auto_nap is enabled. Optional LLM summaries run only when both auto_nap and llm_summary are on; they send memory blocks to the configured provider via host-owned authentication and may incur token costs. Summaries are lossy, raw records remain recoverable, and conflicts are not resolved automatically. Wake consumes model context. See README for upstream attribution. Disclosure — memory is stored locally under HERMES_HOME; optional auto_nap+llm_summary sends stored memory lines to the user's configured model provider; the optmem-only mode (explicit CLI with --yes) disables Hermes' built-in MEMORY.md/USER.md injection after a verified backup.

OptMem for Hermes

Victor Taelin's original OptMem animation

Original design animation by Victor Taelin. This is an independent Hermes integration, not the upstream project.

Local memory that keeps the history and limits what enters your context.
Store durable facts, search them with regex/BM25, and zoom from summaries back to original records. No API key or LLM call is needed by the memory engine.

Install

If optmem-hermes is listed in your Hermes catalog, install it with:

hermes plugins install optmem-hermes

If it is not listed in your catalog, install a published release into the Python environment used by Hermes:

pip install "git+https://github.com/rarf/optmem-hermes-plugin@v0.3.3"

Select the provider in your profile's config.yaml, then restart that profile's Hermes process:

memory:
  provider: optmem-hermes
hermes optmem-hermes status --json

Choose your mode

  • Hybrid (default): OptMem runs alongside native MEMORY.md / USER.md.
  • OptMem-only: replaces native memory injection after verified migration and backup.

To switch safely, inspect the migration plan first:

hermes optmem-hermes migrate --dry-run --json
hermes optmem-hermes migrate --split --json
hermes optmem-hermes check --json
hermes optmem-hermes mode optmem-only --yes --json

Native files are preserved. check is read-only and exits 1 until replacement readiness is satisfied. Use --hermes-home PATH to target one profile explicitly.

To undo the last mode switch without deleting OptMem data:

hermes optmem-hermes rollback --json

Good to know

  • Raw records are append-only. Summaries are lossy, but original details remain recoverable.
  • Later notes do not automatically supersede earlier ones: no semantic conflict resolution.
  • The wake digest is bounded but consumes model context.
  • forget removes summaries, not raw records.
  • Manual merges by default. Compaction happens only when the agent runs the
    requested optmem_nap ("nothing runs in the background"), matching upstream.
    auto_nap enables automatic compaction every ~10 turns; it is off by default.
  • Upgrading an older installation: change memory.provider: optmem to optmem-hermes only in the selected profile. Data paths stay unchanged; the CLI becomes hermes optmem-hermes.

Optional LLM summaries

Enable both auto_nap and llm_summary in
<HERMES_HOME>/optmem/config.json to summarize through the host's
optmem_summary auxiliary task. Both default to false; with either off there
is no summary egress or token cost. Enabling both sends memory blocks to the
selected provider and may incur costs. Failures fall back to the local
extractor; raw records remain. See
configuration and LLM routing.

More

Configuration, tools and technical reference · Catalog submission checklist · MIT license

The upstream animation is linked, not copied or rehosted. Upstream ships no LICENSE file; this repository's MIT license does not cover its media. No affiliation or endorsement is implied.

README from the reviewed commit 2868af6; it updates when the author re-pins.

More by rarf

2 plugins by rarf in the catalog.

rarfquotaPer-provider quota / rate-limit status via /quota command and desktop widget. Reads precomputed quota_cache.json so the widget never does network I/O. Disclosure — refreshes your Gemini OAuth token using the Gemini CLI's public client identity, in memory only; queries Copilot's internal usage endpoint with VS Code client headers and Anthropic's OAuth usage endpoint using the hermes-quota-plugin User-Agent, caching Anthropic usage responses and rate-limit cooldowns in the Hermes root directory keyed by a token hash so profiles sharing one Claude login share them; optional additional Claude accounts read access tokens only from explicitly configured Claude Code credentials files and send them only to Anthropic's fixed OAuth usage endpoint (read-only, no refresh-token exchange or credential write-back; tokens and paths excluded from the quota cache). Linux extra accounts verified; Windows experimental, extra macOS Keychain accounts unsupported. The openai-codex check reads every saved Codex account from Hermes' own auth.json credential pool (read-only, never refreshed; expired accounts show reauth-required) and queries the Codex usage endpoint with the codex-cli User-Agent; when a Codex account is configured, each refresh also fetches public Codex reset announcements from the third-party site codex-resets.com (anonymous request, no credentials sent); the opencode-go check reads the OpenCode CLI's local auth.json, Hermes' auth.json pool and OPENCODE_GO_API_KEY_N variables (read-only). The cursor check reads the Cursor CLI token from the macOS Keychain or Cursor's auth.json (read-only, never refreshed or rewritten; on expiry it asks you to run cursor-agent login) and queries api2.cursor.sh; the opt-in (default off) antigravity check reads Antigravity's OAuth token from Windows Credential Manager, the macOS Keychain or ~/.gemini/antigravity-cli (read-only), refreshes it in memory with Antigravity's public client identity and sends Antigravity's User-Agent to Google's cloudcode endpoint; the opt-in (default off) grok.com check first sends Hermes' own xai-oauth access token (read via Hermes or from auth.json, read-only) to grok.com's billing endpoint with a browser User-Agent, and on an authentication failure falls back to local browser cookies, using secret-tool on Linux, the macOS Keychain or Windows DPAPI for the browser's cookie key and decrypting only grok.com cookies from a temporary copy of the cookie DB; the commandcode check reads ~/.commandcode/auth.json (read-only) or every saved commandcode credential in Hermes' credential store and uses the Command Code CLI's User-Agent; zai, kimi, minimax, deepseek, openrouter, ollama (which may read OLLAMA_API_KEY from ~/.hermes/.env and calls ollama.com/api/usage, /api/balance and /api/me) and experientiallabs send keys from Hermes' credential store or env only to their own vendor's usage or balance endpoints. The opt-in (default off) Agent Monitor reads this profile's Hermes session database and the local process list to show running sessions, spend estimates and model health, locally only.CommunityDesktop app93