Autonomous AI Security Analyst for Docked Drone Monitoring
RakshaNetraAI is a production-ready AI security analyst prototype designed for property owners and facility managers. It transforms raw drone telemetry and visual descriptions into actionable security insights, providing automated monitoring, real-time alerting, and natural language querying.
The system is built on a Decoupled Data Pipeline architecture:
- Ingestion: Simulates a high-frequency stream of drone telemetry and visual frames.
- Intelligence Pipeline: A tiered extraction layer (Gemini ➔ Groq ➔ Rule-based) that ensures 100% data capture.
- Persistence: Structured events are indexed in an SQLite database, converting raw visual data into a queryable knowledge graph.
- Action Layer: Evaluates security rules in real-time and provides a natural language interface for historical audits.
Uses Groq (Llama-3.3) to parse unstructured frame descriptions into indexed JSON objects (Object Type, Color, Action, Model, Location). This allows the system to "understand" visual scenes instantly.
By utilizing Temporal Indexing, the system tracks recurring objects. If the same object type is detected in the same zone within a 60-minute window, it triggers a security alert, preventing unauthorized surveillance or suspicious behavior.
The engine evaluates 6 critical security rules, including:
- After-Hours Intrusion: Detection of persons at restricted gates between 12 AM - 4 AM.
- Rapid Proximity: Identifying fast-moving objects near sensitive zones (Loading Docks, Roofs).
- Authorized Movement: Flagging vehicles seen more than 3 times in a single shift.
Built with LangChain, the AI agent allows users to "talk to their data."
- Query: "Show me all red trucks detected near the warehouse today."
- Result: The agent writes and executes the SQL query, returning a human-readable answer.
Designed for mission-critical reliability, RakshaNetraAI implements a tiered failover strategy:
- Primary: Gemini 2.0 Flash (High reasoning for Agent & Summarization).
- Secondary: Groq Llama 3.3 (High-speed fallback if Gemini hits rate limits).
- Tertiary: Local Rule-Based Regex (Emergency extraction if all cloud APIs are unavailable).
- Languages: Python 3.11+
- AI Infrastructure: LangChain, Google GenAI SDK, Groq SDK.
- Database: SQLite (Indexed for high-speed security audits).
- Environment:
uvfor lightning-fast, reproducible dependency management.
- Python 3.11+
- uv (Recommended) or
pip
- Clone the Project:
git clone <repository-url> cd RakshaNetraAI
- Configure Environment:
Create a
.envfile in the root directory:GROQ_API_KEY=your_groq_api_key GEMINI_API_KEY=your_gemini_api_key
- Install Dependencies:
uv sync
# Start the surveillance simulation & intelligence loop
uv run python main.py# Run the automated assessment tests
uv run python tests/test_extraction.py
uv run python tests/test_alerts.py
uv run python tests/test_agent_query.pyRakshaNetraAI/
├── agent/ # LangChain Agent with SQL logic
├── alert/ # Deterministic Security Alert Engine
├── database/ # SQLite Manager, Schema, and Migration logic
├── llm/ # Multi-LLM Extraction & Intelligence Layer
├── simulator/ # Realistic Telemetry & Vision description generator
├── tests/ # Standardized Assessment Verification Suite
├── utils/ # Centralized Logging and Exception handling
└── main.py # System Orchestration & Simulation Loop

