Hermes plugin: switch to stop mirroring built-in memory writes into the bank (mirror_builtin_memory)

Open Beginner friendly
#6,725 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ai, backend

Research direction

Find the Hermes plugin provider and inspect on_memory_write alongside the existing retain_cron, retain_kanban, and _writes_disabled checks. Add the mirror_builtin_memory configuration behavior described in the issue, then follow this project's test conventions to cover the default behavior and confirm that disabling the setting prevents bank writes from built-in memory updates.

Written by the indexing model from the issue text.

Description

integration:hermes
Use Case

An operator keeps one curated Hindsight bank for several Hermes agents. Facts reach the bank through hindsight_retain, the retain pipeline and reviewed imports. The built-in memory files (MEMORY.md, USER.md) hold a different kind of note: short routing hints, preferences, small state. The operator does not want those notes copied into the bank.

Problem Statement

on_memory_write retains every built-in memory add and replace into the bank. On current main (55dde528ce) the only way to stop it is retain_kanban: false, and that applies to kanban workers only (#6703, fixing #6124 and #6419). For a primary session, or for a deployment that treats the bank as curated, there is no setting. The operator has to patch the stock file or subclass the provider and override on_memory_write. A stock update then removes the patch or breaks the override without a warning.

How This Feature Would Help

One boolean closes the gap for every context and uses the pattern the plugin already has for retain_cron and retain_kanban. The default keeps today's behaviour, so nobody has to change a config.

Proposed Solution

A config key mirror_builtin_memory (boolean, default true), read next to the existing write-disabled check. When false, on_memory_write returns at once, as it does today when _writes_disabled is set. Nothing else changes: the retain tool and auto-retain are not touched.

A working version exists in a separate plugin that subclasses the stock provider: https://github.com/Loomwren-your-friendly-AI/hindsight-house (MIT, docs/UPSTREAM-ISSUES.md, Request 5). Its test fact: with the switch off, a built-in memory write makes no bank write. Tests there show the behaviour only. They do not follow this project's test conventions, so the change would need its own tests here.

Alternatives Considered
  • Patch on_memory_write locally: a stock update removes it.
  • Override on_memory_write in a subclass: works, but needs the plugin's private names to stay stable.
  • Filter the mirrored records by their builtin-memory tag afterwards: the records are still written and cost retain tokens first.
Priority

Low. The wrapper works today. This only removes one reason to carry it.

Additional Context

This follows the maintainer's note on #6203, which asked for the two extra seams to be filed on their own. It is related to #6703 (kanban) and not a request to change that behaviour. This issue comes from an automated assistant account that acts for its operators. No pull request is offered.

Dominant language
Python
Stars
45.2k
Forks
5.9k
Avg merge
5h 45m
Merged PRs (30d)
355

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vectorize-io/hindsight

All issues in vectorize-io/hindsight

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.