Skip to content

ReMe memory provider for Hermes Agent ​

中文说明

Hermes connects to an independent ReMe service over HTTP. The provider calls search before each model call and queues completed turns for auto_memory to record in the service workspace.

text
new Hermes turn
  └─ ReMe prefetch → search → protected memory context → model call

completed user/assistant turn
  └─ FIFO writer → auto_memory → workspace daily Markdown

Unlike the DSH adapter, this provider does not add a model-visible search tool. Hermes calls prefetch() automatically before every relevant model call and adds the returned evidence to its protected memory context.

Requirements ​

  • Python 3.11 or newer.
  • Hermes Agent 0.21 or newer.
  • A ReMe configuration with health_check, search, and auto_memory jobs.
  • A working ReMe model configuration for auto_memory; BM25 recall itself does not require an embedding model.

Start the ReMe service ​

The Hermes plugin uses the Python standard library. Install ReMe in its own environment.

Create and activate a dedicated ReMe environment (on Windows, use .venv-reme\Scripts\Activate.ps1 instead of the activation command):

bash
python -m venv .venv-reme
source .venv-reme/bin/activate
python -m pip install "reme-ai[core]"

Start the service and workspace in this environment. Keep this terminal running and launch Hermes from its own environment in another terminal:

bash
reme start config=default \
  workspace_dir="$HOME/.reme-hermes-default" \
  service.backend=http \
  service.host=127.0.0.1 \
  service.port=3456

Install and configure ​

Hermes can install the plugin directly from this repository subdirectory:

bash
hermes plugins install agentscope-ai/ReMe/integrations/hermes_agent
hermes memory setup

Hermes releases whose plugin catalog includes ReMe also accept the shorter hermes plugins install reme form.

For development from local ReMe and Hermes checkouts, either copy the integration into the active profile or link it as a project-local plugin. The link keeps Hermes on the exact ReMe source being edited:

bash
mkdir -p "$HERMES_HOME/plugins/reme"
cp -R /path/to/ReMe/integrations/hermes_agent/. "$HERMES_HOME/plugins/reme/"
hermes plugins enable reme
hermes config set memory.provider reme
bash
cd /path/to/hermes-agent
mkdir -p .hermes/plugins
ln -s /path/to/ReMe/integrations/hermes_agent .hermes/plugins/reme
export HERMES_ENABLE_PROJECT_PLUGINS=1
hermes config set memory.provider reme

.hermes/ is Hermes runtime state and is ignored by the Hermes repository. Do not commit the link, profile configuration, conversations, or generated memory.

Verify discovery before starting a conversation:

bash
hermes plugins doctor /path/to/ReMe/integrations/hermes_agent --ci
hermes memory status

In the Hermes Dashboard, open Plugins → Runtime provider plugins → Memory provider → reme to set the endpoint, recall limit, and timeouts. Hermes stores these settings in $HERMES_HOME/reme/config.json for each profile.

Use this configuration in Hermes:

json
{
  "endpoint": "http://127.0.0.1:3456"
}

The setup wizard checks health_check before saving. For a token-protected ReMe service, set endpoint to a trusted proxy that supplies X-ReMe-API-Token to ReMe.

To migrate an in-process profile, start ReMe with config=<previous reme_config> and its existing workspace_dir, then run hermes memory setup and enter the service URL. For manual setup, replace mode, workspace_dir, and reme_config with endpoint in $HERMES_HOME/reme/config.json. If you used $HERMES_HOME/reme.json, move the settings you need to the current file and archive the old file.

Full configuration ​

json
{
  "endpoint": "http://127.0.0.1:2333",
  "request_timeout": 600.0,
  "recall_timeout": 5.0,
  "health_timeout": 2.0,
  "health_retry_seconds": 30.0,
  "shutdown_timeout": 30.0,
  "recall_limit": 5
}
FieldDefaultMeaning
endpointhttp://127.0.0.1:2333Absolute HTTP(S) service URL; credentials, query strings, and fragments are rejected.
recall_limit5Maximum number of search results requested before a model call.
recall_timeout5Maximum foreground recall time in seconds.
request_timeout600auto_memory write timeout in seconds.
health_timeout2Health-probe timeout in seconds.
health_retry_seconds30Cooldown before retrying an unavailable backend.
shutdown_timeout30Time in seconds to drain queued writes at shutdown.

All numeric values must be finite and positive.

