protectai/rebuff
Self-hardening prompt injection detector that protects AI applications from malicious prompt attacks.

Rebuff is a security framework designed to protect AI applications from prompt injection attacks through multiple defensive layers. It uses heuristics to filter malicious input before it reaches the LLM, employs a dedicated LLM to analyze incoming prompts and identify potential attacks, stores embeddings of previous attacks in a vector database to recognize and prevent similar threats, and uses canary tokens to detect prompt leakages. Available as TypeScript and Python SDKs with self-hosting options.