A powerful AI-powered credit underwriting system that analyzes bank statements to make automated lending decisions. The system processes PDF bank statements and provides detailed financial analysis and credit recommendations for different loan products.
-
📊 Comprehensive Bank Statement Analysis
- Statement continuity verification
- Daily balance tracking
- NSF (Non-Sufficient Funds) detection
- Monthly closing balance analysis
- Detailed financial metrics calculation
-
🤖 Multiple AI Provider Support
- Anthropic Claude
- Google PaLM
- OpenAI
-
💰 Multi-Product Credit Assessment
- Term Loan analysis
- Accounts Payable Financing analysis
-
🔒 Secure File Handling
- PDF file processing
- Temporary file storage
- Automatic cleanup
- Python 3.8+
- Docker (optional, for containerized deployment)
- Clone the repository:
git clone https://github.com/yourusername/Credit-Underwriter-Agent.git
cd Credit-Underwriter-Agent- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the root directory with the following variables:
ANTHROPIC_API_KEY=your_anthropic_api_key
OPENAI_API_KEY=your_openai_api_key
GOOGLE_API_KEY=your_google_api_keypython main.pyThe application will be available at http://localhost:8080
docker-compose up --buildThe application will be available at http://localhost:8080
GET /- Web interface for file upload and analysisPOST /upload- Upload PDF bank statementsPOST /underwrite- Process uploaded statements and generate credit analysisGET /status- Stream analysis status updatesPOST /clear-uploads- Clear uploaded files
- Access the web interface at
http://localhost:8080 - Upload PDF bank statements
- Select the AI provider (Anthropic, Google, or OpenAI)
- Start the analysis
- View real-time progress updates
- Receive detailed credit analysis and recommendations
The system provides comprehensive analysis including:
- Statement continuity verification
- Daily balance trends
- NSF incidents
- Monthly closing balances
- Financial metrics
- Credit recommendations for different loan products
- Risk factors and mitigating circumstances
- Suggested loan terms and conditions
├── app/ # Application code
│ ├── services/ # Core services
│ ├── tools/ # Analysis tools
│ ├── static/ # Static files
│ └── templates/ # HTML templates
├── utils/ # Utility functions
├── uploads/ # Temporary file storage
├── main.py # Application entry point
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
└── requirements.txt # Python dependencies
- All uploaded files are temporarily stored and automatically cleaned up
- API keys are managed through environment variables
- File size limits are enforced
- Secure filename handling
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.