neuralmind.uk / NeuralMind v4.9.0 — Hermes-Agent gets NeuralMind’s context in every turn, without a tool call Edit this page on GitHub ↗

NeuralMind v4.9.0 — Hermes-Agent gets NeuralMind’s context in every turn, without a tool call

Type: Minor release Theme: Hermes-Agent integration

v4.8.0 gave Claude Code a session recap: a new session starts with where the last one left off. Claude Code already got NeuralMind’s related files with every prompt, through its hooks. Hermes-Agent got neither unless the agent decided to call a tool. v4.9.0 adds a Hermes plugin that gives Hermes both, before the model runs, with no tool call.

NeuralMind for Hermes-Agent

On Hermes, NeuralMind was something the agent had to decide to use: an MCP server, or a skill that runs the CLI. Each answer cost a tool call, and when the agent didn’t think to call it, nothing happened. v4.9.0 adds a Hermes plugin that puts NeuralMind’s context into every turn before the model runs, the way the hooks already do in Claude Code.

neuralmind build /path/to/project
neuralmind install-hermes-plugin /path/to/project

The command writes the plugin into the Hermes home’s plugins/neuralmind/: the one --hermes-home names, else the one plain hermes uses: the active Hermes profile’s, if hermes profile use selected one (<root>/profiles/<name>), else $HERMES_HOME, else Hermes’s default ~/.hermes (on Windows, %LOCALAPPDATA%\hermes). When that’s a profile, the output names it. The command then runs hermes plugins enable neuralmind in that same home, but only in a home Hermes has already set up (one with a config.yaml, .env or state.db); anywhere else it tells you to enable the plugin once Hermes is set up. Start a new Hermes session, or restart the gateway, to load it.

How it works: the plugin is a small stdlib-only file. Each action runs python -m neuralmind _hook <action> with the payload Claude Code would send, using the Python interpreter that ran the install. Hermes gets the same behavior and the same switches (NEURALMIND_BYPASS, NEURALMIND_SYNAPSE_INJECT, NEURALMIND_SESSION_RECAP …), and NeuralMind doesn’t have to be installed in Hermes’s own environment. The subprocess runs from the plugin’s own directory with PYTHONSAFEPATH=1, so a repository you work in can’t put its own neuralmind module ahead of the installed one.

Which project a Hermes session belongs to:

  1. NEURALMIND_PROJECT, if set;
  2. else the path given to install-hermes-plugin;
  3. else Hermes’s terminal working directory (TERMINAL_CWD);
  4. else, only when TERMINAL_CWD isn’t set, the directory Hermes runs in.

The first of these that has been built wins; if none has, the plugin does nothing. TERMINAL_CWD is read from the Hermes process’s environment, so a cd the agent runs later in a session doesn’t change the project. That’s the directory the terminal CLI and a standalone gateway work in. A gateway session (Telegram, Discord …) uses the gateway’s terminal working directory (terminal.cwd, else MESSAGING_CWD, else your home directory), which is rarely the project you mean, so pin one at install or set NEURALMIND_PROJECT. Hermes Desktop, ACP editor sessions and per-session workspaces keep each session’s directory elsewhere, not in TERMINAL_CWD, so with those, too, pin a project or set NEURALMIND_PROJECT. Whenever a gateway session resolves to a built project, pinned or not, every message in it is recorded for the recap, redacted like any other prompt; NEURALMIND_SESSION_RECAP=0 turns that off.

A pin applies to every Hermes session that uses that Hermes home, whatever directory it runs in: each one gets the pinned project’s context, and its prompts are recorded in that project. A session in another repository also puts the paths of the files it edits into the pinned project’s synapse store, from where neuralmind memory publish can carry them into the committed team-memory bundle. If you use Hermes across several projects, install without a path (or with --unpin, if you pinned one before), so the plugin follows the directory Hermes works in (in the terminal CLI and a standalone gateway, as above) and does nothing in a repository NeuralMind hasn’t built. Re-running the install without a path keeps an earlier pin; --unpin clears it.

Limits:

neuralmind install-hermes-plugin --uninstall disables it in that same home and removes it. If plugins/neuralmind is a symlink, it removes the link, never what it points to; the install refuses to write through one.

Also in this release

Per-agent expectations

Agent What changes
Hermes-Agent (a built project, with neuralmind install-hermes-plugin) Every turn gets NeuralMind’s related files and decisions, and a session’s first turn starts with the recap. Subagent and cron turns are skipped.
Claude Code Nothing new: its hooks already do this. Hermes and Claude Code share .neuralmind/recaps/, so each can start with what the other did.
Cursor / Cline / generic MCP clients Nothing. These hosts run neither Claude Code hooks nor Hermes plugins.
Other agents with a shell Nothing automatic. An agent that can run commands can call neuralmind recap to read what the last session in the project did.

Settings

Variable Default Effect
NEURALMIND_PROJECT unset Hermes plugin: the project to serve, ahead of the one given at install
NEURALMIND_HERMES_TIMEOUT 8 Hermes plugin: seconds each call to NeuralMind may wait (a session’s first turn makes two); a call that times out is left out and the turn goes ahead. Keep twice this below Hermes’s plugins.hook_callback_timeout (default 30), or Hermes drops the whole block

The plugin runs the same hook actions as Claude Code’s hooks, so their switches apply to it too: NEURALMIND_BYPASS, NEURALMIND_SYNAPSE_INJECT, NEURALMIND_SESSION_RECAP, NEURALMIND_NO_LEARN and the rest.

Upgrading

pip install -U neuralmind, then run neuralmind install-hermes-plugin [path] once. The installed plugin is a copy, so run it again after later upgrades; a re-run keeps an earlier pin and leaves a plugin you disabled disabled.