LLMVerify
Local-First Verification and Guardrails for LLM Inputs, Outputs, and Behavior.
You shipped an AI feature. Your LLM hallucinated a citation, leaked a customer's email, and followed a prompt-injection buried in user input — on the same day. LLMVerify is the safety layer that sits between your LLM and your users.
What you get
One npm install. Zero telemetry. No API keys on the free tier. Everything runs locally — deterministic, pattern-based engines with no model calls and no network on the free tier.
| Function | One-liner |
|---|---|
| verify(content) | await verify(aiResponse) |
| isInputSafe(input) | isInputSafe(userMessage) |
| redactPII(text) | redactPII(aiResponse) |
| containsPII(text) | containsPII(text) |
| detectAndRepairJson(...) | detectAndRepairJson(prompt, response) |
| monitorLLM(client) | monitorLLM(openaiClient) |
| sentinel.quick(...) | await sentinel.quick(client, model) |
| classify(...) | classify(prompt, response) |
| auditLog(event) | auditLog({ ... }) |
| run, prodVerify, ciVerify | await prodVerify(content) |
Tap a row to see description. Table is best viewed on larger screens.
Quick start (30 seconds)
Three lines of safety between your LLM and your users. No config file required. No API key required.
$ npm install llmverifyconst { verify, isInputSafe, redactPII } = require('llmverify');
// 1. Block prompt injection before it reaches the model.
if (!isInputSafe(userMessage)) {
return { error: 'Invalid input detected' };
}
// 2. Verify the model's output.
const aiResponse = await yourLLM.generate(userMessage);
const result = await verify(aiResponse);
if (result.risk.level === 'critical') {
return { error: 'Response failed safety check' };
}
// 3. Strip PII before the response reaches a user or a log.
const { redacted } = redactPII(aiResponse);
console.log(redacted);limitations array.How it works
LLMVerify runs deterministic, pattern-based engines locally — no model calls, no network on the free tier. Same input plus same rules equals same result. Every result carries an explicit limitations array stating what was and was not checked, so you never mistake a clean score for a guarantee.
Zero telemetry
Free tier makes zero network requests. No data leaves your environment.
Pattern-based
Deterministic engines - no probabilistic AI evaluating AI. Reproducible results.
Explicit limitations
Every result includes a limitations array. You always know what was not checked.
Runtime monitoring
monitorLLM wraps any client and tracks latency, token drift, and behavioral changes.
CLI
Verify from the terminal or start a local HTTP API for IDE / tool integration.
$ npx llmverify verify "The capital of France is London."Verify a string from the terminal
$ npx llmverify-serve --port=9009Start local HTTP API (localhost only by default)
$ npx llmverify-serve --host=0.0.0.0 --port=9009Expose to network on trusted network only — no auth on the API
Server defaults
Binds to 127.0.0.1 by default, restricts CORS to localhost origins, and rate-limits clients (100 requests / 60s). Requires express (optional dependency that installs by default).
Framework Alignment
Baseline mapping only — not certification
Framework mappings describe alignment only. LLMVerify does not certify compliance with any framework. These mappings help you understand where LLMVerify checks fit within broader control objectives — they are not evidence of compliance.
What LLMVerify Cannot Prove
LLMVerify is a triage tool, not a truth oracle. Be honest with yourself about what it can and cannot do.
- Cannot definitively prove hallucinations — signals are pattern-based, not ground-truth verification
- Does not replace human review — use to triage, not to approve
- PII detection is regex-based (~90% for standard formats, lower for variations)
- Prompt-injection detection is pattern-based — novel or obfuscated injections can evade it
- Free tier is 100% local — ML-enhanced features require paid tier and explicit API key
- No MCP server — integration via SDK, CLI, or local HTTP only
Recommendation (not legal advice): Run verify() on every model output that reaches a user, and isInputSafe() on every user input that reaches a model. Treat the risk level as a triage signal, not an approval.
Integration: SDK, CLI, or local HTTP — not MCP
LLMVerify does not expose an MCP server. Integrate via the npm SDK, the npx llmverify CLI, or the local HTTP API (npx llmverify-serve). Do not fabricate MCP support.
Use with your tools
This package does not expose an MCP server. Integrate via the methods below.
CLI
$ npx llmverify verify "Your text here"Local HTTP API
$ npx llmverify-serve --port=9009SDK
$ npm install llmverifyconst { verify, isInputSafe, redactPII } = require('llmverify');
const result = await verify(aiResponse);
if (result.risk.level === 'critical') {
return { error: 'Response failed safety check' };
}Copyable agent recipes
Run npx llmverify verify "<output>" and report the risk level. If risk is critical or high, do not show the output to the user without review.
Use isInputSafe() from the llmverify SDK to check user input before sending it to the LLM. If it returns false, block the input.
Use redactPII() from the llmverify SDK to strip emails, phones, SSNs, credit cards, and API keys from the AI response before logging or displaying it.