DPDP for AI Developers
India's Digital Personal Data Protection Act comes into full enforcement in 2027. Every Section mapped to what your AI system must actually do — in code.
What is DPDP?
The Digital Personal Data Protection Act, 2023 (DPDP) is India's comprehensive data privacy law. It governs how "Data Fiduciaries" — any entity that determines the purpose and means of processing personal data — may collect, use, and protect personal data of Indian citizens.
The DPDP Rules, 2025 operationalise the Act. The Data Protection Board of India (DPBI) will begin enforcement on May 13, 2027 — but BFSI companies are already subject to the RBI FREE AI Framework, which has immediate obligations.
Who is affected?
If your AI system processes any personal data of Indian residents — names, Aadhaar numbers, PAN, mobile numbers, financial data, health records, biometrics — you are a Data Fiduciary under DPDP, regardless of where your servers are.
AI systems are particularly exposed because they process personal data at every step: in the prompt (user input), in tool calls (database queries, API calls), in the LLM inference layer, and in the response. Most LLM frameworks today have no guardrails for any of these.
The 5 core obligations for AI systems
§6 — Consent
Consent under DPDP must be free, specific, informed, unconditional, and unambiguous. It cannot be bundled with terms of service or implied from silence. Consent notices must specify the exact personal data being collected, the purpose, and how to exercise rights.
What this means for AI systems
Before your AI agent processes a customer's Aadhaar, PAN, financial records, or any other personal data, you must have a recorded consent for that specific purpose. Consent for "loan processing" does not cover using the same data for "marketing."
from svitch_tracer import SvitchTracer
# WRONG — no consent check before processing
def process_loan(customer_id, aadhaar, pan):
return llm.chat(f"Assess loan for {aadhaar}, PAN {pan}")
# CORRECT — verify consent first
from consent_ledger import ledger as L
def process_loan(customer_id, aadhaar, pan):
valid, reason, _ = L.verify(consent_id)
if not valid:
raise PermissionError(f"Cannot process: {reason}")
# Now safe to proceed — consent is verified
tracer = SvitchTracer(agent_id="loan-processor")
with tracer.run() as run:
run.data_access(
source="customer_profile",
fields_accessed=["aadhaar", "pan"],
purpose="loan_processing",
data_principal_id=customer_id,
)
# ... rest of processing§6(5) — Withdrawal must be as easy as granting
Data principals can withdraw consent at any time. Your system must honour withdrawal immediately and stop all processing for that purpose. The withdrawal itself must be recorded — but the original grant record must also be preserved as proof it existed.
§8 — Data Fiduciary obligations
§8(1) — Purpose limitation
Personal data collected for one purpose cannot be used for another without fresh consent. An AI agent that collects Aadhaar for KYC cannot then use it for credit scoring unless the user consented to both purposes explicitly.
§8(3) — Data minimisation
Collect only what is necessary. For AI systems, this means your prompts and context windows should contain only the personal data fields required for the current task. Passing an entire customer record to an LLM when only the credit score is needed violates §8(3).
# WRONG — entire record including Aadhaar, DOB, address in prompt
prompt = f"Review application: {json.dumps(full_customer_record)}"
# CORRECT — only the fields this step needs
prompt = f"""
Review loan application.
Credit score: {credit_score}
Income band: {income_band}
Employment type: {employment_type}
Requested amount: {loan_amount}
"""
# Aadhaar, PAN, address never enter the prompt§8(6) — Accuracy and completeness
Data used for AI decisions must be accurate. If your agent makes a credit decision on stale data, you are liable for the inaccuracy. Build periodic data freshness checks into any agent that makes automated decisions about individuals.
§8(7) — Grievance redressal
You must publish contact details for a Data Protection Officer (or equivalent contact) and respond to grievances within a defined period. For AI-driven decisions, this means a human must be reachable to explain any automated outcome to the affected person.
§12–14 — Data Principal rights
For AI systems, rights fulfilment requires knowing exactly what data you processed, when, and for what purpose — which is exactly what a structured audit trail provides. Without it, a §12 access request becomes an engineering emergency.
§33 — Data Protection Impact Assessment
A DPIA is mandatory before deploying any processing activity likely to result in "high risk" to data principals. The DPDP Rules 2025 identify the following AI use cases as requiring a DPIA:
A DPIA must cover: description of processing activities, necessity and proportionality, risks to data principals, and mitigating measures. It must be reviewed and updated whenever the processing changes significantly.
Implementation: PII Detection and Redaction
Indian personal data includes entity types that no global PII library covers correctly. Aadhaar numbers appear in masked (XXXX-XXXX-1234) and unmasked (1234-5678-9012) forms. UPI IDs follow a handle@provider format. IFSC codes are 11-character bank identifiers. Indian mobile numbers range from 6xxx to 9xxx with regional variance.
# Install: pip install svitch
from svitch import Svitch
from openai import OpenAI
# One line — wraps any LLM provider
client = Svitch.wrap(OpenAI())
# PII is automatically detected and redacted before
# the prompt reaches OpenAI's servers
response = client.chat.completions.create(
model="gpt-4o",
messages=[{
"role": "user",
# Aadhaar and PAN are redacted before this leaves your network
"content": "Assess loan for Aadhaar 9876 5432 1098, PAN ABCDE1234F"
}]
)
# response.choices[0].message.content contains:
# "Assess loan for [AADHAAR_IN], [PAN_IN]"
# Original values never reached the LLM API# Direct detection (without wrapping a client)
import requests
res = requests.post("https://service-sage-mu.vercel.app/detect", json={
"text": "Customer UPI: ravi@okhdfc, mobile 9876543210",
"mode": "redact"
})
# {
# "redacted": "Customer UPI: [UPI_IN], mobile [MOBILE_IN]",
# "entities": [
# {"type": "UPI_IN", "value": "ravi@okhdfc", "start": 14, "end": 25},
# {"type": "MOBILE_IN", "value": "9876543210", "start": 34, "end": 44}
# ],
# "pii_found": true,
# "processing_ms": 38
# }Supported Indian PII types
Implementation: Consent Management
A DPDP-compliant consent record needs: the data principal's (hashed) identity, the exact purpose, which data categories are covered, the consent version they agreed to, the channel (web/app/branch), and a timestamp. Every record must be independently verifiable — a regulator should be able to verify consent without trusting your word.
import requests
LEDGER = "https://consent-ledger-kappa.vercel.app"
# Grant consent (e.g. before starting KYC)
res = requests.post(f"{LEDGER}/consent/grant", json={
"data_principal_id": "CUST-5821", # hashed before storage
"purpose": "kyc_verification",
"data_categories": ["AADHAAR_IN", "PAN_IN", "MOBILE_IN"],
"legal_basis": "explicit_consent",
"version": "2.1", # consent notice version
"channel": "mobile_app",
"ip_address": "103.21.45.67", # hashed before storage
})
consent = res.json()
consent_id = consent["consent_id"] # store this
# Verify before each data access
verify = requests.get(f"{LEDGER}/consent/{consent_id}/verify").json()
if not verify["valid"]:
raise PermissionError(verify["reason"])
# Withdraw (e.g. user taps "withdraw consent" in app)
requests.post(f"{LEDGER}/consent/{consent_id}/withdraw")
# Original grant record is preserved — only a new withdrawal record is addedThe consent ledger uses SHA-256 Merkle chaining — each record hashes the previous record's hash. This means tampering with any record breaks the chain, giving regulators independent verifiability without accessing your database.
Implementation: Agent Audit Trail
DPDP §8(6) requires you to maintain records of processing activities. For AI agents, this means every LLM call, every tool call, every decision, and every data access must be logged in a tamper-evident, queryable audit trail.
This is harder than it sounds with LLM agents — they can touch personal data at any step, across multiple tools, without the developer being explicitly aware. The audit trail must be automatic, not opt-in.
from svitch_tracer import SvitchTracer
tracer = SvitchTracer(agent_id="fraud-detector-v2")
with tracer.run() as run:
# Every call is hash-chained and tamper-evident
run.data_access(
source="transactions_db",
fields_accessed=["amount", "counterparty_upi", "timestamp"],
purpose="fraud_detection",
data_principal_id="CUST-9921",
)
run.llm_call(
provider="openai",
model="gpt-4o",
prompt=prompt_with_redacted_data,
response=llm_response,
redact_pii=True, # PII redacted before logging
)
run.decision(
reason="Transaction velocity exceeded threshold",
outcome="flag_for_review",
confidence=0.91,
)
# Human-in-the-loop checkpoint (RBI FREE Framework requirement)
run.human_checkpoint(
question="Confirm fraud flag for transaction TXN-9921?",
approved=True,
reviewer_id="anand.k",
)
# Verify the chain is intact at any time
valid, err = run.verify()
assert valid, f"Audit chain compromised: {err}"The audit trail can be queried to answer any regulator question: "What did your agent do with customer X's data between date A and date B?" — answered in seconds, not weeks.
Implementation: Automated DPIA Generation
A manual DPIA typically takes 6–10 weeks of legal and compliance work. Svitch generates a compliant DPDP DPIA in under 10 minutes by reading your actual processing telemetry and populating the required 7 sections automatically.
import requests
COMPLIANCE = "https://compliance-engine-18cdqy9ud-koushik-narendars-projects.vercel.app"
report = requests.post(f"{COMPLIANCE}/report/dpdp-dpia", json={
"org_id": "acme-fintech",
"period_start": "2026-04-01",
"period_end": "2026-06-30",
"telemetry": {
"agent_runs": 2840,
"pii_detections": 4120,
"consents_collected": 8950,
"consents_withdrawn": 142,
"human_reviews": 310,
"purpose_list": ["loan_processing", "kyc_verification", "fraud_detection"],
"data_categories": ["AADHAAR_IN", "PAN_IN", "MOBILE_IN", "BANK_ACCOUNT_IN"],
}
}).json()
print(f"Report ID: {report['report_id']}")
print(f"Score: {report['overall_score']}/100")
print(f"HTML: {COMPLIANCE}/report/{report['report_id']}/html")Penalties
The DPDP Act specifies financial penalties per breach. Unlike GDPR, there is no percentage-of-revenue calculation — these are absolute amounts.
Enforcement timeline
Compliance checklist for AI systems
Use this as a technical readiness checklist before deploying any AI system that processes personal data of Indian residents.