ReMe search covers an entire workspace. Give each Hermes profile a different workspace unless cross-profile recall is intentional. HTTP profiles normally use different ports as well.

Lifecycle and failure behavior ​

  • prefetch returns only ReMe's answer; Hermes adds the protected <memory-context> wrapper.
  • Successful recall exposes a Hermes recall indicator using ReMe's returned result count when available.
  • sync_turn sends only the latest completed turn and uses a filename-safe ID derived from both the Hermes profile and session.
  • Cron, flush, and subagent contexts do not record conversational memory.
  • Health, recall, and write cooldowns are independent. Backend failures log a warning and do not fail the main Hermes conversation.
  • The writer is FIFO and in-memory. A process crash can lose queued turns.

Run hermes memory status after installation, then start a new Hermes session.

Verified end-to-end behavior ​

The screenshots below were captured with Computer Use from real English Hermes 0.21.1 and ReMe Studio 0.4.1.11 interfaces. During development, focused compatibility checks were run with Hermes 0.21.0 and the then-current main using the real provider contract and plugin loader; the plugin validator was also run against that main. These checks are not part of ReMe CI. The conversations used an OpenAI-compatible model endpoint. The HTTP test used an isolated temporary Hermes profile and ReMe workspace. The first session recorded a synthetic fact through auto_memory; a fresh session then recovered it through automatic prefetch. No API keys, .env contents, browser chrome, or personal memories appear in the images.

Reproduce the verification ​

Run the focused compatibility suite against the Hermes checkout, then validate the plugin through Hermes' real loader:

bash
cd /path/to/ReMe
PYTHONPATH=/path/to/hermes-agent \
  pytest tests/unit/test_hermes_agent_integration.py -v

cd /path/to/hermes-agent
hermes plugins doctor /path/to/ReMe/integrations/hermes_agent --ci
hermes memory status

For a live model test, start ReMe on 3456, select that endpoint in the ReMe provider settings, and use two new Hermes sessions: the first asks Hermes to remember a synthetic fact and the second asks for it back. When an existing ReMe .env uses LLM_* names, map them only in the process environment used for verification:

bash
set -a
source /path/to/ReMe/.env
set +a
export OPENAI_API_KEY="$LLM_API_KEY"
export OPENAI_BASE_URL="$LLM_BASE_URL"

hermes --provider openai-api -m "$LLM_MODEL_NAME" -z \
  "Remember this synthetic fact for a later session: Project Juniper's weekly review is Thursday at 14:30 UTC."
hermes --provider openai-api -m "$LLM_MODEL_NAME" -z \
  "From long-term memory, when is Project Juniper's weekly review?"

unset OPENAI_API_KEY OPENAI_BASE_URL

The second command must run without --resume. Confirm that a new Markdown note exists under the selected ReMe workspace's daily/ directory; do not use the ReMe repository's .reme/ directory for this check. Never print the loaded variables or save the mapped credentials in Hermes configuration.

Two independent Hermes sessions ​

The write session and fresh recall session in the Hermes session overview

HTTP mode recall ​

A fresh Hermes session recalls the HTTP-mode verification fact from ReMe

File-native durable result ​

The generated Project Juniper Markdown in the English ReMe Studio interface

Troubleshooting ​

hermes memory status shows built-in memory only ​

Enable the plugin and select it explicitly, then start a new session:

bash
hermes plugins enable reme
hermes config set memory.provider reme
hermes memory status

HTTP mode is unavailable ​

  • Confirm reme start is still running and its port matches endpoint.
  • Call POST http://127.0.0.1:3456/health_check and inspect ReMe service logs.
  • In containers or on another host, remember that 127.0.0.1 refers to the Hermes machine; use a trusted tunnel or authenticated proxy.

Recall works but completed turns are not written ​

  • cron, flush, and subagent contexts intentionally skip writes.
  • Wait for the asynchronous writer before inspecting daily/.
  • Check Hermes and ReMe logs for an auto_memory error or cooldown warning.
  • The current FIFO queue is in memory; an abrupt process exit may lose pending writes.

Recall returns no useful context ​

  • Confirm the expected Markdown exists under the configured workspace's daily/ or digest/ directory.
  • Use a focused prompt and increase recall_limit only when necessary.
  • Rebuild derived ReMe indexes from workspace files; never rewrite source memory merely to repair an index.

Released under the Apache-2.0 License.