Inspiration
The cybersecurity industry is losing the race against time. According to the latest IBM Cost of a Data Breach Report, the average Total Breach Lifecycle is 258 days (194 days to identify, 64 days to contain). Meanwhile, AI-driven attacks can compromise a server in milliseconds.
We realized that traditional SIEMs (Security Information and Event Management) are fundamentally flawed because they are passive. They act as news reporters, alerting humans who are often asleep, overwhelmed, or too slow to react.
We asked: "What if the security system didn't just watch? What if it fought back?"
This inspired AEGIS: An attempt to shift the paradigm from "Passive Alerting" to "Active Autonomous Defense," collapsing that 258-day lifecycle down to 15 seconds.
What it does
AEGIS is an event-driven, autonomous AI swarm that lives inside your infrastructure. It replaces the "Alert -> Analyst -> Investigation -> Patch" manual workflow with an instantaneous, automated loop:
- Detects: It monitors live logs using Elastic Watcher. It doesn't wait for a human to query it; it reacts to anomalies (like SQL Injection patterns) in real-time.
- Investigates: The Agent wakes up and uses ES|QL (Elasticsearch Query Language) to perform forensics, isolating the attacker's IP and payload.
- Reasons: It uses ELSER (Elastic Learned Sparse EncodeR) to perform a Semantic Vector Search across the application's source code. It locates the exact file and line number responsible for the vulnerability.
- Deceives: It dynamically updates the network layer (Nginx) to reroute the attacker into a Docker Honeypot, trapping them in a fake environment to protect real data.
- Remediates: It generates a cryptographic patch and presents it to a human operator via the "God Mode" Command Center for a one-click approval.
How we built it
We architected AEGIS as a distributed system running entirely on Elastic Cloud Serverless.
- The Nervous System: We deployed a local Docker Swarm containing a vulnerable Python application and Nginx. We used Filebeat to stream JSON logs to Elastic, where Watcher acts as the autonomous trigger mechanism.
- The Brain (Elastic Agent Builder): Initially, we attempted to build the orchestration logic from scratch using custom Python scripts. We spent days fighting "The Hallucination Wall" and tool-calling states. By shifting to the native Elastic Agent Builder UI, we rebuilt and optimized the entire reasoning swarm in just 4 hours. We defined custom tools that allow the LLM to query Elastic directly using ES|QL.
- The Memory (RAG): We utilized ELSER to ingest our codebase. This allows the agent to find "vulnerable login logic" based on semantic meaning, not just keyword matching.
- The Interface: We built a high-performance Streamlit dashboard that visualizes the "Neural Stream" of the agent's thoughts and provides the Human-in-the-Loop approval mechanism.
Challenges we ran into
- The "Hallucination Wall": Early versions of the agent would invent non-existent tools or try to patch files that didn't exist. We solved this by implementing a Strict Schema Enforcement layer in our middleware, forcing the LLM to adhere to a rigid protocol.
- The Authentication War: Connecting local Filebeat instances to Elastic Serverless proved difficult due to strict security policies. We had to engineer a custom Encoded Header authentication flow to ensure secure, uninterrupted log streaming.
- Latency vs. Accuracy: We struggled to balance speed with safety. We optimized our ES|QL queries to run in sub-milliseconds, allowing the agent to make decisions faster than a human could blink.
Accomplishments that we're proud of
- Full Stack Utilization: We didn't just use Elastic as a database. We leveraged Filebeat, Watcher, ES|QL, ELSER, and Serverless. We squeezed every drop of value out of the stack.
- Real-Time ROI: We successfully demonstrated a reduction in Mean Time To Resolve (MTTR) from industry averages of days/weeks down to <15 seconds in our live demos.
- Active Deception: Successfully routing a live
curlattack into a separate Honeypot container without dropping the connection was a massive engineering win. It looks like magic. - Safe Autonomy: We are proudest of the "Human-in-the-Loop" design. We proved that AI can be powerful without being reckless.
What we learned
- Developer Velocity: We learned that dedicated frameworks like Elastic Agent Builder provide a 10x speed advantage over manual orchestration. It turned a complex engineering hurdle into a streamlined configuration.
- Vector Search is for Code: We found that ELSER understands the intent behind code. It identified vulnerabilities that standard scanners missed by understanding the context of the logic.
- Event-Driven AI is the Future: An AI Agent is useless if it sits waiting for a prompt. The true power of "Agentic AI" is unlocked when it is triggered by observability pipelines, transforming it from a chatbot into a digital employee.
What's next for AEGIS: Autonomous Cyber-Defense Swarm
- Multi-Vector Defense: Currently, we handle SQL Injection. We plan to expand the Vector Store to recognize XSS, RCE, and DDoS patterns.
- Federated Learning: We want to allow multiple AEGIS instances to share "Threat Fingerprints" via Elastic. If one company gets hit, every AEGIS instance globally learns the signature instantly.
- Auto-Rollback: Integrating directly with GitHub/GitLab CI/CD to not just hot-patch, but commit, test, and merge fixes automatically.
Built With
- docker
- elastic-agent-builder
- elastic-cloud
- elasticsearch
- elser
- esql
- filebeat
- kibana
- nginx
- openai
- python
- streamlit
- watcher
Log in or sign up for Devpost to join the conversation.