Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

🛡️ Spatial AI Gateway — Enterprise 5-Layer Guardrail Engine

FastAPI Python Docker License: MIT

An ultra-low latency, multi-layer AI Security Gateway designed to protect LLM applications against prompt injections, system leaks, SQL injections, and PII exposure before hitting downstream LLMs.


⚡ Key Features & Benchmarks

  • Sub-30ms Asynchronous Gateway: Uses fast-path regex validation & non-blocking execution routines.
  • 5-Layer Defense-in-Depth:
    • L1: Input & SQL Guard: Drops malicious SQL vectors instantly.
    • L2: Vector Shield (ChromaDB): Semantic similarity detection for known threat vectors.
    • L3: Jailbreak & System Prompt Leak Guard: Blocks DAN prompts & extraction attempts.
    • L4: Scope Restriction: Restricts LLM responses strictly to domain parameters.
    • L5: Output Scrubber: Redacts sensitive PII (Emails, Phones) in real time.
  • Interactive Streamlit Sandbox: Real-time visual threat neutralization testing dashboard.

🏗️ Architecture Flow

[Incoming Prompt] ──> [L1: SQL Guard] ──> [L2: Vector Shield] ──> [L3: Jailbreak Filter] │ [Sanitized Response] <── [L5: Output Scrubber] <── [LLM Processing] <───┘


🚀 Quickstart

1. Clone & Install Dependencies

git clone [https://github.com/Rehanguards/first_ai_guardrails.git](https://github.com/Rehanguards/first_ai_guardrails.git)
cd first_ai_guardrails
pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages