mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
Every MemoryStore instance opened its own SQLite connection guarded by its own RLock. Several providers coexist in one process (the main agent plus every delegate_task subagent), so instances pointing at the same memory_store.db raced as independent WAL writers. Combined with writes that were not rolled back on error, one connection could leave an open write transaction that pinned the write lock and made every other connection's writes fail with "database is locked" for the full busy timeout. Instances for the same database now share ONE process-wide connection and ONE re-entrant lock, so access is fully serialized and cross-connection contention is impossible. The shared connection is refcounted: closing one instance never tears it out from under a live sibling, and the last close releases it. The connection runs in autocommit (isolation_level=None) so a write that raises mid-method can never leave a dangling transaction holding the write lock; the existing explicit commit() calls become harmless no-ops. The provider's shutdown() now calls the refcount-guarded close() instead of just dropping the reference: leaving finalization to GC kept the connection (and its write lock) alive indefinitely on long-running gateways, prolonging the exact contention this fix removes. The last provider now releases the connection deterministically while siblings stay live; regression tests fail without the wiring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| holographic.py | ||
| plugin.yaml | ||
| README.md | ||
| retrieval.py | ||
| store.py | ||
Holographic Memory Provider
Local SQLite fact store with FTS5 search, trust scoring, entity resolution, and HRR-based compositional retrieval.
Requirements
None — uses SQLite (always available). NumPy optional for HRR algebra.
Setup
hermes memory setup # select "holographic"
Or manually:
hermes config set memory.provider holographic
Config
Config in config.yaml under plugins.hermes-memory-store:
| Key | Default | Description |
|---|---|---|
db_path |
$HERMES_HOME/memory_store.db |
SQLite database path |
auto_extract |
false |
Auto-extract facts at session end |
default_trust |
0.5 |
Default trust score for new facts |
hrr_dim |
1024 |
HRR vector dimensions |
Tools
| Tool | Description |
|---|---|
fact_store |
9 actions: add, search, probe, related, reason, contradict, update, remove, list |
fact_feedback |
Rate facts as helpful/unhelpful (trains trust scores) |