Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Optionally disable mem0 telemetry

vfdev9eab9fd08b66
diff --git a/browser_use/agent/memory/service.py b/browser_use/agent/memory/service.py
index bbe7e6019..21b9aad17 100644
--- a/browser_use/agent/memory/service.py
+++ b/browser_use/agent/memory/service.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import os
import logging
from typing import List, Optional
@@ -62,6 +63,10 @@ class Memory:
# Check for required packages
try:
+ # Optionally disable mem0 telemetry:
+ # https://github.com/mem0ai/mem0/blob/64c3d34deb056aff01126b855f1f0b655fd86ad1/mem0/memory/telemetry.py#L11-L12
+ if os.getenv('ANONYMIZED_TELEMETRY', 'true').lower() == 'false':
+ os.environ['MEM0_TELEMETRY'] = 'False'
from mem0 import Memory as Mem0Memory
except ImportError:
raise ImportError('mem0 is required when enable_memory=True. Please install it with `pip install mem0`.')