Code health of mem0ai/mem0
Repowise scores mem0ai/mem0 at 7.1 out of 10 for code health, which reads as good, alongside maintainability 7.9 and static performance 9.9 on the same scale. There are 2,229 open findings across the three pillars, and the lowest-scoring file is main.py at 1.4. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.
Findings by severity
148 critical, 335 high, 583 medium, 1,095 low.
Hotspots
94 files are flagged as hotspots. The top 5:
- mem0-ts/src/oss/tests/vector-stores-compat.test.ts: 12 commits in the last 90 days from 6 contributors with 4 recent bug fixes
- mem0/memory/main.py: 31 commits in the last 90 days from 19 contributors with 30 recent bug fixes
- mem0-ts/src/oss/src/memory/index.ts: 22 commits in the last 90 days from 18 contributors with 21 recent bug fixes
- tests/test_memory.py: 14 commits in the last 90 days from 11 contributors with 15 recent bug fixes
- tests/memory/test_main.py: 8 commits in the last 90 days from 6 contributors with 6 recent bug fixes
Lowest-scoring files
- mem0/memory/main.py: 1.4 out of 10 with 30 bug fixes in the last 180 days
- mem0/client/main.py: 1.4 out of 10 with 8 bug fixes in the last 180 days
- mem0-ts/src/oss/src/memory/index.ts: 1.8 out of 10 with 21 bug fixes in the last 180 days
- mem0/vector_stores/valkey.py: 1.8 out of 10 with 3 bug fixes in the last 180 days
- mem0/vector_stores/qdrant.py: 2.0 out of 10 with 4 bug fixes in the last 180 days
Checked against bug fixes
Of the 20 files Repowise scores lowest, 20 had a bug fix in the last 180 days. Across all 1,491 scored files, 24.1% had a bug fix in that window.
Dead code and refactoring
Repowise found 158 unused exports. 143 refactoring targets across 143 files would raise the score.
More on mem0: summary and FAQ, codebase overview, architecture.
Related guide: Best dead code detection tools by language