Inspiration
In recent years, we've seen major corporations ban the use of LLMs due to severe data leaks (e.g., employees accidentally pasting proprietary code or database credentials into chat prompts). I realized that companies are missing out on the AI revolution out of fear. This inspired me to build Aegis — a bridge between enterprise security and AI productivity.
What it does
Aegis is a Zero-Trust AI Proxy Terminal. It acts as a secure middleware between the user and the LLM. When an employee types a prompt containing sensitive data (marked in brackets), Aegis intercepts the payload locally. It instantly encrypts the sensitive credentials and replaces them with placeholders before sending the sanitized prompt to the Gemini API. The AI processes the request without ever seeing the raw data, ensuring 100% Data Loss Prevention (DLP).
How I built it
I wanted enterprise-grade performance, so I divided the architecture into two main components:
- The UI & Backend: Written in Python using the
Textualframework to create a highly responsive, professional terminal user interface (TUI). I integratedpsutilfor real-time system telemetry (CPU/RAM monitoring). - The Crypto Engine: Instead of relying on slow Python string manipulation, I built a low-level Native C-Shared library (
.dylib). Python communicates with this C engine viactypes(Foreign Function Interface) to perform blazing-fast, memory-efficient data masking locally. - The AI: Google's Gemini 3.5 API handles the sanitized payloads and returns the analysis.
Challenges I ran into
The biggest challenge was bridging the gap between high-level Python and low-level C. Managing memory pointers and ensuring memory safety while passing strings back and forth via ctypes resulted in several segmentation faults early on. Additionally, designing a non-blocking, asynchronous terminal UI that updates live system metrics while waiting for network API calls required careful thread management and UI state handling.
Accomplishments that I'm proud of
I am extremely proud of achieving a true "Zero-Trust" architecture. Seeing the C-engine intercept and mask a database password in milliseconds—leaving the telemetry metrics at just 8% CPU usage on an Apple M1—was incredibly rewarding. I'm also proud of the enterprise-level UI that completely ditches the "chat-bot" look for a serious cybersecurity dashboard.
What I learned
I deepened my knowledge of Foreign Function Interfaces (FFI) and low-level memory management in C. I also learned how to build complex, reactive terminal interfaces using Python and how to structure a secure pipeline for AI interactions.
What's next for Aegis
The next steps involve implementing automatic PII (Personally Identifiable Information) detection using advanced Regex patterns, so the user doesn't have to manually bracket sensitive data. I also plan to add support for completely local, air-gapped LLMs as a fallback for ultra-classified data.


Log in or sign up for Devpost to join the conversation.