Add prefetch settings as environment variables for installation prompts

This commit is contained in:
2026-04-12 17:17:40 +02:00
parent 7d4cd463d7
commit 4a273dba3c
2 changed files with 13 additions and 5 deletions
+9 -5
View File
@@ -3,9 +3,11 @@
Self-hosted Mem0 server with semantic search and automatic fact extraction.
Config via environment variables:
MEM0_BASE_URL — Local Mem0 server URL (required, e.g., http://localhost:8000)
MEM0_USER_ID — User identifier for memory scoping (default: hermes-user)
MEM0_AGENT_ID — Agent identifier (default: hermes)
MEM0_BASE_URL — Local Mem0 server URL (required, e.g., http://localhost:8000)
MEM0_USER_ID — User identifier for memory scoping (default: hermes-user)
MEM0_AGENT_ID — Agent identifier (default: hermes)
MEM0_PREFETCH_LIMIT — Max memories to prefetch (default: 3)
MEM0_PREFETCH_SCORE_THRESHOLD — Min similarity score % to include memory (default: 60)
Or via $HERMES_HOME/mem0-local.json.
"""
@@ -46,8 +48,10 @@ def _load_config() -> dict:
"agent_id": os.environ.get("MEM0_AGENT_ID", "hermes"),
"rerank": True,
"timeout": 10.0,
"prefetch_limit": 3,
"prefetch_score_threshold": 60,
"prefetch_limit": int(os.environ.get("MEM0_PREFETCH_LIMIT", "3")),
"prefetch_score_threshold": int(
os.environ.get("MEM0_PREFETCH_SCORE_THRESHOLD", "60")
),
}
config_path = get_hermes_home() / "mem0-local.json"