langgraph 1.2 and langchain-core 1.7 in Python, with promptguard-sdk 2.4.
Auto-instrumentation
Callinit() before the graph is built. Every model call made through a patched SDK is scanned, in whichever node it happens, sync or async. A block raises PromptGuardBlockedError out of graph.invoke().
Guarding a node’s input
To scan, and redact, a value before a node uses it, invoke the inline guard inside the node. On a redact decision it returns the redacted value; on a block it raises.Callback handler
PassPromptGuardCallbackHandler in the graph’s config and it scans every model call made in any node. It needs promptguard-sdk 2.4.0 or later. The graph’s thread_id is sent as the session id.
Proxy
AChatOpenAI pointed at the proxy works in a graph like anywhere else, in Python or LangGraph.js.
Next steps
LangChain
Auto-instrumentation, an LCEL guard, or the proxy
Agent traces
Submit a full agent run to catch multi-step attacks
Auto-instrumentation
Which provider calls
init() patches, and which it does not