Skip to content

Conversation

@giles17
Copy link
Contributor

@giles17 giles17 commented Jan 29, 2026

Motivation and Context

Mem0 uses PostHog to collect usage telemetry by default. Users of Agent Framework should not have their usage data sent to third-party analytics services without explicit consent.

Solution
Set MEM0_TELEMETRY=false environment variable before importing the mem0 library. Users can opt-in by setting MEM0_TELEMETRY=true before importing the package.

Resolves #2676

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings January 29, 2026 18:27
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python labels Jan 29, 2026
@github-actions github-actions bot changed the title Disable mem0 telemetry by default Python: Disable mem0 telemetry by default Jan 29, 2026
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 29, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/mem0/agent_framework_mem0
   _provider.py83396%170–171, 174
TOTAL16249207487% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3636 221 💤 0 ❌ 0 🔥 1m 6s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disables Mem0 telemetry by default in the Agent Framework integration and documents how users can explicitly opt in.

Changes:

  • Set MEM0_TELEMETRY to "false" by default in the agent_framework_mem0 package when the variable is not already defined.
  • Document the default telemetry behavior and opt-in mechanism in the Mem0 provider docstring and README.
  • Add tests to validate the default telemetry configuration and preservation of user-specified MEM0_TELEMETRY values.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
python/packages/mem0/agent_framework_mem0/__init__.py Sets MEM0_TELEMETRY="false" when not already defined before importing the Mem0 provider, ensuring Mem0’s PostHog telemetry is disabled by default.
python/packages/mem0/agent_framework_mem0/_provider.py Updates Mem0Provider docstring to explain that telemetry is disabled by default and how to enable it via MEM0_TELEMETRY=true before import.
python/packages/mem0/tests/test_mem0_context_provider.py Adds telemetry-focused tests to check the default disabled state and that user-provided MEM0_TELEMETRY is honored, but one test relies on external env state and prior imports.
python/packages/mem0/README.md Documents that telemetry is disabled by default and shows how to enable it using MEM0_TELEMETRY=true before importing agent_framework.mem0.

@giles17 giles17 enabled auto-merge January 29, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Disable telemetry collection for Mem0 by default

2 participants