Skip to content
Home AI Security Tools Prompt Inspector
Prompt Inspector

Prompt Inspector

NEW
Category: AI Security
License: Free (Open-Source) and Commercial
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated April 3, 2026
4 min read
Key Takeaways
  • Open-source security firewall for LLM applications with a 5-layer detection funnel: hash cache, keyword matching, semantic analysis, AI review, and arbitration.
  • Sub-50ms response times for most requests — hash cache layer provides near-zero latency for known threats, with 60-95% lower cost than LLM-only detection.
  • Integrates via REST API, Python SDK, Node.js SDK, and Model Context Protocol (MCP) server for Claude Desktop, Cursor, and VS Code Copilot.
  • Self-improving payload library with million-scale attack database that auto-enriches from every blocked threat in production.
  • AGPL-3.0 licensed with free tier (1,000 detections/month), pay-as-you-grow Pro plan, and enterprise on-premises deployment.

Prompt Inspector is an open-source prompt injection detection platform that protects LLM applications and AI agents from prompt injection attacks, jailbreak attempts, and sensitive content leaks using a 5-layer detection funnel architecture. It acts as a guardrail layer between untrusted user input and the language model, catching threats before they reach the LLM with sub-50ms response times. It is listed in the AI security category.

Instead of relying on a single model or a simple keyword list, Prompt Inspector passes each input through five progressive filtering stages — from a near-instant hash cache for known threats to semantic vector analysis and AI-powered review for novel attacks. This keeps latency low (most requests resolve in under 50ms) while still catching edge cases.

What is Prompt Inspector?

Prompt Inspector sits between your application and your LLM, inspecting every user input before it reaches the model. The 5-layer detection funnel acts as progressively finer filters — fast, cheap layers catch obvious threats early, while slower, more sophisticated layers handle ambiguous inputs that slip through.

The funnel approach means the platform does not need to invoke expensive AI review for every request. Known threats get caught by hash matching in microseconds, common attack patterns by keyword matching in milliseconds. Only genuinely ambiguous inputs escalate to the semantic and AI review layers.

5-Layer Detection Funnel
Progressive filtering from SHA-256 hash cache through keyword matching, semantic vector analysis, AI review, and score arbitration. Each layer catches threats the previous ones missed, keeping both latency and cost low.
Self-Improving Payload Library
Million-scale attack database that auto-enriches from every blocked threat in production. The system learns from real-world attacks to keep strengthening its detection over time.
Multi-Platform Integration
REST API, Python SDK, Node.js SDK, and MCP server for Claude Desktop, Cursor, and VS Code Copilot. Fits into any development workflow or production architecture.

Key Features

FeatureDetails
Detection Approach5-layer funnel: hash cache, keyword matching, semantic analysis, AI review, arbitration
Response Time10-42ms for most requests; near-zero for cached threats
Cost Efficiency60-95% lower cost, 2-7x faster than LLM-only detection
Payload LibraryMillion-scale, auto-enriched from production traffic
Threat TypesPrompt injection, jailbreaks, sensitive content, system prompt leaks
Tenant IsolationPer-app API keys, configuration, rate limits, and logs
Custom Word ListsPer-tenant sensitive word and regex pattern filtering
IntegrationREST API, Python SDK, Node.js SDK, MCP server, Anthropic Agent Skills
Self-HostingPython 3.11+, FastAPI, PostgreSQL + pgvector, Redis
LicenseAGPL-3.0 (open-source); commercial enterprise edition available

Detection Architecture

The 5-layer funnel processes each input through progressively deeper analysis:

LayerMethodSpeedPurpose
1. Hash CacheSHA-256 lookupNear-zero latencyInstantly blocks previously seen malicious inputs
2. Keyword MatchingAho-Corasick pattern matchingMicrosecondsCatches known attack patterns and sensitive words
3. Semantic AnalysisVector embeddings via pgvectorMillisecondsDetects meaning-level similarities to known attacks
4. AI ReviewLLM-based assessmentSlower, higher costEvaluates ambiguous edge cases that other layers cannot classify
5. ArbitrationScore aggregationFastCombines signals from all layers into a final confidence score and decision

Most malicious inputs are caught by layers 1-3, which are fast and cheap. The AI review layer (layer 4) only fires for inputs where the earlier layers produce ambiguous signals, keeping overall cost low.

Tenant Isolation

