71dc0cae07
The Python plugin core and the opencode, pi and deepseek plugins now fall back to the key `mem0 init` saves in ~/.mem0/config.json, so a configured CLI is enough to authenticate. The Python core also stops using or caching a literal ${api_key} left behind when a host (Cursor) does not expand its plugin variables, which is what kept asking for auth after the key was set.
Fixes #7346
26 lines
1.4 KiB
Markdown
26 lines
1.4 KiB
Markdown
---
|
|
name: status
|
|
description: Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.
|
|
disable-model-invocation: false
|
|
---
|
|
|
|
# Memory status
|
|
|
|
Run both commands and report the combined result in plain language:
|
|
|
|
```bash
|
|
python3 "${CLAUDE_PLUGIN_ROOT}/core/memory_cli.py" --harness "claude-code" --plugin-data-dir "${CLAUDE_PLUGIN_DATA}" status --json
|
|
python3 "${CLAUDE_PLUGIN_ROOT}/core/memory_cli.py" --harness "claude-code" --plugin-data-dir "${CLAUDE_PLUGIN_DATA}" doctor
|
|
```
|
|
|
|
Summarize, using only fields the JSON actually reports: whether capture is
|
|
active or paused, the user ID and repository scope (`repo_id`), whether an
|
|
API key is configured, the event/flush/retrieval counts (`flushes` is the
|
|
number of completed flushes, not a pending count), and the doctor check
|
|
results. If doctor reports an authentication failure (401 / invalid key), say
|
|
clearly that the Mem0 API key is invalid or expired and that memories are NOT
|
|
being created. Never report an auth failure as "no memories found". When the
|
|
key is missing or invalid, suggest updating the plugin's API key setting,
|
|
exporting `MEM0_API_KEY`, or running `mem0 init` (the plugin reads the key the
|
|
Mem0 CLI saves in `~/.mem0/config.json`).
|