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.
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.

9K 32 2
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.

7K 10 3
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.

4K 32 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.

3K 39 9
dibakshya01
grey-panda

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

2K 1 1
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.

780 2 0
bastion-soft
bastion-prompt-protection

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

458 10 3
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.

441 1 0
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.

377 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.

360 3 0
lockllm
lockllm

Official Python SDK for LockLLM

275 0 0
occludra
occludra

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

204 46 4
occludra
aisg

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

188 46 4
yfedoseev
jailguard

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

171 12 1
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.

170 1 0
jamjet-labs
jamjet-guardrails-validators

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.

127 1 0
SarthiAI
sarthiai-drishti-sdk

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.

124 1 0
jamjet-labs
jamjet-guardrails-nemo

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.

121 1 0
bastion-soft
llama-index-postprocessor-bastion-guardrail

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

77 10 3
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology