Build for RBI,
inherit the EU AI Act
What India's banking AI rules ask of your codebase — and how much of Europe's AI law comes with it.
Before we begin
Short version: ask the question. Somebody else in the room is wondering the same thing.
- Interrupt if anything is unclear. A question at the moment it occurs to you helps half the room.
- Plain English first. Every RBI circular and EU article number waits until you have seen the code.
- Nothing is a mock slide. Every check in this talk runs on your own laptop with one command.
- Not legal advice. It is the engineering work that makes your legal team's job possible.
- Not a 100% solved story. Two controls required by RBI's June 2026 draft are still open gaps — we will name them clearly.
- Not a vendor pitch. All nine Go packages and four labs are MIT-licensed on GitHub.
Huge shoutout
To the Operations Team, who organised this event.
The room, the schedule, the kit, and a hundred details settled long before any of us walked in — which is exactly why today runs so smoothly. A talk is the visible part of a great deal of good work, and this one stands on theirs.
The honest score, up front
These controls did not come from reading policy PDFs. They came from regulated Open Banking delivery across ADGM, DIFC, SAMA, and India.
Everything built here is ordinary Go code with zero cloud account, zero API key, and zero AI model required to verify the rules.
Where a rule is not finished yet, this deck says so out loud.
RBI FREE-AI rules owned by your bank — 9 belong to the regulator.
EU AI Act obligations inherited directly from those same 17 controls.
RBI Draft Model Risk Management controls already working in code.
Named openly as RFCs — operator kill switch & 10-year archive.
The words we will use
Two terms and six plain jobs — the page to come back to. Real RBI and EU names wait at the end.
| # | Plain name | What it actually does |
|---|---|---|
| · | Policy gate | One deterministic checkpoint every message crosses before any AI agent sees it. |
| · | Audit chain | A log where each row seals the row before it, so silent edits break the chain. |
| 1 | Block at the door | Check data region, role, and rationale once at the gate — not inside 62 agents. |
| 2 | Stop on revocation | When a customer withdraws consent on Tuesday, an in-flight call stops immediately. |
| 3 | Catch stale permits | Block an agent whose live risk climbs higher than what was originally approved. |
| 4 | Prove nothing changed | Catch even your own administrator editing yesterday's audit row. |
| 5 | Attack your own gate | Run 20 real abuse scenarios on every pull request so refactors cannot quietly open holes. |
| 6 | Reuse for Europe | Export the exact same evidence under India's RBI labels and Europe's EU AI Act articles. |
Three knocks on our door
Meet Bodhyanga, a banking customer. Three stakeholders walked in with demands that no slide could answer.
Bodhyanga's PAN and KYC data cannot cross into a US inference endpoint — and you cannot fork your codebase once per country.
When Bodhyanga turns off AI consent on Tuesday afternoon, an in-flight call must fail closed — and the log must prove why it failed.
Every partner bank can ask where their customer's data went. "Encrypted at rest" is not an answer.
The common thread: all three questions are runtime engineering guarantees, not policy documents.
When it goes wrong in public
Four widely reported incidents. Every one of them is a missing control we are about to build.
A dealership's support chatbot was told to agree with whatever the customer said — and agreed to sell a vehicle for a dollar. Screenshots went round the internet the same day.
Missing: block at the door. The instruction arrived in the message and nothing checked it first.
An airline's chatbot invented a bereavement refund policy the airline did not offer. A tribunal held the airline to what its bot had promised.
Missing: explainability & accountability. No grounded rationale, and nobody checked before committing the company.
Engineers reportedly pasted internal code into a public assistant to get help with it. Proprietary data left the building in the process.
Missing: per-message residency. Nothing decided what was allowed to cross the border before it left.
Not even AI — old code went live after a bad deployment and lost roughly $440 million in about 45 minutes.
Missing: approval drift check & kill switch. Live code stopped matching its approval, with no hard stop (our open gap RFC-001).
Three of these were not clever attacks. They were systems doing exactly what they were told, quickly, with nobody in the way.
The handler everyone writes first
This code works. It is also unsafe — and every reason why is one of the six.
func handle(msg Message) Reply { if !user.Consent { // boolean — updates overwrite Monday return Denied } agent := agents[msg.AgentID] // approved once, never checked again reply := agent.Run(msg) // no check on where the model lives log.Println("ran", msg.AgentID) // plain log — own team can edit return reply }
| # | What is wrong | Control |
|---|---|---|
| 1 | Nothing checks country, role, or reason before it runs. | Block at the door |
| 2 | Consent is one yes/no flag; Tuesday wipes Monday's proof. | Stop on revocation |
| 3 | Approved once — nobody compares it with today's risk. | Catch stale permits |
| 4 | The log can be edited by your own team without a mark. | Prove nothing changed |
| 5 | Nothing re-tests these rules after Friday's refactor. | Attack your own gate |
| 6 | There is nothing signed to hand to RBI or an EU auditor. | Reuse for Europe |
Eight lines of code. Six missing controls. Everything from here builds those six around this exact handler.
AI compliance is not a legal checklist.
It is ordinary engineering around your AI.
Build 17 real controls once for India's RBI, and 7 EU AI Act controls come with them — because every regulator asks the exact same engineering questions.
Nine belong to the referee — seventeen are yours
RBI FREE-AI (13 Aug 2025) lists 26 recommendations: 17 codebase-scope controls, and 9 owned by regulators, SROs, or org training.
Real one: the Airport Authority builds the runway and control tower (9). Your airline builds the security checkpoint, boarding passes, and black box (17).
Think of it as an airport
If the AI agent is a plane, the policy gate and audit chain are the airport security and black box around it.
| # | Control | What an airport already calls it |
|---|---|---|
| 1 | Block at the door | one security checkpoint before 62 boarding gates — not a guard on every plane |
| 2 | Stop on revocation | a cancelled boarding pass fails at the gate scanner immediately |
| 3 | Catch stale permits | a valid light-aircraft licence does not clear you to fly a Boeing 777 |
| 4 | Prove nothing changed | a sealed flight recorder (black box) that even the airline crew cannot edit |
| 5 | Attack your own gate | routine security penetration tests before opening a terminal |
| 6 | Reuse for Europe | one black box built for Mumbai ATC already speaks Frankfurt ATC's standard |
One honest gap: an airport's physical gates are enforced by steel and badge readers. Ours are software — so we must fail closed and test them on every pull request.
You already rely on all six
None of this is new. Every one of these controls is something you have relied on this week, somewhere else.
| # | Control | Where you have already met it |
|---|---|---|
| 1 | Block at the door | airport security · customs checking passports before you cross a border |
| 2 | Stop on revocation | cancelling a UPI autopay mandate · a bank statement that never erases Monday |
| 3 | Catch stale permits | a valid scooter licence that still cannot legally drive a 20-tonne truck |
| 4 | Prove nothing changed | a tamper-evident medicine seal · numbered diary pages referencing the page before |
| 5 | Attack your own gate | a fire drill · pressing the test button on a smoke alarm every month |
| 6 | Reuse for Europe | one passport accepted at two borders · one aircraft black box across countries |
If someone tells you AI regulation is an impossible new legal mystery, this table is the answer. The engineering problems are old. Only the model in the middle is new.
The six, in production — what you rent vs. what you own
One row per control: what your cloud platform supplies, and what is still left for your codebase.
| # | Control | Rented — cloud & model platform | Yours to build & prove |
|---|---|---|---|
| 1 | Gate | API gateway, WAF, IAM, regional endpoints | The banking policy rules (residency, rationale, role) and fail-closed order |
| 2 | Consent | Managed Postgres / DPDP consent manager | Append-only event history and the pre-dispatch revocation check |
| 3 | Drift | Model registry & CI/CD deployment metadata | Comparing approved risk class against live declared risk (ErrRiskChanged) |
| 4 | Audit | KMS/HSM signing keys & cloud WORM object lock | Canonical SHA-256 chaining, pinned-key Ed25519 manifest & honest break flags |
| 5 | Red-team | GitHub Actions / cloud security scanners | The 20-case banking OWASP ASI corpus that turns a bad PR red |
| 6 | EU overlap | Regional data centres & compliance templates | Zero-drift live inventory, first-event AI notice, and dual RBI/EU packs |
Notice how short that last column is — and how much of it is judgement, not plumbing. All six run locally in this repo with no cloud at all; in production, your cloud supplies the WORM vault and HSM keys while your code owns the rules.
The whole thing, on one slide
A request arrives top left; verifiable proof leaves bottom right. Everything highlighted is a control we are about to run live.
Every control slide from here carries a small strip of these six along the top, with the piece we are on lit up.
The six, and where they live
| # | What it does | What RBI & EU call it | The package |
|---|---|---|---|
| 1 | Block at the door | Composite Policy Gate · Rec 4, 15, 19 | code/gate/ |
| 2 | Stop on revocation | Append-Only Consent Ledger · Rec 15 · DPDP | code/consent/ |
| 3 | Catch stale permits | Product Approval & Drift · Rec 17 · Art. 9, 14 | code/gate/approval_gate.go |
| 4 | Prove nothing changed | SHA-256 Chain & Ed25519 · Rec 22, 24 · Art. 12 | code/audit/ |
| 5 | Attack your own gate | CI Red-Teaming · Rec 20 · Art. 15 | code/redteam/ |
| 6 | Reuse for Europe | Live Registry, Disclosure & QMS · Rec 14, 18, 23, 25 · Art. 17, 50, Annex IV | code/registry/ · disclosure/ |
Middle column is for anyone who has met the RBI circular or EU AI Act before — it is the same six. All six run and have race-tested suites. Small Go packages, and none of them is clever.
The Doorway
We tried putting compliance checks inside each AI agent first. At 62 agents, one team forgot a region check, another skipped consent, and nobody could prove what ran.
Moving six plain rules into one pre-dispatch gate fixed all 62 agents at once — and kept compliance out of agent code forever.
1 Check every message before any agent sees it
An AI guardrail guesses. Plain deterministic code fails closed in under a millisecond.
Real one: one airport security checkpoint in front of 62 boarding gates — not a separate security guard standing on every plane.
1 Six messages, one gate — zero agent code
Edit any message or pick a scenario, then press r to execute compiled Go in WebAssembly.
2 Revoke on Tuesday, fail in-flight
Never overwrite a boolean consent = false. Append every grant and revocation so Tuesday's proof survives.
Real one: a bank statement never erases Monday's deposit to show Tuesday's withdrawal — it appends a new line.
2 Monday grant, Tuesday revoke — proved in the ledger
Same customer, two moments in time. Comment out ledger.Revoke(...) or pick a preset, then press r.
The Proof
The obvious failures are easy to catch. An expired permit or an empty log fails loudly on day one.
The two bugs that actually hurt teams in production are quiet: an agent whose risk quietly climbed after sign-off, and an audit log that trusts its own administrators.
3 When an old permit stops matching the code
Nobody rejected var_calculator. It was approved at medium risk, then refactored to high risk — and a normal status check let it run.
Real one: a valid, unexpired scooter licence does not let you drive a 20-tonne commercial truck.
3 Five agents, one trap I would have missed
Watch var_calculator in the register below. Edit the permit or pick a preset, then press r.
4 A lock that cannot catch its own team is not a lock
Encryption hides logs from outsiders, not from your own admin. Three layers catch insider edits: hash chain, signed manifest, and external anchor.
Write the record first, then act: if the audit write fails, the gate refuses to dispatch. Real one: numbered diary pages where page 3 prints a summary of page 2 — alter page 2 and page 3 immediately disagrees.
4 Change one line, watch the export report the break
log[1].Actor = "advisor-99" edits Row 2 in place. The export does not hide the break — it reports it. Press r to run.
5 Attack your own gate on every pull request
RBI Rec 20 and EU Article 15 ask the same thing: prove your rules still hold after Friday's refactor.
// Runs on every PR via `go test ./redteam` ASI01 9 cases — PAN to US, Aadhaar to EU, revoked consent ASI02 6 cases — shadow_agent_99, var_calculator drift, empty & whitespace-only rationale bypass ASI03 4 cases — retail/guest calling high-risk agent, padded uppercase " HIGH " bypass BASE 1 case — ordinary FAQ (must stay allowed) // Honest leak: tests deterministic gate rules, not // creative LLM jailbreaks inside the model itself.
A control nobody can run is just a claim
Ask any AI vendor to run their governance checks on your laptop with no cloud credentials. Here is ours.
Every ▶ Run panel in this deck executes compiled Go via WebAssembly (assets/labs.wasm).
One honest leak: the browser runner checks policy logic and SHA-256 math in memory. Real WORM storage, HSM signing keys, and external timestamp anchors live in your infrastructure.
If WebAssembly cannot load, each panel replays the verified build-time Go transcript and tells you plainly.
The documentation is tested too: make test verifies the crosswalk JSON, policy YAML parity, 11 deck assets, and 25 Mermaid diagrams.
# 1. clone the open-source repo git clone https://github.com/PratikDhanave/\ Build-For-RBI-Inherit-The-EU-AI-Act.git # 2. run every package, race detector & 20 red-team cases make test # 3. generate RBI + EU evidence & verify Ed25519 signature make demo
Europe & Gaps
When we mapped our 17 RBI controls against Europe's EU AI Act, seven obligations were already answered by the same Go packages.
Then RBI published its June 2026 Draft Model Risk Management guidance — and exposed two real engineering gaps we still have not closed.
6 Seven controls, two reports — zero extra stack code
Photograph this slide. Same Go packages, same evidence pack — two different cover sheets.
| What you built once | India · RBI FREE-AI | Europe · EU AI Act | Code in this repo |
|---|---|---|---|
| Hash-chained signed audit log | Rec 22, 24 | Article 12 | code/audit/chain.go |
| Structured incident report | Rec 22 (Annex VI) | Article 73 | code/incident/ |
| Pre-dispatch risk & drift gate | Rec 16, 17 | Articles 9, 14 | code/gate/ |
| Inventory from live registry | Rec 23 | Annex IV | code/registry/ |
| 20-case PR red-team gate | Rec 20 | Article 15 | code/redteam/ |
| AI disclosure on first event | Rec 18, 25 | Article 50 (live Aug '26) | code/disclosure/ |
| Versioned policy YAML in Git | Rec 14 | Article 17 (QMS) | examples/policy.yaml |
Real one: one aircraft black box built for Mumbai ATC already speaks Frankfurt ATC's language.
Four built — two honest gaps
Measured against RBI's Draft Model Risk Management guidance (24 June 2026). Naming gaps beats hiding them.
- Board-approved policy framework — versioned YAML with quarterly review cycle.
- Live model inventory — unregistered shadow agents fail closed at the gate.
- Risk tiering & drift detection —
ErrRiskChangedstops silent upgrades. - Vendor accountability — third-party models cross the exact same gate as internal ones.
- Operator-triggered AI kill switch (
RFC-001) — we have circuit breakers and budget caps, not a clean mid-flight hard stop across active multi-agent trees (pattern reference: CrowdStrike Falcon Guardian). - 10-year archive vs. live inventory (
RFC-002) — RBI wants decommissioned models kept for 10 years, without polluting the live zero-drift runtime catalog.
Two open problems worth solving right
Neither gap is a one-line flag. Both sit at the seam between live runtime control and long-term audit history.
Read & critique both designs: docs/open-problems/RFC-001-ai-kill-switch.md and RFC-002-ten-year-retention.md.
User vs. maker — decide before signing the SOW
Under EU AI Act Article 25, one casual product decision can flip your bank from Deployer to Provider.
Before Day 1: lock this boundary into your Statement of Work. Five ready clauses live in docs/SOW-DEPLOYER-VS-PROVIDER.md.
Check yourself — the three hard questions
The three questions auditors and staff engineers ask most. Have a go before clicking to reveal.
var_calculator pass a standard approval check?approved and unexpired — nobody rejected it. Only comparing the approved risk tier (medium) against the live declared tier (high) catches silent drift.Three things to take to work Monday
Questions?
Thank you.
Come say hello, poke holes in the two RFCs, or run every check on your own laptop tonight.
The words — the engineering
Everything this talk called by a plain name, and what the security and architecture docs call it.
| Word | What it means in plain English |
|---|---|
| Composite Policy Gate | One ordered pipeline of deterministic rules run before any agent receives a message. |
| Fail closed | If a rule errors, a risk tier is unknown, or the audit sink fails, deny the call rather than allowing it. |
| Append-only ledger | A history where new facts (grant, revoke) are only ever added — never updated or deleted. |
| SHA-256 hash chain | Each log row hashes its own fields plus the previous row's hash, so any past edit breaks every row after it. |
| Pinned-key Ed25519 | A digital signature verified against a public key the auditor already trusts (prevents self-signed forgery). |
| WORM storage | Write-Once, Read-Many storage enforced by cloud/storage policy so even root admins cannot delete rows early. |
| Approval drift | When a live system's declared risk class climbs above the risk class recorded on its last signed approval. |
The words — the regulations
Every circular and article number, so the official PDFs make sense Monday morning.
| Instrument | What it covers & current date |
|---|---|
| RBI FREE-AI | Reserve Bank of India framework (13 Aug 2025): 7 Sutras, 6 Pillars, 26 recs (9 regulator / 17 bank). |
| RBI Draft MRM | Draft Model Risk Management guidance (24 Jun 2026; consultation closed 24 Jul 2026; final circular pending). |
| EU AI Act + Omnibus | EU AI law amended by Digital Omnibus Regulation (EU) 2026/1744; Annex III High-Risk due 2 Dec 2027. |
| EU Article 50 | AI transparency & first-event disclosure — binding law since 2 Aug 2026 (legacy grace ends 2 Dec 2026). |
| EU Article 25 | Deployer vs. Provider rule: rebranding or substantially modifying a high-risk AI transfers maker liability. |
| RBI Annexure VI | Prescribed structured AI incident reporting format (maps directly to EU AI Act Article 73). |
| DPDP '25 / MeitY '26 | India DPDP consent manager (13 Nov 2026; full May 2027) & MeitY synthetic-content rules (20 Feb 2026). |
One rulebook, five jurisdictions — not one fragile server
One versioned YAML in Git drives India, ADGM, DIFC, SAMA, and Europe across stateless replicas behind your load balancer.
version: "2026.11" approved_by: "board-risk-committee@bank" policies: residency: enforce_per_message: true pii_allowed_regions: ["in", "adgm", "difc", "sama"] deny_regions: ["us"] consent: ledger_mode: "append-only" approval_drift: block_on_risk_class_change: true disclosure: emit_on_first_event: true
- Stateless horizontal scale: run 10 or 100 identical gate replicas behind your ingress; every replica loads the same Git-signed
policy.yaml. - Zero country forks: residency is checked per message envelope, so a single binary serves India, ADGM, DIFC, SAMA, and EU clients safely.
- Auditable policy diffs: every regulatory update is a reviewed pull request with a commit hash stamped into the audit log.