Add prefetch settings as environment variables for installation prompts #3

Merged
Pakobbix merged 1 commits from mem0-prefetch-improvements into main 2026-04-12 15:19:31 +00:00
2 changed files with 13 additions and 5 deletions
+6 -2
View File
@@ -6,6 +6,8 @@ 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_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"
+4
View File
@@ -10,6 +10,10 @@ requires_env:
url: "https://github.com/mem0ai/mem0"
- name: MEM0_USER_ID
description: "User identifier for memory scoping (default: hermes-user)"
- name: MEM0_PREFETCH_LIMIT
description: "Max memories to prefetch before LLM call (default: 3)"
- name: MEM0_PREFETCH_SCORE_THRESHOLD
description: "Min similarity score % to include memory 0-100 (default: 60)"
provides_tools:
- mem0_profile