
Mem0 Status
FreeDiagnose mem0 plugin connectivity and functionality.
Free · Opens the source repo
What Mem0 Status does
Mem0 Status is a diagnostic tool designed to help users troubleshoot issues with the mem0 plugin. It performs a series of checks to ensure that the plugin is functioning correctly, verifying API key validity, identity resolution, memory tool connectivity, and memory read/write capabilities. This tool is particularly useful for developers and designers who rely on the mem0 plugin for memory management and need to quickly identify and resolve connectivity or configuration issues.
The diagnostic process begins with a check of the API key to confirm that it is set correctly. Following this, the tool resolves identity from the environment variables that the plugin uses, ensuring that the user and project IDs are correctly identified. It also checks the branch information to maintain consistency and prevent confusion during plugin operation. The next steps involve testing memory tool connectivity and write capabilities, which are crucial for ensuring that memory operations can be executed without errors.
In addition, Mem0 Status assesses the session context to ensure that the plugin's environment variables are properly injected. Finally, it evaluates the eligibility for auto-dream functionality, which consolidates memories based on specific criteria. This comprehensive approach allows users to quickly diagnose problems and understand the state of their mem0 plugin, making it an essential tool for effective memory management.
This skill is ideal for anyone using the mem0 plugin who encounters issues with memory operations, searches returning empty results, or add_memory errors. By running this diagnostic tool, users can gain insights into their plugin's functionality and take corrective actions as necessary.
When to use it
Use this skill when experiencing failures in memory operations, empty search results, or errors related to adding memory.
When not to use it
This tool is not suitable for diagnosing issues unrelated to the mem0 plugin or for users who do not utilize the mem0 memory management system.
What you can build with it
Diagnosing API Key Issues
Run Mem0 Status to verify if your API key is set correctly, helping to resolve connectivity problems.
Checking Memory Operations
Use this tool to ensure that memory read/write operations are functioning as expected, preventing data loss.
Verifying Session Context
Check if the plugin's environment variables are correctly injected to maintain session integrity.
How to install Mem0 Status
View source1. Install with the skills CLI
npx skills add mem0ai/mem0/mem0-status --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by mem0aiMem0 Status
Run a diagnostic check on the mem0 plugin. Useful for troubleshooting.
Execution
Run ALL checks, then display a single summary. Do not stop on the first failure.
Check 1: API key
_KEY="${MEM0_API_KEY:-}"
[ -n "$_KEY" ] && echo "${_KEY:0:6}..." || echo "NOT_SET"
- If
NOT_SET: FAIL — "No API key configured" - If set: PASS — the command already prints only the first 6 chars
Check 2: Identity resolution
Resolve identity from the MEM0_* environment variables set by the plugin's shell.env hook. These are the exact values the plugin uses to scope memories, so report them directly. Do NOT re-run git here: the plugin already resolved branch and project from git at session start, and re-shelling git can disagree with it — e.g. it prints an empty branch that renders as (not a git repo) while the Session check below shows branch=main. One source of truth keeps the two lines consistent.
echo "user_id=${MEM0_USER_ID:-${USER:-default}}"
echo "project_id=${MEM0_APP_ID:-}"
echo "branch=${MEM0_BRANCH:-main}"
_S="$HOME/.mem0/settings.json"
_SCOPE="$(grep -o '"default_scope"[[:space:]]*:[[:space:]]*"[a-z]*"' "$_S" 2>/dev/null | grep -o '[a-z]*"$' | tr -d '"')"
echo "default_scope=${_SCOPE:-project}"
user_id: fromMEM0_USER_ID, falling back to$USERproject_id: fromMEM0_APP_IDbranch: fromMEM0_BRANCH(the plugin's resolved value; falls back tomainoutside a git repo)default_scope: from~/.mem0/settings.json(default_scope), falling back toproject. This is the scope memory tools use when none is given; change it with/mem0-scope.
PASS if user_id and project_id are non-empty. WARN if project_id is empty — the shell.env hook may not have fired (restart OpenCode). Report the branch verbatim from MEM0_BRANCH; never invent a string like (not a git repo).
Check 3: Memory tool connectivity
Call search_memories with:
-
query="health check" -
filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]} -
top_k=1 -
If returns successfully (even empty): PASS
-
If errors: FAIL — show the error message
Check 4: Memory write capability
Call add_memory with:
text="Health check probe — safe to delete."user_id=<active_user_id>app_id=<active_project_id>metadata={"type": "health_check", "probe": true}infer=False
The response returns event_id (v3 writes are async). Call get_event_status(event_id=<event_id>) to check processing.
- If status is
SUCCEEDED: PASS — extract the memory ID from the event result, then calldelete_memorywith that ID to clean up. - If status is
PENDINGafter 5 seconds: PASS (write accepted, processing delayed) - If errors: FAIL — show the error.
Check 5: Session context
Check that the plugin's shell.env hook has injected session context into the environment:
echo "session_id=${MEM0_SESSION_ID:-}"
echo "app_id=${MEM0_APP_ID:-}"
echo "branch=${MEM0_BRANCH:-}"
- If all three are non-empty: PASS — "Session active"
- If any are missing: WARN — "Plugin env vars not set; shell.env hook may not have fired"
Check 6: Auto-dream readiness
Explain whether auto-dream (memory consolidation) is eligible to run, and if not, exactly which gate is blocking. Auto-dream runs at most once per session and only when all gates pass: time since last consolidation ≥ minHours, sessions since ≥ minSessions, and project memory count ≥ minMemories.
Read the gate state and thresholds:
_ST="$HOME/.mem0/mem0-dream-state.json"
_SET="$HOME/.mem0/settings.json"
echo "sessions_since=$(grep -o '"sessionsSince"[[:space:]]*:[[:space:]]*[0-9]*' "$_ST" 2>/dev/null | grep -o '[0-9]*$' || echo 0)"
echo "last_consolidated_ms=$(grep -o '"lastConsolidatedAt"[[:space:]]*:[[:space:]]*[0-9]*' "$_ST" 2>/dev/null | grep -o '[0-9]*$' || echo 0)"
echo "min_hours=$(grep -o '"minHours"[[:space:]]*:[[:space:]]*[0-9]*' "$_SET" 2>/dev/null | grep -o '[0-9]*$' || echo 24)"
echo "min_sessions=$(grep -o '"minSessions"[[:space:]]*:[[:space:]]*[0-9]*' "$_SET" 2>/dev/null | grep -o '[0-9]*$' || echo 5)"
echo "min_memories=$(grep -o '"minMemories"[[:space:]]*:[[:space:]]*[0-9]*' "$_SET" 2>/dev/null | grep -o '[0-9]*$' || echo 20)"
echo "now_s=$(date +%s)"
echo "dream_env=${MEM0_DREAM:-unset}"
For the memory count, reuse the project memory count from Check 3/4 (or call get_memories with the project filter, page_size=1, and read count).
Compute each gate:
- time:
hours_since = (now_s - last_consolidated_ms/1000) / 3600. Passes when≥ min_hours. Iflast_consolidated_msis 0 it has never run → time gate passes. - sessions: passes when
sessions_since ≥ min_sessions. - memories: passes when project memory count
≥ min_memories.
Report:
- If
dream_envisfalse/0/no/off, ordream.enabledis false in settings: WARN — "Auto-dream disabled". - If all three gates pass: PASS — "eligible (runs at next session start)".
- Otherwise: WARN — list the blocking gate(s), e.g.
sessions 2/5, memories 3/20. This is expected, not an error — auto-dream is just waiting. Note the user can run/mem0-dreamto consolidate now, or lower the thresholds via thedreamblock in~/.mem0/settings.json.
Display
## mem0 status
PASS API Key m0-dVe...
PASS Identity user=kartik, project=mem0, branch=main
PASS Default scope project
PASS Memory Tools 142ms
PASS Write/Read write + delete OK
PASS Session session_id=abc123, app_id=mem0, branch=main
WARN Auto-dream waiting — sessions 2/5, memories 3/20 (/mem0-dream to run now)
All checks passed.
The Auto-dream line is informational: WARN here means "waiting on gates", not a failure. Show PASS when eligible, or "disabled" when turned off.
If any check fails, add a ## Troubleshooting section with specific fix steps for each failure.
Extended mode: Memory Quality Analysis
When invoked with --deep (e.g., /mem0-status --deep), run the standard 6 checks above plus a memory quality scan.
Quality Check 1: Duplicates
Call get_memories with filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}, page_size=200. Compare all pairs within the same metadata.type group for high textual overlap (shared nouns/keywords > 60%). Report:
Potential duplicates: <N> pairs
[mem0:<id1>] ≈ [mem0:<id2>] — both about "<shared topic>"
Quality Check 2: Stale memories
Flag memories where:
metadata.typeissession_stateorcompact_summaryAND older than 90 daysmetadata.confidence< 0.3 AND older than 30 days
Stale candidates: <N>
[mem0:<id>] — session_state, 142d old
Quality Check 2b: Low-confidence memories
Flag memories where metadata.confidence < 0.5 (regardless of age). Report separately from stale:
Low-confidence memories: <N>
[mem0:<id>] — confidence=0.3, "<content preview>"
Quality Check 3: Contradictions
Within each metadata.type group, flag pairs that assert opposing facts about the same topic. Use semantic judgment — look for negation patterns, conflicting tool/framework choices, or reversed decisions.
Possible contradictions: <N>
[mem0:<idA>] vs [mem0:<idB>] — conflicting on "<topic>"
Quality Check 4: Orphan memories
Memories with no metadata.type set, or with metadata.type not in the 17 known coding categories. These were likely written without proper tagging.
Untagged/orphan memories: <N>
Quality summary
## Memory Quality
Duplicates: <N> · Stale: <N> · Contradictions: <N> · Orphans: <N>
If all counts are 0: Memory quality: clean.
If any non-zero: append Run /mem0-dream to fix.
To fix issues found by --deep, run /mem0-dream for automated consolidation (merges, prunes, conflict resolution).
Output formatting
IMPORTANT: Do NOT use markdown in your output. OpenCode TUI renders text verbatim — markdown like bold, ## headers, and | table | syntax appears as raw characters. Use plain text with indentation for structure. Use dashes for lists. Use spaces to align columns instead of markdown tables.
Frequently asked questions about Mem0 Status
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
