Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Prompt Injection Detection Python Packages

Python packages with the GitHub topic prompt-injection-detection. Sorted by monthly downloads, with stars and forks.
sunglasses-dev
sunglasses

Open source input firewall for AI agents, beta. A local scanner checks text, code, PDFs, images, QR codes, audio and video with 1,569 patterns across 117 categories and reports findings and incomplete scans. A Claude Code hook blocks secret material in tool calls and the paths and hosts your policy lists before tools run.

13K 11 3
arcjet
arcjet

Runtime security for AI apps and agents: prompt injection detection, tool-call authorization, sensitive-data redaction, bot protection, and rate limiting. Drop it into your Python code.

3K 34 2
0xsl1m
shadowshield

Unified open-source security shield for agentic AI systems — defense-in-depth prompt-injection protection (canary tokens, agent-trace alignment audit, tool-call guarding, PII/secret scanning).

1K 0 1
patronus-protect
patronus-api-client

Security scanner and runtime protection for AI coding agents. Detects prompt injection, secrets, PII, and unsafe tool activity across Codex, Claude Code, and DeepSeek Harness.

1K 2 0
arcjet
arcjet-sensitive-info-rampart

Runtime security for AI apps and agents: prompt injection detection, tool-call authorization, sensitive-data redaction, bot protection, and rate limiting. Drop it into your Python code.

1K 34 2
hermes-labs-ai
little-canary

Detects prompt injection by its effect on a sacrificial canary model, not just pattern matching: untrusted input hits a powerless model first, a behavioral check reads the residue, and it returns block, flag, or pass before your primary model acts. Inbound preflight sensor, not a guarantee.

933 43 8
jamjet-labs
jamjet-guardrails

Deterministic content guardrails for LLM and agent applications. Prompt injection in the encoding, PII, secrets and your own rules, with published precision and recall and provenance on every decision.

694 1 2
bastion-soft
bastion-prompt-protection

Lightweight prompt-injection detector built for AI agents, copilots, and LLM apps. Fast, local, calibrated.

594 10 3
lockllm
lockllm

Official Python SDK for LockLLM

582 0 0
esoteric1entity
ai-agent-shield

Defensive overlay for AI agents — an 8-layer security stack that inspects, sanitizes, audits, and blocks risky actions before they reach the host.

548 3 0
tollwarden
langchain-paysafe

Payment security firewall for x402 micropayments — advisory, non-custodial.

489 2 2
tollwarden
langchain-tollwarden

Payment security firewall for x402 micropayments — advisory, non-custodial.

444 2 2
dibakshya01
grey-panda

The calm guardian for AI, agent, and MCP code — a zero-dependency, standards-anchored AI security toolkit for developers and security reviewers.

440 1 1
tollwarden
agentkit-tollwarden

Payment security firewall for x402 micropayments — advisory, non-custodial.

421 2 2
tollwarden
crewai-paysafe

Payment security firewall for x402 micropayments — advisory, non-custodial.

409 2 2
bastion-soft
llama-index-postprocessor-bastion-guardrail

Lightweight prompt-injection detector built for AI agents, copilots, and LLM apps. Fast, local, calibrated.

408 10 3
tollwarden
agentkit-paysafe

Payment security firewall for x402 micropayments — advisory, non-custodial.

378 2 2
tollwarden
crewai-tollwarden

Payment security firewall for x402 micropayments — advisory, non-custodial.

299 2 2
MuhammadMohsinIbrahim
zirah-mcp

Zirah: open-source, offline-first security scanner for MCP servers. Catches tool poisoning, prompt injection and leaked secrets before your AI agent connects. CLI + SARIF for CI.

295 0 0
SarthiAI
sarthiai-drishti

Self-hostable content safety for LLM systems: prompt-injection detection, PII detection and redaction, and output-safety scoring. A Rust core that runs on your own hardware and returns calibrated scores, not verdicts. Ships as a Rust crate, Python and Node SDKs, an HTTP server, and a Docker image.

273 1 0
tollwarden
paysafe-x402

Payment security firewall for x402 micropayments — advisory, non-custodial.

240 2 2
yfedoseev
jailguard

Pure-Rust prompt-injection detector with 1.5MB embedded MLP classifier. 98.40% accuracy, p50 14ms CPU inference. Apache-2.0/MIT alternative to Rebuff (archived 2025) and Lakera Guard.

239 13 1
tollwarden
nemo-tollwarden

Payment security firewall for x402 micropayments — advisory, non-custodial.

237 2 2
occludra
aisg

Self-hosted AI security proxy. Redact PII, block prompt injection, route to any LLM provider. OpenAI-compatible.

236 52 5
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology