Integration

Scan LangChain and LangGraph for memory poisoning, prompt injection and leaked secrets

Agents built with LangChain store memory in a vector store, and LangGraph agents (including LangMem) keep long-term memory in a LangGraph store. Mimvo scans the store object your code already builds, so it sees exactly what the agent retrieves, and reports the documents or items to review, quarantine or delete.

Install#

Mimvo is an open-source Python package for Python 3.11+, published on PyPI. The langchain extra adds langchain-core for LangChain vector stores. For a LangGraph or LangMem store, install the langgraph extra instead.

bash
pip install "mimvo[langchain]"      # LangChain vector storespip install "mimvo[langgraph]"   # LangGraph / LangMem stores

Scan LangChain and LangGraph 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 langchain \  --factory myapp.memory:store \  --namespace memories \  --report report.html
mimvo scan langchain options
OptionWhat it does
--factorymodule:attr of a store, or of a function or class that returns one.
--namespaceLangGraph namespace prefix, such as memories/alice.
--text-fieldKey in each LangGraph item that holds the text.
  • --factory takes module:attr, imported from the current directory the way uvicorn app:app is: a store, or a function or class that returns one.
  • For a LangGraph store, --namespace limits the scan to a namespace prefix such as memories/alice, and --text-field names the item key that holds the text.
  • Mimvo lists and fetches documents or items. It never adds, updates or deletes them.

Scan from Python#

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

python
from pathlib import Pathfrom langgraph.store.memory import InMemoryStorefrom mimvo import Mimvofrom mimvo.scan import LangGraphStoreScanSource, render_htmlstore: InMemoryStore = ...  # the store your agent writes tosource = LangGraphStoreScanSource(store, namespace=("memories",))report = Mimvo().scan(source)report.source = "langgraph:memories"Path("report.html").write_text(render_html(report), encoding="utf-8")

What Mimvo finds in LangChain and LangGraph#

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 langchain \  --factory myapp.memory:store \  --namespace memories \  --fail-on high \  --sarif mimvo.sarif \  --markdown "$GITHUB_STEP_SUMMARY"

Is it safe to run against production LangChain and LangGraph?#

Lists and fetches documents or items. Never adds, updates, or deletes.

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#