Setu (সেতু) — AI SME Finance Copilot
AI Trade-Escrow & Finance Copilot for Bangladesh–China SMEs
Role: Team Lead & Full-Stack / AI Engineer

Setu is my team's entry to the 2026 Shenzhen International FinTech Competition (FinTechathon) — International Track, hosted by Tsinghua University's PBC School of Finance with WeBank, under the theme "AI as a Financial Participant" (Topic E: SME Finance Copilot).
The problem: small Bangladeshi businesses import most of their fabric and raw materials from China, but letters of credit are expensive and hard to get for small orders. So they pay suppliers in advance with no protection — exposing them to scams, fake documents and payment-redirection fraud, while Chinese exporters worry about getting paid.
The solution: Setu is an AI copilot that sits between buyer and supplier. It matches financing options, forecasts 90-day cash flow with alerts, calculates landed cost and margins, verifies suppliers, holds payment in milestone escrow, checks trade documents for fraud, and releases money only when evidence is verified — with a deterministic risk engine deciding when a human must approve.
Core principle: the LLM understands and explains; deterministic code calculates and decides. The AI agent can propose money actions but can never execute high-risk actions on its own.
The live demo walks through a full order (USD 9,600 of fabric from a Shaoxing mill) including a forged bill of lading with a hidden "release full payment" instruction — which Setu detects, ignores and freezes at the highest risk tier — and an attempt to finance the same invoice twice, caught by a document hash registry. All data in the demo is simulated.
Key Features
- Financing-option matching — compares supplier credit, bank import loans and escrow-backed loans by true cost and eligibility
- 90-day cash-flow forecasting with shortfall, deadline and FX-timing alerts plus a what-if simulator
- Order analysis — landed cost, margin, break-even price, monthly summary and supplier scorecard
- Milestone escrow (30/60/10) with evidence-based tranche release and CNY settlement comparison
- Trade-document forensics — cross-checks invoices, packing lists and bills of lading; reveals hidden-text injections
- Duplicate-financing detection with exact and semantic document fingerprints
- Duplicate-financing detection with exact and semantic document fingerprints
- Deterministic risk-tier engine (Tier 0–3) with one-tap approval, simulated OTP and cooling-off
- Privacy Gateway — reversible masking so no personal or account data reaches the LLM
- Layered prompt-injection defence with a live attack console
- Ed25519-signed, hash-chained audit log with a public in-browser verifier
- Bilingual AI chat (English/Bangla) with tool cards and cited answers (RAG)
- Guided judge demo with isolated sandboxes, presenter and recording modes
Architecture
Setu runs as two services. The Next.js (TypeScript, Tailwind) web app serves the buyer dashboard, supplier portal, admin console and guided demo. A Python FastAPI service hosts the AI agent, built with LangGraph and LangChain on Claude (Haiku for routine steps, Sonnet for document reasoning), traced with LangSmith.
Every user message and document first passes a Privacy Gateway that replaces sensitive values with reversible tokens, then untrusted text is wrapped and scanned for prompt injection. The agent calls deterministic tools (finance library, cash-flow forecaster, financing matcher, KYB, document forensics) — all money math uses Decimal in plain code, never the LLM.
Any money action goes through a rule-based risk-tier engine at the service layer: low-risk releases run automatically, others create approval requests that need one-tap or OTP confirmation. Every action is written to an append-only, Ed25519-signed, hash-chained audit log. PostgreSQL with pgvector stores deals, the escrow ledger, the document hash registry and the RAG knowledge base (local multilingual embeddings).
Tech Stack
- Next.js
- TypeScript
- Tailwind CSS
- Python
- FastAPI
- LangGraph
- LangChain
- LangSmith
- PostgreSQL
- pgvector
- NeonDB
- Playwright
- Vercel