Skip to main content

Background memory consolidation plugin for Hermes

Project description

hermes-dreaming

A background memory consolidation plugin for Hermes, built around Hermes' small, always-prompt-visible memory model.

What it does

Hermes durable memory (MEMORY.md ≈2,200 chars, USER.md ≈1,375 chars) is scarce and injected into every session prompt. hermes-dreaming runs a periodic three-phase consolidation cycle:

  • Light — scans recent sessions for candidate facts/preferences
  • Deep — identifies patterns, contradictions, supersessions
  • REM — scores candidates and applies at most a few high-confidence memory operations (add, replace, remove)

A successful run may produce zero durable writes. The goal is highest future usefulness per character, not more memories.

Note: memory mutations take effect on the next session start (Hermes loads memory as a frozen snapshot at session init).

Install

Development (symlink into user plugins — no pip needed):

mkdir -p ~/.hermes/plugins
ln -s ~/Development/hermes-dreaming/hermes_dreaming ~/.hermes/plugins/hermes-dreaming
# then enable in ~/.hermes/config.yaml:
# plugins:
#   enabled:
#     - hermes-dreaming

plugin.yaml lives inside hermes_dreaming/ alongside __init__.py, so Hermes discovers it automatically via the symlink.

Via pip (into the Python environment that runs hermes):

pip install -e ~/Development/hermes-dreaming

Commands

/dreaming run       — full cycle (schedules + manual)
/dreaming review    — dry-run; proposes ops without mutating memory
/dreaming status    — last run, candidate counts, memory usage
/dreaming compact   — merge duplicates + remove obsolete; no new adds

CLI equivalents:

hermes dreaming run
hermes dreaming review
hermes dreaming status
hermes dreaming compact
hermes dreaming install-cron   # register nightly 03:00 cron job

State files

All runtime state lives in ~/.hermes/dreaming/:

~/.hermes/dreaming/
├── DREAMS.md           # human-readable audit diary
├── state.json          # last run metadata
├── candidates.jsonl    # staged Light-phase candidates
├── decisions.jsonl     # all Deep/REM decisions (including rejections)
├── promotions.jsonl    # applied memory operations (includes sidecar metadata)
├── runs/               # per-run JSON records
└── backups/            # timestamped MEMORY.md / USER.md snapshots

Configuration

dreaming:
  enabled: true
  schedule: "0 3 * * *"
  max_changes_per_run: 3

Design

See docs/implementation-brief.md for the full design brief.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_dreaming-0.1.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_dreaming-0.1.0-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file hermes_dreaming-0.1.0.tar.gz.

File metadata

  • Download URL: hermes_dreaming-0.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hermes_dreaming-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a65e82f45c86438a2ee2948d5243f5c6a429fdf6b3349c9ae7af7826229d0cc
MD5 1b25258fa3a595e6dc7405f9d36f91ba
BLAKE2b-256 e280976f1ac611520d018308b0768a1e7b061b865e9e620332b45fe52f9cc3fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_dreaming-0.1.0.tar.gz:

Publisher: publish.yml on alejandroiglesias/hermes-dreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermes_dreaming-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_dreaming-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3db806ac4df06f3244e3b1a812ec2dfabf3b1cb1c8288b49ceaf1722a3546ca6
MD5 9720757a6be4f6d38afd3e3a4e82b856
BLAKE2b-256 fe8640ec529f3c6924a4810815ac487da87a5ec5c73003bf0b0879bb8c5083b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_dreaming-0.1.0-py3-none-any.whl:

Publisher: publish.yml on alejandroiglesias/hermes-dreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page