Skip to content

"Universal AI security framework - Protect LLM applications from prompt injection, jailbreaks, and adversarial attacks. Works with OpenAI, Anthropic, LangChain, and any LLM."

License

Notifications You must be signed in to change notification settings

Neural-alchemy/promptshield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PromptShields

Enterprise LLM Security in 3 Lines of Code

PyPI Python License Downloads

Stop prompt injection, jailbreaks, and data leaks in production LLM applications.


Installation

pip install promptshields

Basic Usage

from promptshield import Shield

shield = Shield.balanced()
result = shield.protect_input(user_input, system_prompt)

if result['blocked']:
    return {"error": "Unsafe input detected"}

That's it. Production-ready security in 3 lines.


Why PromptShields?

Feature PromptShields DIY Regex Paid APIs
Setup Time 3 minutes Weeks Days
Cost Free Free $$$$
Privacy 100% Local Local Cloud
Accuracy 98% ~60% ~95%
ML Models Included None Black box

What We Block

  • ✅ Prompt injection attacks
  • ✅ Jailbreak attempts
  • ✅ System prompt extraction
  • ✅ PII leakage
  • ✅ Session anomalies

Don't use one shield everywhere. Layer them strategically:

Security Modes

Choose the right tier for your application:

Shield.fast()       # ~1ms  - High throughput (pattern matching)
Shield.balanced()   # ~2ms  - Production default (patterns + session tracking)
Shield.strict()     # ~7ms  - Sensitive apps (+ 1 ML model + PII detection)
Shield.secure()     # ~12ms - Maximum security (+ 3 ML models ensemble)

Documentation

📚 Full Documentation - Complete guide with framework integrations

Quickstart Guide - Get running in 5 minutes


License

MIT License - see LICENSE


Links


Built by Neuralchemy

About

"Universal AI security framework - Protect LLM applications from prompt injection, jailbreaks, and adversarial attacks. Works with OpenAI, Anthropic, LangChain, and any LLM."

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages