AegisDominus is a security-first AI proxy designed to protect Large Language Models (LLMs) from malicious misuse. It sits between the user and Google Gemini, providing real-time threat detection and granular observability that standard API calls lack.
Key Capabilities:
- Active Defense: Automatically detects and blocks "Jailbreak" attempts (e.g., prompt injection attacks) before they process.
- Deep Observability: Uses Datadog APM to trace every interaction, measuring token consumption, latency, and error rates per user.
- Reliability Engineering: Implements Service Level Objectives (SLOs) to guarantee 99% system uptime and performance.
- Email: Automated alert email pushed to your email id.
- Core Backend: Python (Flask)
- AI Engine: Google Vertex AI (
gemini-2.0-flash-001) - Observability: Datadog APM & Tracing
- Google Cloud Project with Vertex AI API enabled.
- Datadog Account (and API Key).
- Google Cloud CLI (
gcloud) installed and authenticated. (its easier to download the exe file to install gcloud CLI).
git clone https://github.com/PS-003R32/AegisDominus.git
cd AegisDominus
# Install dependencies
pip install -r requirements.txtAuthenticate using your local Google credentials to access the Gemini model:
# Login to Google Cloud via gcloud CLI
gcloud auth application-default login
# Set your Project ID (Required for Vertex AI)
export PROJECT_ID="your-google-project-id" #create one and check in the settings
export LOCATION="us-central1"Export your Datadog credentials directly in the terminal:
export DD_API_KEY="your_datadog_api_key_here"
export DD_SITE="us5.datadoghq.com" # Check your account (e.g., datadoghq.com)
export DD_ENV="devpost-demo" # optional
export DD_SERVICE="aegis-dominus" # optionalStart the server using the Datadog Tracer wrapper to enable observability.
[NOTE: I have used python venv to run this project. YOu may proceed without setting it up.]
ddtrace-run python src/app.pyTo demonstrate the security features, run the included traffic generator. This script simulates valid users and malicious attackers.
python traffic_generator.pyThe AegisDominus Command Center (Datadog Dashboard) visualizes the system's health and security status with 5 key widgets: [NOTE: You can find and download the datadog dashboard jason file in this repository to make it easier.]
- Total Tokens Generated: Tracks AI consumption costs (Query Value).
- Security Incidents: A real-time graph that spikes RED when http.status_code:403 (Blocked Attacks) occur.
- Traffic Volume: Monitors the heartbeat of total requests hitting the system.
- Security Rules: A "Monitor Summary" list that instantly flips from OK (Green) to ALERT (Red) during an attack.
- SLO Reliability: A live badge tracking our 99% uptime target over a 7-day window.
[Once you setup the simulation you will recieve email alerts sent automatically through Datadog]
This project is licensed under the MIT License – see the LICENSE file for details.


