AI-Powered Insurance Intelligence Platform - Multi-agent fraud detection, risk assessment, and automated underwriting built with React + FastAPI + Gemini AI
PolicyMe Cortex is a cutting-edge InsurTech platform that leverages AI to revolutionize insurance operations. Built with React (frontend) and FastAPI + Gemini AI (backend), it automates claims processing, underwriting, fraud detection, and policy management.
- π Claims Hawk-Eye: AI-powered claim analysis with fraud detection (0-100 risk scoring)
- π Underwriting AI: Automated risk assessment and premium calculation
- β Policy Q&A (RAG): Vector-based policy document search with semantic understanding
- β Smart Validator: Rule-based claim validation pipeline
- π Agent Workflow: Multi-agent orchestration for complex decision-making
- π Smart Shopper: Voice-to-application quote generation
polcyme-cortex/
βββ api/ # FastAPI Backend
β βββ main.py # Main API with Gemini AI integration
β βββ requirements.txt # Python dependencies
βββ src/ # React Frontend
β βββ App.js # Main application component
β βββ index.js # Entry point
β βββ style.css # Styles
βββ public/ # Static assets
βββ vercel.json # Deployment configuration
- Node.js 18+
- Python 3.9+
- Gemini API Key (get from Google AI Studio)
1. Clone the repository
git clone https://github.com/sghosh685/policyme-cortex.git
cd policyme-cortex2. Install frontend dependencies
npm install3. Set up backend
cd api
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt4. Configure environment variables
# Create .env in api/ directory
echo "GEMINI_API_KEY=your_gemini_api_key_here" > api/.env5. Run the application
Terminal 1 (Backend):
cd api
uvicorn main:app --reload --port 8000Terminal 2 (Frontend):
npm startOpen http://localhost:3000 π
1. Install Vercel CLI
npm i -g vercel2. Deploy
vercel3. Set environment variables in Vercel Dashboard
- Go to Project Settings β Environment Variables
- Add
GEMINI_API_KEYwith your API key
4. Redeploy
vercel --prod- React 18 - UI framework
- Tailwind CSS - Utility-first styling
- Axios - HTTP client for API calls
- React Hooks - State management
- FastAPI - Modern Python web framework
- Google Gemini AI - LLM for claims analysis and NLP
- Pydantic - Data validation
- Uvicorn - ASGI server
POST /api/claims/analyze
Content-Type: application/json
{
"incidentData": {
"location": "Main St, Toronto",
"dateTime": "2025-12-05T14:00:00Z",
"description": "Rear-end collision",
"injuries": false,
"propertyDamage": true,
"claimedAmount": 4500
},
"policyId": "POL-001"
}Response:
{
"claim_id": "CLM-20251205140000",
"status": "approved",
"fraud_score": {
"score": 15.0,
"risk_level": "Low",
"confidence": 0.85,
"indicators": []
},
"ai_analysis": {
"validity": "valid",
"recommendation": "auto_approve",
"estimated_payout": 4500,
"red_flags": [],
"reasoning": "Standard claim with no red flags"
}
}GET /api/dashboard/statsGET /health| Variable | Description | Required |
|---|---|---|
GEMINI_API_KEY |
Google Gemini AI API key | Yes |
REACT_APP_API_URL |
Backend API URL | No (defaults to localhost) |
- Real-time fraud risk scoring (0-100 scale)
- AI-powered claim validity assessment
- Automated approval for low-risk claims
- Multi-factor fraud indicators
- Extract structured data from broker notes
- Dynamic risk profiling
- Automated premium calculation
- Medical condition analysis
- Upload policy PDFs
- Vector-based semantic search
- Natural language Q&A
- Citation of policy sections
- Hard rule validation (policy status, limits)
- Soft rule AI checks (exclusions)
- Multi-step pipeline visualization
- Instant feedback on claim validity
- Multi-agent orchestration
- Document ingestion β Investigation β Adjudication
- Automated consensus building
- Risk-based routing
- Voice-to-text application intake
- Real-time form population
- Instant quote generation
- Conversion optimization
- Add PostgreSQL database integration
- Implement user authentication (JWT)
- Build admin dashboard
- Add real-time notifications
- Integrate with insurance carrier APIs
- Mobile app (React Native)
- Advanced analytics and reporting
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details
Saikat Ghosh
- GitHub: @sghosh685
- Portfolio: [Your Portfolio URL]
- LinkedIn: [Your LinkedIn]
- Google Gemini AI for LLM capabilities
- Vercel for seamless deployment
- React community for amazing tools
β Star this repo if you find it useful!
Live Demo: policyme-cortex.vercel.app