Monitoring

August 23, 2026 ยท View on GitHub

mnemory exposes a /metrics endpoint in Prometheus text exposition format, enabled by default (ENABLE_METRICS=true).

Endpoint Access

By default, /metrics and /health are served on the main port with standard API key authentication. When MGMT_PORT is set, the same endpoints are also exposed on the management port without auth. For production, scrape and probe the management port to avoid sending credentials and to prevent duplicate ingestion (see Management Port).

Available Metrics

Counters (in-memory, reset on restart)

MetricLabelsDescription
mnemory_operations_totaloperation, user_id, agent_idTotal MCP/REST operations. Operations: add_memory, add_memories, search_memories, find_memories, update_memory, delete_memory, delete_all, get_core_memories, get_recent_memories, list_memories, save_artifact, get_artifact, list_artifacts, delete_artifact, list_categories, recall, remember, initialize_memory, fsck_check, fsck_apply
mnemory_remember_facts_extracted_totaluser_idFacts extracted by remember pipeline (pre-dedup)
mnemory_remember_facts_stored_totaluser_idFacts stored by remember pipeline (post-dedup)
mnemory_remember_dedup_decisions_totaluser_id, actionRemember dedup decisions (add, update, delete, skip)
mnemory_remember_empty_extractions_totaluser_idRemember calls that produced zero facts
mnemory_consolidation_runs_totaluser_id, typeConsolidation runs (session, cross_session)
mnemory_consolidation_memories_produced_totaluser_idConsolidated memories produced
mnemory_consolidation_memories_superseded_totaluser_idRaw memories superseded by consolidation
mnemory_consolidation_validation_failures_totaluser_idConsolidation output validation failures

Histograms (in-memory, reset on restart)

MetricLabelsDescription
mnemory_consolidation_duration_secondsuser_id, typeConsolidation run duration (buckets: 1, 5, 10, 30, 60, 120, 300s)

Gauges (from Qdrant, cached)

Refreshed asynchronously after the configurable cache TTL expires (METRICS_CACHE_TTL, default 600s). Stale values remain available during refresh.

MetricLabelsDescription
mnemory_memories_totaluser_id, agent_id, memory_type, roleTotal memories by all key dimensions
mnemory_memories_decayed_totaluser_id, agent_idDecayed (expired) memories
mnemory_memories_pinned_totaluser_id, agent_idPinned memories
mnemory_memories_by_category_totaluser_id, categoryMemories per category
mnemory_memories_with_artifacts_totaluser_id, agent_idMemories with artifacts attached
mnemory_active_sessions--Active memory sessions (recall/remember)
mnemory_infoversion, vector_backend, artifact_backendServer metadata (always 1)
mnemory_consolidation_sessions_pendinguser_idSessions awaiting consolidation

Prometheus Scrape Config

scrape_configs:
  - job_name: mnemory
    scrape_interval: 60s
    static_configs:
      - targets: ['mnemory:9090']  # MGMT_PORT

Grafana Dashboard

A pre-built Grafana dashboard is available in integrations/grafana/. Import dashboard.json into Grafana for an overview of memories, operations, and breakdowns by type/category/role with user and agent filtering.