How sudeshnapathak/bank-onboarding-copilot works
Bank Onboarding Copilot guides customers through savings-account intake, document upload and field confirmation, then prepares a case for human review; it does not make autonomous approval or rejection decisions. The graph includes the documented chat and review stages, OCR and rules, analyst workflow, security, persistence, and the customer/analyst frontend. Some agent and API internals were not excerpted, so their documented capabilities are shown without speculative implementation-level links.
Main entry points: graphs/review.py Review graph · api/review.py Analyst API · agents Chat agents · pipeline.py Document pipeline
Components 27
Customer experience
- Role-based app
frontend/src/App.tsx - Chat and upload
frontend/src/pages/Apply.tsx - Queue and case views
frontend/src/pages/ReviewQueue.tsx - API client
frontend/src/api/client.ts
Chat and intake
- Chat graph
backend/app/graphs/chat.py - Chat agents
backend/app/agents - Turn handling
backend/app/services/turns.py - Case flow
backend/app/services/flow.py - Form schema
backend/app/services/form_schema.py - Guidance retrieval
backend/app/rag/retriever.py
Documents and rules
- Document pipeline
backend/app/ocr/pipeline.py - PDF handling
backend/app/ocr/pdf.py - OCR engines
backend/app/ocr/engine.py - ID parsers
backend/app/ocr/parsers - Field validation
backend/app/rules/validation.py - Risk scoring
backend/app/rules/engine.py
Analyst review
- Review graph
backend/app/graphs/review.py - Analyst API
backend/app/api/review.py - Human decision
backend/app/services/decision.py - LLM explanations
backend/app/llm/factory.py
Platform services
- Backend API
backend/app/main.py - Security controls
backend/app/security - Encrypted uploads
backend/app/services/storage.py - Audit log
backend/app/services/audit.py - Case database
backend/app/models.py
Other components
- Customer
- Analyst
Connections 32
- Customer → Role-based app: uses
README.md - Analyst → Role-based app: uses
README.md - Role-based app → Chat and upload: routes customers
frontend/src/App.tsx - Role-based app → Queue and case views: routes analysts
frontend/src/App.tsx - Chat and upload → API client: submits chat and uploads
frontend/src/pages/Apply.tsx - Queue and case views → API client: requests review data
frontend/src/pages/ReviewQueue.tsx - API client → Backend API: calls API
frontend/src/api/client.ts - Backend API → Chat graph: handles customer turns
README.md - Chat graph → Chat agents: routes turns
README.md - Chat agents → Case flow: uses case flow
backend/app/agents/router.py - Chat graph → Turn handling: processes turns
- Case flow → Risk scoring: uses matching rules
backend/app/services/flow.py - Case flow → Form schema: reads schema
backend/app/services/flow.py - Chat agents → Guidance retrieval: answers guidance queries
README.md - Chat agents → Document pipeline: processes uploads
README.md - Document pipeline → PDF handling: reads PDF input
backend/app/ocr/pipeline.py - Document pipeline → OCR engines: runs OCR
backend/app/ocr/pipeline.py - Document pipeline → ID parsers: parses extracted text
backend/app/ocr/pipeline.py - Review graph → Field validation: validates submitted evidence
backend/app/graphs/review.py - Review graph → Risk scoring: scores flags
backend/app/graphs/review.py - Review graph → LLM explanations: summarizes readiness
backend/app/graphs/review.py - Analyst API → Review graph: starts and resumes review
backend/app/api/review.py - Review graph → Human decision: applies analyst decision
backend/app/graphs/review.py - Analyst API → Human decision: records decision
backend/app/api/review.py - Analyst API → Encrypted uploads: loads document images
backend/app/api/review.py - Encrypted uploads → Security controls: encrypts uploads
backend/app/services/storage.py - Review graph → Audit log: records review events
backend/app/graphs/review.py - Analyst API → Audit log: records access
backend/app/api/review.py - Human decision → Audit log: records decisions
backend/app/services/decision.py - Audit log → Case database: persists audit entries
backend/app/services/audit.py - Analyst API → Case database: reads case and review data
backend/app/api/review.py - Review graph → Case database: persists analysis
backend/app/graphs/review.py