Skip to main content

hermes-brain-memory

Brain Memory provider for Hermes Agent — one local-first memory shared across all your AI agents. The same human-readable Markdown store in ~/.brain/ is read and written by Claude Code, Codex, OpenCode, and OpenClaw, so Hermes remembers what your other agents learned — and vice versa.

Memories are plain Markdown files with YAML frontmatter (greppable, diffable, editable). They decay over time, strengthen with use (spaced reinforcement), and connect through an associative network with spreading activation. The model decides what to remember via explicit tools; the brain CLI scores recall deterministically.

Zero pip dependencies — this package and the provider it installs are Python stdlib only.

Install

# 1. The brain CLI (once, if you don't already use Brain Memory)
npm install -g brain-memory

# 2. This package + the provider
pip install hermes-brain-memory       # or: uv tool install / pipx install hermes-brain-memory
hermes-brain-memory install           # copies the provider into $HERMES_HOME/plugins/brain

Activate

hermes config set memory.provider brain
hermes memory setup        # optional guided configuration
hermes memory status       # verify: "brain" should show as installed & available

Or set it directly in $HERMES_HOME/config.yaml (usually ~/.hermes/config.yaml):

memory:
  provider: brain

Only one external memory provider can be active at a time; Hermes' built-in MEMORY.md/USER.md memory keeps running alongside.

What it does

Lifecycle Behavior
Session start Injects a budget-bounded context block from brain session-start: status line, pinned facts, procedural-skills index, relevant memory titles, memorize guidance
Pre-turn Prefetches relevant memories for the user's message (background thread, non-blocking)
Tools brain_recall (deterministic recall + full bodies + auto-reinforce), brain_memorize (validated store), brain_reinforce (spaced reinforcement by ID)
Pre-compression Reminds the model to store un-memorized notable content before context is discarded
Session end Appends a session entry to ~/.brain/contexts.json (last 20 kept)
Built-in memory writes Mirrors MEMORY.md entries into ~/.brain as content-hash-deduplicated observations
Backup ~/.brain is declared via backup_paths() so hermes backup captures it

No transcript dumping: sync_turn does lightweight in-memory topic tracking only. Nothing leaves the machine unless you enable Brain's own sync (Brain Cloud or a private Git remote).

Installer commands

hermes-brain-memory install [--force]   # copy/update the provider (idempotent; --force overwrites)
hermes-brain-memory uninstall           # remove it ($HERMES_HOME/plugins/brain only — ~/.brain is untouched)
hermes-brain-memory status              # install state, brain CLI, active memory.provider

HERMES_HOME (or --hermes-home PATH) selects the Hermes profile to install into; default ~/.hermes.

Configuration

Stored in $HERMES_HOME/brain.json (written by hermes memory setup); environment variables override.

Key Default Env var Description
project hermes BRAIN_PROJECT Project label for context-dependent recall
top_recall 6 BRAIN_TOP_RECALL Max memories per recall (1–25)
auto_reinforce true BRAIN_AUTO_REINFORCE Reinforce memories surfaced by brain_recall
brain_bin brain BRAIN_BIN Path to the brain CLI
sync_on_memorize false BRAIN_SYNC_ON_MEMORIZE Push each store to Brain Cloud / Git remote

Requirements

  • Hermes Agent (a version with pluggable memory providers)
  • The brain CLI from the brain-memory npm package
  • Python 3.10+ — no pip dependencies

Docs & source

License

MIT © Omelas

Metadata

Release files for hermes-brain-memory 0.1.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-brain-memory 0.1.0
File Size Uploaded
hermes_brain_memory-0.1.0.tar.gz 30.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hermes-brain-memory 0.1.0
File Interpreter ABI Platform
hermes_brain_memory-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.0 kB

Release files / hermes_brain_memory-0.1.0.tar.gz

Download URL hermes_brain_memory-0.1.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7cd73436e4fb277583c75aa74bac981c5da9647575db63e1665c827fc82a3185
BLAKE2b-256 checksum
How to use checksums
255f34e9360af9e5f933a340490f0cbfb78e1ff9acddc9c803bb791996730719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / hermes_brain_memory-0.1.0-py3-none-any.whl

Download URL hermes_brain_memory-0.1.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74d4a6ac85a2a4ff5b46e6cb9cd23a0578c34a0528c9c43d299580c5337cedbd
BLAKE2b-256 checksum
How to use checksums
ec549df1370ecdf02ce9116b390e56565487fa0fa5a7cb835687286574a9ba70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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