Mnemosyne Vector Embeddings Not Initializing
Reported: 2026-06-04
Component: mnemosyne → plugins/mnemosyne/ (Hermes memory provider) + mnemosyne.core.embeddings
Environment
VPS (Hermes Agent host)
| Spec |
Value |
| Hostname |
nermies |
| OS |
Ubuntu 24.04.4 LTS |
| Kernel |
6.8.0-117-generic (x86_64) |
| CPU |
1 core |
| RAM |
955 MiB |
| Python |
3.11.15 (via uv) |
| Hermes Agent |
0.15.1 |
| Hermes venv |
/home/<user>/.hermes/hermes-agent/venv/ |
| Hermes config |
/home/<user>/.hermes/config.yaml |
Package Versions (all in Hermes venv)
| Package |
Version |
Status |
mnemosyne-memory |
3.1.2 |
Installed |
fastembed |
0.8.0 |
Installed ✓ |
numpy |
2.4.3 |
Installed ✓ |
sqlite-vec |
0.1.9 |
Installed ✓ |
Hermes Plugin Location
- Plugin path:
~/.hermes/plugins/mnemosyne/__init__.py (user-installed)
- Plugin files:
__init__.py, audit.py, cli.py, hermes_llm_adapter.py
Memory Config (~/.hermes/config.yaml)
memory:
memory_enabled: true
user_profile_enabled: true
memory_char_limit: 2200
user_char_limit: 1375
provider: mnemosyne
mnemosyne:
auto_sleep: 'true'
ignore_patterns: one per line
shared_surface_path: /home/<user>/.hermes/mnemosyne/data/shared/mnemosyne.db
skip_contexts: cron,flush,subagent,background,skill_loop
sleep_threshold: '40'
vector_type: int8
Symptoms
-
mnemosyne_diagnose tool (running inside the Hermes gateway process) consistently reports:
fastembed: MISSING
numpy: MISSING
sqlite_vec: OK (0.1.9)
embeddings_available: NO
embeddings_model: BAAI/bge-small-en-v1.5
episodic_vectors: 0
Key finding: "fastembed not available - install with: pip install mnemosyne-memory[embeddings]"
-
Running run_diagnostics() directly from the same Hermes venv shows everything healthy:
fastembed: OK (0.8.0)
sqlite_vec: OK (0.1.9)
numpy: OK (2.4.3)
embeddings_available: YES
-
mnemosyne_recall results all show dense_score: 0.0 — the vector (dense) scoring component contributes nothing, despite keyword_score and fts_score working. The hybrid scoring formula is effectively FTS5-only.
-
The discrepancy persists even after a full gateway restart (killed by --replace, new PID 197123 confirmed).
-
Config vector_type: int8 is explicitly noted as not wired to the runtime (see plugin line 851):
"Vector storage type (note: not yet wired to BeamMemory at runtime; reserved for future use)"
Investigation
What was tried
| Attempt |
Outcome |
pip install mnemosyne-memory[embeddings] |
All packages already installed |
python -c "import fastembed; print(fastembed.__version__)" |
0.8.0 ✓ |
python -c "import numpy; print(numpy.__version__)" |
2.4.3 ✓ |
mnemosyne_diagnose from fresh venv Python |
All embedding checks pass ✓ |
Gateway restart (hermes gateway run --replace) |
Diagnose still shows fastembed MISSING |
| Direct import test with plugin path manipulation in fresh Python |
ModuleNotFoundError: No module named 'mnemosyne.core' |
Direct import test proving the path shadowing
import sys
sys.path.insert(0, '/home/linuxuser/.hermes/plugins/') # ← what plugin does
from mnemosyne.core import embeddings # FAILS: finds plugin, not site-packages
With the Hermes plugin directory at sys.path[0], import mnemosyne resolves to ~/.hermes/plugins/mnemosyne/ (the Hermes plugin __init__.py) instead of the installed mnemosyne package in site-packages. The plugin has no core/ subpackage, so from mnemosyne.core.episodic_graph import GraphEdge fails.
Root Cause Analysis
1. sys.path shadowing in the Hermes plugin
The Hermes plugin at ~/.hermes/plugins/mnemosyne/__init__.py (lines 28–30) inserts itself onto sys.path:
_mnemosyne_root = Path(__file__).resolve().parent.parent # → ~/.hermes/plugins/
if str(_mnemosyne_root) not in sys.path:
sys.path.insert(0, str(_mnemosyne_root))
This puts ~/.hermes/plugins/ at position 0 of sys.path. Since both the Hermes plugin and the installed mnemosyne package share the same bare namespace name (mnemosyne), any subsequent import mnemosyne (or __import__("fastembed") from within mnemosyne.diagnose.run_diagnostics()) can shadow to the wrong package depending on import order.
Why it usually works: The installed mnemosyne (from site-packages) is normally imported and cached in sys.modules before the plugin's sys.path manipulation runs. However, in certain import sequences — particularly when mnemosyne.diagnose.run_diagnostics() calls __import__("fastembed") or import numpy — the manipulated path can cause resolution failures.
2. Module-level evaluation of _FASTEMBED_AVAILABLE
In mnemosyne.core.embeddings (line 35):
_FASTEMBED_AVAILABLE = np is not None and TextEmbedding is not None
This is evaluated once at module import time. If the import happens before fastembed is available, or if it resolves to a path-shadowed context, the variable is permanently False. Python's sys.modules caching means this cannot be recovered without a process restart.
3. vector_type config is a no-op
The Hermes plugin's config schema (line 851) explicitly documents that vector_type is not wired:
{"key": "vector_type", "description": "Vector storage type (note: not yet wired to BeamMemory at runtime; reserved for future use)", ...}
The validation code (line 770–773) reads and validates the value but never passes it to BeamMemory. The config key exists for future use only.
Current State
| Metric |
Value |
| Working memories |
331 |
| Episodic summaries |
52 |
| Episodic vectors |
0 (embeddings not active) |
| Shared surface |
Empty |
| Hybrid scoring |
FTS5 + importance only (no vector similarity) |
Recommended Fixes
Short-term (operator workaround)
- Fix the import shadowing in the Hermes plugin: Import and cache
mnemosyne (and its submodules) from site-packages before modifying sys.path, so the correct modules are in sys.modules before the path manipulation takes effect.
- Alternatively: Make the
sys.path insertion conditional (insert(0, …) → append(…) or remove after a targeted import).
Medium-term (library change in mnemosyne.core.embeddings)
- Make
_FASTEMBED_AVAILABLE a lazy property or function rather than a module-level constant, so it re-evaluates on first use (or each call). This would also fix the stale-state issue when packages are installed while the process is running.
Config schema
- Either wire
vector_type to BeamMemory so it actually enables/disables vector storage, or remove the config key from the Hermes plugin schema to avoid misleading operators into thinking it's functional.
Files Referenced
| File |
Relevance |
~/.hermes/plugins/mnemosyne/__init__.py |
Hermes plugin — sys.path manipulation (L28–30), config schema (L851) |
venv/lib/python3.11/site-packages/mnemosyne/core/embeddings.py |
_FASTEMBED_AVAILABLE module-level eval (L35), available() (L175–185) |
venv/lib/python3.11/site-packages/mnemosyne/diagnose.py |
run_diagnostics() — separate fastembed check (L97–111) vs embeddings check (L114–119) |
~/.hermes/config.yaml |
Memory config with vector_type: int8 |
Mnemosyne Vector Embeddings Not Initializing
Reported: 2026-06-04
Component:
mnemosyne→plugins/mnemosyne/(Hermes memory provider) +mnemosyne.core.embeddingsEnvironment
VPS (Hermes Agent host)
nermiesuv)0.15.1/home/<user>/.hermes/hermes-agent/venv//home/<user>/.hermes/config.yamlPackage Versions (all in Hermes venv)
mnemosyne-memory3.1.2fastembed0.8.0numpy2.4.3sqlite-vec0.1.9Hermes Plugin Location
~/.hermes/plugins/mnemosyne/__init__.py(user-installed)__init__.py,audit.py,cli.py,hermes_llm_adapter.pyMemory Config (
~/.hermes/config.yaml)Symptoms
mnemosyne_diagnosetool (running inside the Hermes gateway process) consistently reports:Key finding: "fastembed not available - install with: pip install mnemosyne-memory[embeddings]"
Running
run_diagnostics()directly from the same Hermes venv shows everything healthy:mnemosyne_recallresults all showdense_score: 0.0— the vector (dense) scoring component contributes nothing, despitekeyword_scoreandfts_scoreworking. The hybrid scoring formula is effectively FTS5-only.The discrepancy persists even after a full gateway restart (killed by
--replace, new PID 197123 confirmed).Config
vector_type: int8is explicitly noted as not wired to the runtime (see plugin line 851):Investigation
What was tried
pip install mnemosyne-memory[embeddings]python -c "import fastembed; print(fastembed.__version__)"0.8.0✓python -c "import numpy; print(numpy.__version__)"2.4.3✓mnemosyne_diagnosefrom fresh venv Pythonhermes gateway run --replace)ModuleNotFoundError: No module named 'mnemosyne.core'Direct import test proving the path shadowing
With the Hermes plugin directory at
sys.path[0],import mnemosyneresolves to~/.hermes/plugins/mnemosyne/(the Hermes plugin__init__.py) instead of the installedmnemosynepackage in site-packages. The plugin has nocore/subpackage, sofrom mnemosyne.core.episodic_graph import GraphEdgefails.Root Cause Analysis
1.
sys.pathshadowing in the Hermes pluginThe Hermes plugin at
~/.hermes/plugins/mnemosyne/__init__.py(lines 28–30) inserts itself ontosys.path:This puts
~/.hermes/plugins/at position 0 ofsys.path. Since both the Hermes plugin and the installedmnemosynepackage share the same bare namespace name (mnemosyne), any subsequentimport mnemosyne(or__import__("fastembed")from withinmnemosyne.diagnose.run_diagnostics()) can shadow to the wrong package depending on import order.Why it usually works: The installed
mnemosyne(from site-packages) is normally imported and cached insys.modulesbefore the plugin'ssys.pathmanipulation runs. However, in certain import sequences — particularly whenmnemosyne.diagnose.run_diagnostics()calls__import__("fastembed")orimport numpy— the manipulated path can cause resolution failures.2. Module-level evaluation of
_FASTEMBED_AVAILABLEIn
mnemosyne.core.embeddings(line 35):This is evaluated once at module import time. If the import happens before fastembed is available, or if it resolves to a path-shadowed context, the variable is permanently
False. Python'ssys.modulescaching means this cannot be recovered without a process restart.3.
vector_typeconfig is a no-opThe Hermes plugin's config schema (line 851) explicitly documents that
vector_typeis not wired:{"key": "vector_type", "description": "Vector storage type (note: not yet wired to BeamMemory at runtime; reserved for future use)", ...}The validation code (line 770–773) reads and validates the value but never passes it to
BeamMemory. The config key exists for future use only.Current State
Recommended Fixes
Short-term (operator workaround)
mnemosyne(and its submodules) from site-packages before modifyingsys.path, so the correct modules are insys.modulesbefore the path manipulation takes effect.sys.pathinsertion conditional (insert(0, …)→append(…)or remove after a targeted import).Medium-term (library change in
mnemosyne.core.embeddings)_FASTEMBED_AVAILABLEa lazy property or function rather than a module-level constant, so it re-evaluates on first use (or each call). This would also fix the stale-state issue when packages are installed while the process is running.Config schema
vector_typetoBeamMemoryso it actually enables/disables vector storage, or remove the config key from the Hermes plugin schema to avoid misleading operators into thinking it's functional.Files Referenced
~/.hermes/plugins/mnemosyne/__init__.pysys.pathmanipulation (L28–30), config schema (L851)venv/lib/python3.11/site-packages/mnemosyne/core/embeddings.py_FASTEMBED_AVAILABLEmodule-level eval (L35),available()(L175–185)venv/lib/python3.11/site-packages/mnemosyne/diagnose.pyrun_diagnostics()— separate fastembed check (L97–111) vs embeddings check (L114–119)~/.hermes/config.yamlvector_type: int8