Highlights
What we build in this lesson:
An AML Transaction Monitoring Agent that ingests raw SWIFT-style transaction events, embeds them into a vector store, and runs Agentic RAG to surface suspicious patterns against an AML typology corpus
A FraudDetectorTool — a hybrid rule-engine + Gemini LLM classifier that deterministically scores transactions for structuring, layering, and integration-phase risk
A ComplianceAuditStore — an append-only, hash-chained SQLite database that captures every agent decision, tool invocation, and Gemini call with full traceability
A RegulatoryReportGenerator that produces FinCEN-style Suspicious Activity Report (SAR) drafts as structured JSON, ready for human review
A React dashboard with live WebSocket updates showing transaction queues, risk scores, SAR draft previews, and audit trail depth
Connection to L83 (Risk Management: Auditing & Red Teaming): L83 produced the
RedTeamAuditLogger,AuditTrailVerifier, andVulnerabilityRegistry. This lesson imports all three unchanged.TheComplianceAuditStoreextendsRedTeamAuditLogger‘s hash-chain pattern with a domain-specific schema for financial events. Every FraudDetectorTool invocation is logged through the sameAuditTrailVerifier.append()interface, so the red-team governance loop from L83 covers production AML decisions automatically.
Enables L85 (Healthcare Agents): The VerticalAgentBase, TracingMiddleware, ToolCallSanitizer, and RegulatoryReportRenderer exported here are domain-neutral scaffolds. L85’s medical-coding assistant will import them verbatim and swap only the compliance corpus (AML typologies → ICD-10/CPT codebooks) and the domain tool (FraudDetector → DiagnosisCodeValidator).
Architecture Context
Place in the 90-lesson VAIA path
Foundations (L1–10) → RAG (L19–27) → Agentic RAG (L35–45) →
Multi-Agent (L46–60) → MLOps (L61–75) → Vertical Adaptation (L76–79) →
Responsible AI (L80–83) → [L84: Finance ←HERE] → Healthcare (L85) →
Legal/Gov (L86) → Manufacturing (L87) → Synthesis (L88–90)Module 9 is the payoff module. Every architectural primitive built across 83 lessons — Agentic RAG, tool-calling, MLOps pipelines, governance audit trails — collides with real-world regulatory constraints. Finance is the first domain because it is the most demanding: decisions are time-sensitive, reversible only with great difficulty, and subject to mandatory regulatory disclosure.
Integration with L83 components
Component Architecture
The system has five bounded layers:
Ingestion Layer — FastAPI webhook receives transaction events; normalizes to internal schema; publishes to internal event bus.
Agent Layer — AMLMonitoringAgent runs the ReAct loop. On each transaction, it: (1) embeds the transaction sequence, (2) retrieves relevant typology chunks from ChromaDB, (3) calls FraudDetectorTool, (4) synthesizes a SAR decision with Gemini, (5) writes the full decision trace to ComplianceAuditStore.
Tool Layer — FraudDetectorTool runs rule-engine first, then Gemini for rationale. HumanEscalationTool is a no-op stub that creates a compliance ticket (integration point for actual ticket systems). CorpusSearchTool wraps ChromaDB with mandatory citation output.
Storage Layer — ChromaDB for AML typology embeddings; SQLite WAL for audit trail; Redis for SAR draft queue.
Presentation Layer — React dashboard with WebSocket, showing live transaction queue, risk score histogram, SAR preview panel, and audit trail explorer.



