An open API service indexing awesome lists of open source software.

https://github.com/TheIndicSentinel/kavachxv2

Production-grade AI Governance Engine for real-time risk scoring, compliance enforcement (DPDP/RBI), and immutable audit logs.
https://github.com/TheIndicSentinel/kavachxv2

ai-governance bharat compliance dpdp it-act llm-safety privacy-engineering responsible-ai

Last synced: 7 days ago
JSON representation

Production-grade AI Governance Engine for real-time risk scoring, compliance enforcement (DPDP/RBI), and immutable audit logs.

Awesome Lists containing this project

README

          


KavachX Product Hero

# ๐Ÿ›ก๏ธ KavachX โ€” The AI Governance Infrastructure for Bharat

**Real-time Policy Enforcement ยท Multi-Gate Risk Scoring ยท Immutable Compliance Auditing**

[![License](https://img.shields.io/badge/License-Apache_2.0-7C3AED?style=for-the-badge&labelColor=0D0F1A)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10%2B-06B6D4?style=for-the-badge&logo=python&labelColor=0D0F1A)](https://www.python.org/)
[![Deployment](https://img.shields.io/badge/Deployment-Production_Ready-10B981?style=for-the-badge&labelColor=0D0F1A)](https://github.com/TheIndicSentinel/kavachxv2)
[![Architecture](https://img.shields.io/badge/Logic-Vedic_Armor-F59E0B?style=for-the-badge&labelColor=0D0F1A)](docs/architecture.md)

---

## โšก The Enforcement Gap
As AI models integrate into the core of Bharat's digital infrastructureโ€”from Fintech to Healthtechโ€”the gap between **intelligence** and **accountability** is widening. Every inference is a potential compliance risk, a privacy leak, or a security breach.

**KavachX** (sanskrit: *Kavach* - Armor) is the software-defined enforcement layer that closes this gap. It provides a robust, low-latency "Digital Armor" that intercepts, analyzes, and regulates every interaction between AI models and users in real-time.

---

## โœจ Core Pillars of Governance

| Pillar | Capability | Technical Driver |
|:---:|:---|:---|
| **๐Ÿ” Security** | Immune to Prompt Injection & NAEL | Adversarial Noise Classifiers |
| **๐Ÿงฌ Safety** | Context-Aware Hate & Harm Filtering | Fine-tuned Transformer Models |
| **๐Ÿ“‹ Compliance** | DPDP 2023 & RBI Policy Adherence | Regex + NLP PII Detection |
| **๐Ÿ“Š Audit** | Immutable Evidence Chains | Cryptographic Interaction Logging |
| **๐ŸŒ Flexibility** | Universal AI Interceptor | Headless API & Browser Extension |

---

## ๐Ÿ›๏ธ Architecture: The 4-Gate Enforcement Pipeline

```text
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ AI MODEL (LLM / ML System) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Inference Request
โ–ผ
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ K A V A C H X E N G I N E โ•‘
โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘
โ•‘ Gate 1: ๐Ÿ” Security โ”‚ Prompt Injection / NAEL โ•‘
โ•‘ Gate 2: ๐Ÿงฌ Safety โ”‚ Hate, Bias, Harm Scoring โ•‘
โ•‘ Gate 3: ๐Ÿ“‹ Compliance โ”‚ DPDP PII / IT Act Check โ•‘
โ•‘ Gate 4: ๐Ÿ“Š Audit โ”‚ Immutable Log + Dashboard โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โ”‚ Governed Response
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ END USER / CLIENT โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## ๐Ÿš€ Quick Start in 60 Seconds

### ๐Ÿ“ฆ 1. Installation
```bash
git clone https://github.com/TheIndicSentinel/kavachxv2.git
cd kavachxv2/backend
pip install -r requirements.txt
```

### ๐Ÿ 2. Basic Initialization
```python
from kavachx import Sentinel

# Initialize the governance gate
sentinel = Sentinel(api_key="your_kavach_key")

# Governed inference
response = sentinel.inspect(
prompt="Generate a response for the user...",
context="banking_domain"
)

if response.is_blocked:
print(f"Action Blocked: {response.violation_reason}")
else:
print(response.content)
```

---

## ๐Ÿ—บ๏ธ Roadmap & Current Focus
- [x] **v2.0 Core:** Real-time interception and basic gate logic.
- [ ] **v2.5 Bhasha-Shield:** Fine-tuned safety classifiers for 12+ Indian languages.
- [ ] **v3.0 Edge-Enforce:** Moving governance logic to the client-side/edge for zero-latency.
- [ ] **v3.5 DPDPA-Masker:** Specialized PII redaction for Indian data patterns (Aadhaar, PAN).

---

## ๐Ÿค Community & Support
* **Documentation:** Detailed guides in the [docs/](docs/) folder.
* **Contributing:** Read our [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
* **Security:** Report vulnerabilities via [SECURITY.md](SECURITY.md).
* **Contact:** Reach out at [inerd1412@gmail.com](mailto:inerd1412@gmail.com).

---

**๐Ÿ›ก๏ธ KavachX** โ€” Policy-Aligned AI Infrastructure for Bharat


*Built with conviction in ๐Ÿ‡ฎ๐Ÿ‡ณ India*