Inspiration
Financial institutions generate thousands of suspicious transactions every day. Investigating a single fraud or money-laundering case — pulling records, cross-referencing watchlists, checking applicable regulations, and drafting a Suspicious Activity Report (SAR) — typically takes a compliance analyst up to three days. FinSentinel was built to address this bottleneck: a team of autonomous AI agents that performs the same investigation, end-to-end, in under three minutes.
What it does
FinSentinel is a multi-agent AI platform for financial crime investigation. A compliance analyst submits a natural-language query (for example, "Investigate the last 24 hours of transactions for fraud and AML violations"), and five specialist Gemini 2.5 Flash agents run in sequence — Fraud Detector, AML Analyst, Risk Officer, Compliance Checker, and Report Generator — streaming live findings to a React dashboard.
Key capabilities:
- A MongoDB Atlas $vectorSearch query (gemini-embedding-2, 3072-dim, cosine similarity) surfaces semantically similar past fraud cases from the historical transaction corpus, giving every agent, and the analyst, immediate precedent.
- The full reasoning chain from all five agents, along with the final SAR, is written back to MongoDB Atlas (audit_log and sar_reports collections) as a regulator-facing AI decision-lineage audit trail, supporting GDPR Article 22 and EU AI Act human-oversight requirements.
- The pipeline produces a complete FinCEN Form 111 Suspicious Activity Report, including subject accounts, supporting evidence, regulatory deadlines (BSA, FINRA, MiFID II), and a human-review checklist.
- A live impact summary displays the dollar amount flagged, total investigation time versus the three-day manual baseline (approximately 1,500x faster), transactions analyzed, and the actual Gemini API cost (approximately $0.017 per run).
What normally requires a compliance team three days of manual record-pulling, watchlist cross-referencing, and report-writing, FinSentinel completes end-to-end in under three minutes for less than two cents in API costs.
How we built it
- Backend: FastAPI with WebSocket streaming (/ws/investigate). backend/db_fetcher.py pre-fetches all required MongoDB Atlas data (transactions, customers, watchlists, compliance rules, money-flow network) in a single batch via pymongo, eliminating per-agent tool-call overhead. backend/pipeline.py then runs each of the five agents as a single Gemini 2.5 Flash call, passing forward the accumulated findings.
- MongoDB Atlas: a 9,449-document transaction corpus seeded with realistic fraud patterns (velocity abuse, structuring, round-tripping, OFAC SDN matches). A vector search index (fraud_vector_idx, 3072-dim cosine over gemini-embedding-2 embeddings) enables $vectorSearch for similar-case retrieval. The audit_log and sar_reports collections persist every investigation's full reasoning chain.
- Gemini 2.5 Flash, accessed via google.genai with exponential backoff for free-tier rate limits, generates each agent's structured analysis: fraud probabilities, AML risk scores, composite risk, regulatory obligations, and the final SAR narrative.
- Frontend: React and Vite, featuring a five-step pipeline progress visualization, a live agent event log, a similar-cases panel, an impact stats summary, and a downloadable SAR report component.
- Deployment: containerized with Docker and deployed to Google Cloud Run, serving both the API and the built React frontend from a single service.
Challenges we ran into
- Tuning the five-agent pipeline to operate within Gemini free-tier rate limits while keeping end-to-end latency under three minutes, addressed with a single-call-per-agent architecture and adaptive exponential backoff.
- Implementing $vectorSearch correctly against a 3072-dimension embedding index and surfacing it as a live, visible "similar past cases" feature rather than a backend-only detail.
- Designing an audit trail schema that meets real regulatory requirements (GDPR Article 22 right-to-explanation, EU AI Act human oversight) without slowing down the pipeline.
Accomplishments that we're proud of
- A fully working, end-to-end autonomous investigation, from raw MongoDB data to a regulator-ready FinCEN Form 111 SAR, with no human intervention, completed in under three minutes.
- MongoDB Atlas vector search powering a genuinely useful similar-fraud-cases feature, integrated into the core workflow rather than added as a demo afterthought.
- A persistent, queryable AI audit trail that turns agent reasoning into a transparent, regulator-facing artifact.
- Live impact metrics (cost, time, dollar amount flagged) that make the return on investment immediately clear to a judge or compliance executive.
What we learned
- How to architect a multi-agent LLM pipeline that is cost-efficient (under two cents per run) and fast enough for an interactive demo.
- How MongoDB Atlas vector search can serve as a live decision-support signal within an agent pipeline, not just a retrieval mechanism.
- The practical engineering required to make AI agent reasoning auditable and regulator-ready rather than a black box.
What's next for FinSentinel
- Multi-case batch investigations and a case-management queue.
- A fine-tuned risk-scoring model trained on the audit_log corpus.
- Real-time streaming ingestion from a live transaction feed, replacing the static MongoDB snapshot.
- Scaling the Cloud Run deployment with Vertex AI for production-scale quota.
Built With
- docker
- fastapi
- gemini-2.5-flash
- gemini-embedding-2
- google-cloud-run
- google-genai
- mongodb-atlas
- mongodb-vector-search
- pymongo
- python
- react
- typescript
- vite
- websockets
Log in or sign up for Devpost to join the conversation.