🧠 Mem0 Analytics
Real-time analytics and monitoring infrastructure for the Mem0 ecosystem. Plug it in once — and it automatically tracks every memory, model, vector store, and embedder you use.
🧩 Overview
Mem0 Analytics is the official data, analytics, and monitoring layer for Mem0. It automatically traces every memory interaction, measures latency and efficiency across the entire stack, and presents insights through a rich in-terminal dashboard or PostHog cloud visualization.
No setup, no configuration — just:
pip install mem0 mem0-analytics
and Mem0 Analytics automatically activates.
Every add, search, update, reset, and query operation is tracked — across all supported LLMs, embedders, and vector stores.
⚙️ What It Does
- 🧠 Autoinstruments Mem0 — wraps every memory call transparently
- ⚡ Tracks performance — latency, tail (P95), TTFR, and system load
- 💾 Monitors all layers — LLM, embedder, and vector database
- 🔁 Aggregates KPIs every 60 s locally (SQLite store)
- 📊 Visualizes metrics in a live, auto-updating terminal dashboard
- ☁️ Optionally syncs to PostHog for team dashboards
🖥 Dashboard
Real-time monitoring of:
- ⚡ Latency (avg & P95) by operation
- 🧩 Embedding & Vector performance
- 💾 Cache effectiveness
- 🧠 TTFR (Time-to-First-Response)
- 🧮 Success, error, and resource metrics
- ✅ System stability indicator
Runs completely local — powered by rich.
No servers, no dependencies beyond SQLite.
☁️ Cloud Analytics (Optional)
For org-wide tracking, enable PostHog sync:
export POSTHOG_API_KEY=<your_key>
export POSTHOG_HOST=https://app.posthog.com
Analytics are automatically batched and sent every minute.
📊 Metrics Tracked
| Category | Metrics | Description |
|---|---|---|
| Performance | avg_latency_ms, latency_p95, ttfr_ms |
End-to-end and tail latency |
| Embedder / Vector | avg_embed_latency, avg_vector_latency |
Stage-wise breakdown |
| Efficiency | cache_effectiveness, usage_count |
Cache reuse and throughput |
| System Health | cpu_percent, mem_used_mb |
Runtime system stats |
| Reliability | success_rate, error_rate |
Stability and health signals |
🧱 Architecture
Mem0 (any model, vector, embedder)
↓
mem0-analytics → captures metrics automatically
↓
SQLite (~/.mem0_metrics.db) → local store
↓
Live CLI Dashboard ← Aggregator updates every 60 s
↓
(Optional) PostHog sync for cloud dashboards
Local-first, privacy-safe, fully offline by default.
🚀 Quick Start
pip install mem0 mem0-analytics
That’s it — analytics auto-activates with Mem0.
View the live dashboard
python -m mem0_analytics.dashboard
Data is stored locally at:
~/.mem0_metrics.db
Updated automatically every minute.
🧠 Ecosystem Coverage
Mem0 Analytics supports all major backends out of the box:
| Layer | Supported |
|---|---|
| LLMs | OpenAI (gpt-4o, gpt-5-nano), Ollama (smollm2, smollm2:135m), Claude, Gemini, Groq, Llama, DeepSeek, etc. |
| Vector Stores | Qdrant, ChromaDB, FAISS, Weaviate, Pinecone, Milvus, Redis, LanceDB |
| Embedders | OpenAI, Ollama, Hugging Face, Sentence-Transformers, InstructorXL, BGE, etc. |
If it works with Mem0 — it’s already tracked by Mem0 Analytics.
🔬 Engineering Highlights
- 🪶 Lightweight (no external DB required)
- 🧱 Built on SQLite +
richfor local telemetry - 🔁 Background aggregator with rolling KPIs
- ☁️ Optional PostHog sync for teams
- 🧩 Pluggable architecture (add any provider)
- 💡 Minimal overhead — <1 ms per operation
🧭 Roadmap
- Local SQLite metrics layer
- Terminal dashboard
- PostHog publishing
- Cost & token usage metrics
- Prometheus exporter
- Alerting / anomaly detection
- Multi-agent comparison mode
🤝 Contributing
Contributions are open — help extend analytics across new backends, metrics, or visualizations.
📜 License
Released under the MIT License.
See LICENSE for details.
Release files for mem0-analytics 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mem0_analytics-0.1.0.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mem0_analytics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:48.9 kB
Release files / mem0_analytics-0.1.0.tar.gz
| Download URL | mem0_analytics-0.1.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
429021075ec931e1291c2546f0b01865d87bf818bd42599729c6716bc7a747e7
|
|
BLAKE2b-256 checksum How to use checksums |
92b1f7590eac30221a22b6caa7e3731cc6eca13b11909dfc98cf755c5148d568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / mem0_analytics-0.1.0-py3-none-any.whl
| Download URL | mem0_analytics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c745ef3b7a98f5821437ecf8d7c1a69721d1a7df1cb906364ae0e93799d5dad
|
|
BLAKE2b-256 checksum How to use checksums |
5ea37f7c7403228a855a066a4961b67147be9830b605c8492e0e9bb481c685c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|