sentinelproxy-langchain
v0.1.0
Published
LangChain.js callback handler that mirrors LLM calls to SentinelProxy for self-healing evaluation.
Maintainers
Readme
sentinelproxy-langchain
A LangChain.js callback handler that mirrors every LLM call to SentinelProxy — the self-healing layer for AI agents (hallucination, prompt-injection and PII detection, plus auto-healed system prompts).
Install
npm install sentinelproxy-langchain@langchain/core is a peer dependency you'll already have.
Usage
import { SentinelProxyCallbackHandler } from "sentinelproxy-langchain";
const handler = new SentinelProxyCallbackHandler({
apiKey: "sk_sentinel_…", // dashboard → project → Connect
systemPrompt: "You are a support agent for Acme.",
});
await llm.invoke(messages, { callbacks: [handler] });Pass the handler per-call as above, or attach it at construction with
callbacks: [handler] to apply it to every call.
Logging is best-effort and off your critical path — failures are swallowed so it can never break the chain. PII is scrubbed at the SentinelProxy edge before anything is stored.
Build & publish
npm install
npm run build
npm publish # unscoped public packageLicense
MIT
