Real-time analytics and monitoring infrastructure for Mem0 — tracks all LLMs, vector stores, and embedders automatically.
Project description
🧠 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mem0_analytics-0.1.0.tar.gz.
File metadata
- Download URL: mem0_analytics-0.1.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
429021075ec931e1291c2546f0b01865d87bf818bd42599729c6716bc7a747e7
|
|
| MD5 |
2cf646aaeaa3bc37bbd17de7b7851bcd
|
|
| BLAKE2b-256 |
92b1f7590eac30221a22b6caa7e3731cc6eca13b11909dfc98cf755c5148d568
|
File details
Details for the file mem0_analytics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mem0_analytics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c745ef3b7a98f5821437ecf8d7c1a69721d1a7df1cb906364ae0e93799d5dad
|
|
| MD5 |
0e1d7962fdef54c4cc8f31de154ca04e
|
|
| BLAKE2b-256 |
5ea37f7c7403228a855a066a4961b67147be9830b605c8492e0e9bb481c685c6
|