Resk-Security/Resk-LLM
Resk is a robust Python library designed to enhance security and manage context when interacting with LLMs. It provides a protective layer for API calls, safeguarding against common vulnerabilities and ensuring optimal performance. And safe layer again Prompt Injection.
Provides multi-layered defense through heuristic pattern matching, vector database semantic similarity checks against known attacks, and specialized detectors for PII, doxxing, invisible text, and malicious URLs. Integrates with OpenAI, Anthropic, Cohere, DeepSeek, and OpenRouter via a unified RESK orchestrator, plus FastAPI and HuggingFace frameworks, with optional lightweight scikit-learn alternatives to PyTorch dependencies. Includes canary token injection for detecting data leaks in responses and REGEX-based pattern management for custom security rules.
Available on PyPI.
Stars
16
Forks
3
Language
Python
License
Apache-2.0
Category
Last pushed
Dec 19, 2025
Monthly downloads
63
Commits (30d)
0
Dependencies
25
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/prompt-engineering/Resk-Security/Resk-LLM"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Higher-rated alternatives
protectai/llm-guard
The Security Toolkit for LLM Interactions
MaxMLang/pytector
Easy to use LLM Prompt Injection Detection / Detector Python Package with support for local...
agencyenterprise/PromptInject
PromptInject is a framework that assembles prompts in a modular fashion to provide a...
utkusen/promptmap
a security scanner for custom LLM applications
Dicklesworthstone/acip
The Advanced Cognitive Inoculation Prompt