Integration

Scan mem0 for memory poisoning, prompt injection and leaked secrets

mem0 extracts facts from conversations and saves them as long-term memories for each user or agent. Mimvo reads those memories, through your open-source config file or the mem0 platform API, and reports which ones to review, quarantine or delete. It never adds, updates or deletes a memory.

Install#

Mimvo is an open-source Python package for Python 3.11+, published on PyPI. The mem0 extra adds the mem0 client and nothing else.

bash
pip install "mimvo[mem0]"

Scan mem0 from the command line#

One command reads every record, runs the secrets, injection and poisoning checks, and writes a self-contained HTML report you can forward.

bash
mimvo scan mem0 \  --config mem0_config.yaml \  --report report.html
mimvo scan mem0 options
OptionWhat it does
--configmem0 config file (open source).
--api-keymem0 platform key. Defaults to MEM0_API_KEY.
--user-idOnly this user's memories. One of the ids is required on the platform.
--agent-idOnly this agent's memories.
--run-idOnly this run's memories.
  • Open source: pass --config with the same file your app passes to Memory.from_config.
  • Platform: pass --api-key (defaults to MEM0_API_KEY) and one of --user-id, --agent-id or --run-id.
  • Leave out the ids on the open-source store to scan every memory, or set --user-id to scan one user.

Scan from Python#

The same scan from your own code, for a scheduled job or a notebook.

python
from pathlib import Pathfrom mem0 import Memoryfrom mimvo import Mimvofrom mimvo.scan import Mem0ScanSource, render_htmlmemory = Memory.from_config(config)  # the same config your app usessource = Mem0ScanSource(memory)report = Mimvo().scan(source)report.source = "mem0:all"Path("report.html").write_text(render_html(report), encoding="utf-8")

What Mimvo finds in mem0#

Thirteen finding codes across three checks. Each finding comes with a severity, a recommended action, the evidence (secrets masked), fix steps, and an OWASP and CWE mapping. Details are in the finding code reference.

Mimvo finding codes
FindingCodeSeverityAction
Leaked secretsecret_detectedCriticaldelete
Personal datapii_detectedMediumreview
Hidden instructionpersistent_instructionHighreview
Canary instruction droppedknown_answerMediumreview
Injection embeddingembedding_injectionMediumreview
Poisoned factmemory_poisoningHighquarantine
Destination redirectdestination_redirectHighreview
Adversarial textadversarial_textMediumreview
Tampered vectorembedding_mismatchMediumquarantine
Contradicts older memorytemporal_contradictionMediumreview
Answer flipretrieval_flipMediumreview
Poisoning clusterpoisoning_clusterLowreview
Retrieval hubhub_recordLowreview

Gate CI on the results#

Fail the job on high-severity findings, send results to GitHub code scanning as SARIF, and put a summary on the run page. See Use in CI for a full GitHub Actions workflow.

bash
mimvo scan mem0 \  --config mem0_config.yaml \  --fail-on high \  --sarif mimvo.sarif \  --markdown "$GITHUB_STEP_SUMMARY"

Is it safe to run against production mem0?#

Reads with get_all and the vector store's list. Never adds, updates, or deletes memories.

The default detectors run on your machine with no API key and no model download, so memory text does not leave it. Secret values are masked in every report. Hosted detectors are opt-in.

Try it without connecting anything

Open the live dashboard to browse a sample scan, or read the guide to AI agent memory poisoning.

Other integrations#