Constraint Vault
Memory systems summarise. Compression paraphrases. Both quietly destroy
exact values. A user's "never spend more than 0.05 ETH" comes back as
"avoid large spends"; a wallet address loses a character; a deadline
becomes "soon". This failure is documented in reviews of Hermes memory
providers: under context compression, exact values are silently collapsed.
The Vault is a guard layer for the small set of facts that must survive
exactly:
How it works
- Pin a constraint with the
vault_pintool (the agent is instructed
to use it whenever you state a precise limit or rule) or/vault add <text>. Constraints are stored as plain strings in
~/.hermes/constraint-vault.json, each with its SHA-256. - Every turn,
pre_llm_callinjects a block built byte-identically
from the stored strings: the model always starts its turn looking at
your constraints word-for-word. - After every compaction (
post_compaction), the block rides the
next tool result as well — re-issued mid-turn, not at the next turn
boundary, which is exactly when compression would otherwise have
silently eaten it. - Every injection is logged (
~/.hermes/constraint-vault-injections.jsonl)
with the SHA-256 of the injected block, so "the constraint was in
context, verbatim" is an auditable fact rather than a hope.
Manage with vault_list / vault_drop or /vault list|add|drop.
VAULT_DISABLE=1 is a kill switch. Caps: 50 constraints, 2000 chars each —
the Vault is for the few facts that must be exact, not a notebook.
Scope, stated plainly
The Vault guarantees delivery: the exact strings enter the model's
context on schedule, and the log proves the delivered bytes hash to the
stored ones. Whether the model obeys a constraint is the model's
business — but a constraint it can see verbatim is one it can follow,
and one you can hold it to. This is deliberately not a memory
provider and not a compressor; it sits above both.
Safety
Fail-open everywhere (hook exceptions are swallowed). No credentials, no
network. Constraint text is the user's own words, stored locally.
Install
Drop this directory into ~/.hermes/plugins/constraint-vault/, enable it
(hermes plugins enable constraint-vault), and restart Hermes.
Tests
python3 tests/test_vault.py — pin/list/drop round-trips, persistence
across instances, verbatim injection of an exact value, duplicate and
overlong rejection, and one-time post-compaction re-injection with its
hash log.
README from the reviewed commit e794972; it updates when the author re-pins.

jusst