Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

feat(server): add information on self-hosted dashboard (#5325)

youneshima366945965df4
diff --git a/server/main.py b/server/main.py
index 340fde4b6..dcd367dce 100644
--- a/server/main.py
+++ b/server/main.py
@@ -360,6 +360,8 @@ def add_memory(memory_create: MemoryCreate, _auth=Depends(verify_auth)):
params = {k: v for k, v in memory_create.model_dump().items() if v is not None and k != "messages"}
try:
response = get_memory_instance().add(messages=[m.model_dump() for m in memory_create.messages], **params)
+ if response.get("results"):
+ telemetry.log_dashboard_nudge_once(DASHBOARD_URL)
return JSONResponse(content=response)
except Exception:
raise upstream_error()
diff --git a/server/scripts/seed.sh b/server/scripts/seed.sh
index ab63b7411..889e6f6ea 100755
--- a/server/scripts/seed.sh
+++ b/server/scripts/seed.sh
@@ -64,11 +64,12 @@ fi
echo ""
echo "=== Ready ==="
-echo "Dashboard: $DASHBOARD_URL"
echo "Email: $EMAIL"
echo "Password: $PASSWORD"
echo "API Key: $API_KEY"
echo ""
+echo "Open your dashboard at $DASHBOARD_URL to see and manage your memories in your browser."
+echo ""
if ! grep -qE '^(OPENAI|ANTHROPIC|GOOGLE)_API_KEY=.' .env 2>/dev/null; then
echo "!! No LLM provider API key set in server/.env."
diff --git a/server/telemetry.py b/server/telemetry.py
index ae5164e3e..b7b882a3e 100644
--- a/server/telemetry.py
+++ b/server/telemetry.py
@@ -29,6 +29,7 @@ STATE_PATH = Path(os.environ.get("MEM0_TELEMETRY_STATE_PATH", "/app/history/tele
_lock = Lock()
_client: Any = None
+_dashboard_nudge_logged = False
def _load_state() -> dict[str, Any]:
@@ -110,3 +111,19 @@ def capture_admin_registered(email: str) -> None:
def capture_onboarding_completed(email: str, use_case: str) -> None:
_capture_once(email, "onboarding_completed", "onboarding_sent_at", {"use_case": use_case})
+
+
+def log_dashboard_nudge_once(dashboard_url: str) -> None:
+ """Log a hint pointing the operator to the web dashboard the first time a memory
+ is stored. Fires at most once per process (so a restart may re-log it on the next
+ add — harmless for a discovery nudge). LOCAL console log only — sends nothing
+ off-box, so it is intentionally NOT gated by MEM0_TELEMETRY.
+ """
+ global _dashboard_nudge_logged
+ if _dashboard_nudge_logged:
+ return
+ _dashboard_nudge_logged = True
+ logging.info(
+ "First memory stored. Open the dashboard at %s to view and manage your memories.",
+ dashboard_url,
+ )