Inspiration
Every AI model deployed in production today has no immune system. Static guardrails, regex filters, and keyword blockers fail the moment a novel jailbreak or prompt injection appears. Watching real enterprise AI systems get compromised by zero-day attacks with no automated defense inspired me to ask: what if an AI system could heal itself, exactly like a biological immune system?
What It Does
VaxGuard is an autonomous AI immune system built on three biological principles:
Innate Immunity — A fast-path LRU cache and anomaly detector inspects every incoming prompt for semantic drift, Shannon entropy anomalies, and token obfuscation signatures in under 15ms.
Adaptive Vaccination — When an attack breaches defenses, a 3-step self-reflective synthesis chain automatically manufactures a targeted system prompt vaccine that neutralizes the exact attack vector without affecting general model performance.
Immune Memory — Every synthesized vaccine is stored persistently in SQLite and hot-loaded into memory. Future interactions inherit cumulative immunization. The system gets stronger with every attack it survives.
Zero-Day Auto-Immunity — When runtime semantic drift crosses a cosine similarity threshold of 0.65, VaxGuard synthesizes and hot-patches an emergency vaccine into memory in under 500ms — with zero server restarts and zero model downtime.
The platform supports 8 major LLM providers including OpenAI, Anthropic Claude, Google Gemini, Groq, DeepSeek, Mistral, Together AI, and any custom local endpoint.
How I Built It
- Backend: Python 3.11, Flask, WebSockets for real-time telemetry streaming
- AI Core: Multi-provider LLM client with provider-agnostic routing across 8 ecosystems
- Anomaly Detection: TF-IDF semantic baseline + cosine similarity drift measurement
- Immune Memory: SQLite with persistent vaccine and event log tables
- Frontend: Vanilla HTML/CSS/JS with Chart.js radar visualization and glassmorphism UI
- Testing: 81/81 pytest tests passing
Challenges I Ran Into
The hardest engineering challenge was building a self-reflective vaccine synthesis chain that generates genuinely effective defense prompts without introducing new attack surfaces. A naive synthesis approach would produce vaccines that blocked the target attack but inadvertently weakened the model against adjacent vectors. The solution required a 3-stage critique-and-refine loop where VaxGuard evaluates its own generated vaccine before deployment, rejecting it if it fails internal safety benchmarks.
The second major challenge was calibrating the anomaly detector's cosine similarity threshold. Too sensitive and legitimate prompts trigger false positives. Too permissive and novel attacks slip through. Achieving near-zero false positives while maintaining high detection sensitivity across 6 attack taxonomies required extensive empirical tuning against the adversarial evaluation suite.
Accomplishments I'm Proud Of
- 100% immunity score across all 6 attack taxonomies after vaccination
- Sub-15ms fast-path detection latency via LRU caching
- Zero-day hot-deployment in under 500ms without server restarts
- 100+ synthesized vaccines stored and active in immune memory
- All pytest tests passing
- Complete 4-phase autonomous demo pipeline working live
- Solo build — designed, engineered, and shipped entirely by one person
What I Learned
Biological immune systems are not just a metaphor — they are the correct engineering blueprint for AI security. The three-layer architecture of innate immunity, adaptive response, and persistent immune memory maps perfectly onto the problem of defending LLMs against evolving adversarial attacks.
The most important insight was that static defenses are fundamentally broken by design. Any rule written today becomes obsolete the moment an attacker finds a novel phrasing. The only sustainable defense is a system that learns, adapts, and remembers — exactly like a living organism. VaxGuard proved this architecture is technically achievable with sub-500ms response times and zero model downtime.
What's Next
VaxGuard is the proof of concept for a production enterprise AI security platform. The next phase is rebuilding the core runtime in Rust for 10x performance improvement, targeting enterprise multi-agent deployments specifically — the fastest growing and least protected attack surface in AI today.
The commercial roadmap includes SOC 2 Type 1 certification, a visual threat monitoring dashboard for enterprise security teams, and regulatory compliance audit trails for GDPR, HIPAA, and EU AI Act requirements. The open-core model — free runtime for developers, enterprise cloud layer for organizations — follows the proven path of GitLab and Hashicorp.
The problem VaxGuard solves is not going away. Every enterprise deploying AI agents in production is running without an immune system right now. VaxGuard changes that.
Built With
- anthropic-claude-api
- chart.js
- flask
- groq
- html
- javascript
- openai-api
- python
- scikit-learn
- sqlite
- tf-idf
- websockets
Log in or sign up for Devpost to join the conversation.