AWS Builder Center
Architecting Sovereign Gen AI for Security: Lessons from Building AEGIS

Architecting Sovereign Gen AI for Security: Lessons from Building AEGIS

A deep dive into developing an on-premise, agentic Gen AI platform using Qwen 2.5:7B and RAG to enhance cybersecurity, grounded in architectural learnings from the Smart India Hackathon.

CS student passionate about AI, cloud infrastructure, and solving real-world problems
Building secure, intelligent systems requires balancing the powerful analytical capabilities of Generative AI with strict data sovereignty requirements. During the development of AEGIS (Agentic Explainable Gen AI Intelligence for Security) alongside Team KernelRaise for the Smart India Hackathon 2026, the core challenge was evident: how do we leverage large language models for threat analysis while keeping sensitive security data and infrastructure strictly on-premise?
This article explores the architecture behind a sovereign AI security platform, detailing how integrating open-source models like Qwen 2.5:7Bwith Retrieval-Augmented Generation (RAG) creates explainable, actionable, and secure intelligence
### In the Architecture:
To ensure data sovereignty, the system was designed to run within localized, secure environments without relying on external API calls that could expose sensitive log data.
  • Model Selection for the Edge/On-Prem: We utilized Mistral 7B due to its optimal balance of performance and resource efficiency. This allowed the model to be effectively deployed in restricted, on-premise cloud instances without requiring massive GPU clusters for inference.
  • Retrieval-Augmented Generation (RAG): A base LLM lacks the specific context needed for robust cybersecurity. By grounding the model in dedicated security databases (such as CVE databases, local network topologies, and live threat intelligence feeds), we drastically reduced hallucination. The AI's responses were highly accurate and contextualized to real-world threats.
  • Agentic Framework: Moving beyond a simple chat interface, we implemented an agentic architecture utilizing Java and Spring AI. This allowed the AI to operate autonomously—analyzing logs, interpreting security events, and proposing remediation strategies without requiring constant human prompting.

Bridging the Gap:
Cloud Infrastructure and Sovereign AI

While AEGIS focused heavily on sovereign, on-premise deployment, participating in diverse events like the Amazon ML Challenge and the FortyGuard Hackathon reinforced a critical lesson about modern AI pipelines: hybrid approaches are often necessary.
Developing locally means inevitably hitting compute ceilings during the training phase. The ideal modern AI pipeline utilizes scalable cloud instances for the heavy lifting of data processing and model fine-tuning. Once the model is optimized, the finalized weights and RAG vector stores are pushed down to sovereign, secure environments for actual inference and deployment.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article