Prompt Inspector supports multi-tenant deployments where each application gets its own isolated environment. Each tenant has dedicated API keys, custom configuration (including sensitive word lists), independent rate limits, and separate logging. This makes it practical for organizations running multiple LLM applications with different threat profiles.

Custom Sensitive Word Lists

Beyond the built-in detection layers, each tenant can define custom sensitive word and regex pattern lists. These are matched in layer 2 (keyword matching) using high-performance Aho-Corasick automaton algorithms, adding organization-specific filtering without impacting detection speed.

Getting Started

1
Choose your integration method — Pick from REST API (any language), Python SDK (pip install prompt-inspector), Node.js SDK (npm install prompt-inspector), or MCP server for IDE integration with Cursor, VS Code, or Claude Desktop.
2
Sign up or self-host — Use the cloud service at promptinspector.io (free tier: 1,000 detections/month, no credit card) or self-host the open-source version with Python 3.11+, FastAPI, PostgreSQL with pgvector, and Redis.
3
Get your API key — Each application gets its own tenant with a dedicated API key. Configure tenant-specific settings including custom sensitive word lists and rate limits.
4
Integrate into your pipeline — Add Prompt Inspector between your application and LLM endpoint. All user inputs pass through the detection funnel before reaching the model. Integration typically requires adding a few lines of code at the LLM call point.
5
Monitor and refine — Review detection logs to tune sensitivity. The self-improving payload library automatically learns from blocked threats, but custom word lists and tenant configuration let you fine-tune for your specific use case.

When to Use Prompt Inspector

Prompt Inspector works well for development teams building LLM-powered applications that need prompt injection protection without adding significant latency or cost. The multi-layer funnel is particularly effective when you need real-time detection (the hash cache and keyword layers respond in microseconds), cost efficiency (most threats get caught before reaching the expensive AI review layer), and self-hosted control (the open-source version runs on your infrastructure with no external dependencies).

Best for
Development teams building LLM-powered applications that need a fast, cost-efficient prompt injection detection layer. The 5-layer funnel architecture, self-hosting option, and multi-platform SDK support (Python, Node.js, MCP) make it a practical choice for teams that want open-source control over their security layer.

How Prompt Inspector Compares

Prompt Inspector focuses on input-side detection — catching malicious prompts before they reach the model. For a commercial prompt injection API with large-scale training data, see Lakera Guard. For output-side guardrails that also validate LLM responses, consider LLM Guard or NeMo Guardrails. For full inference-layer security with policy-based access controls, look at CalypsoAI or Prompt Security.

For pre-deployment vulnerability scanning rather than runtime detection, see Augustus, Garak, or FuzzyAI.

For a broader overview of AI security tools, see the AI security tools category page.

Frequently Asked Questions

What is Prompt Inspector?
Prompt Inspector is an open-source security platform that detects prompt injection attacks, jailbreak attempts, and sensitive content targeting LLM applications and AI agents. It uses a 5-layer detection funnel — hash cache, keyword matching, semantic analysis, AI review, and arbitration — to catch threats before they reach the language model.
Is Prompt Inspector free?
Prompt Inspector is open-source under the AGPL-3.0 license for non-commercial use. The cloud service offers a free tier with 1,000 detections per month (no credit card required), a Pro plan with pay-as-you-grow pricing, and an Enterprise plan with private/on-premises deployment. Self-hosting the open-source version is free.
How fast is Prompt Inspector?
Most requests resolve in under 10-42ms. The first layer (SHA-256 hash cache) provides near-zero latency for previously seen threats. The multi-layer architecture means most malicious inputs are caught by the faster early stages, with the slower AI review layer only invoked for ambiguous edge cases. This results in 60-95% lower cost and 2-7x faster processing than LLM-only detection approaches.
How does Prompt Inspector compare to Lakera Guard?
Both focus on prompt injection detection for LLM applications. Prompt Inspector uses a 5-layer funnel architecture with progressively deeper analysis — starting from hash cache and keyword matching, escalating to semantic analysis and AI review only when needed. Lakera Guard uses a proprietary ML model trained on a large attack dataset with sub-50ms API latency. Prompt Inspector is open-source (AGPL-3.0) and self-hostable; Lakera Guard is commercial SaaS.
Can Prompt Inspector be self-hosted?
Yes. The open-source version can be self-hosted using Python 3.11+ with FastAPI, PostgreSQL with pgvector, and Redis. The enterprise edition also supports private on-premises deployment with dedicated support and custom integrations.