Skip to content

akashgaikwad28/RakshaNetraAI

Repository files navigation

Autonomous AI Security Analyst for Docked Drone Monitoring

RakshaNetraAI: Drone Security Analyst Agent

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.


System Architecture

System Architecture

The system is built on a Decoupled Data Pipeline architecture:

  1. Ingestion: Simulates a high-frequency stream of drone telemetry and visual frames.
  2. Intelligence Pipeline: A tiered extraction layer (Gemini ➔ Groq ➔ Rule-based) that ensures 100% data capture.
  3. Persistence: Structured events are indexed in an SQLite database, converting raw visual data into a queryable knowledge graph.
  4. Action Layer: Evaluates security rules in real-time and provides a natural language interface for historical audits.

Core Features

1. Real-Time Event Extraction

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.

2. Intelligent Loitering Detection

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.

3. Smart Security Alerts

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.

4. Natural Language Intelligence Agent

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.

🛡 Multi-LLM Resilience Strategy

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).

🛠 Tech Stack

  • Languages: Python 3.11+
  • AI Infrastructure: LangChain, Google GenAI SDK, Groq SDK.
  • Database: SQLite (Indexed for high-speed security audits).
  • Environment: uv for lightning-fast, reproducible dependency management.

Getting Started

Prerequisites

  • Python 3.11+
  • uv (Recommended) or pip

Installation & Setup

  1. Clone the Project:
    git clone <repository-url>
    cd RakshaNetraAI
  2. Configure Environment: Create a .env file in the root directory:
    GROQ_API_KEY=your_groq_api_key
    GEMINI_API_KEY=your_gemini_api_key
  3. Install Dependencies:
    uv sync

Running the System

# Start the surveillance simulation & intelligence loop
uv run python main.py

Verification (Test Suite)

# 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.py

Repository Structure

RakshaNetraAI/
├── 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

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages