A production-ready AI-powered insurance claims processing application demonstrating advanced multi-agent AI patterns with LangGraph on AWS EKS. This repository showcases intelligent, autonomous decision-making systems for insurance claims adjudication with fraud detection.
- 🤖 AI-Powered Automation: Intelligent claim review with ML-driven fraud detection
- 👥 4 Persona Portals: Claimant, Adjuster, SIU, and Supervisor interfaces
- 📊 Comprehensive Business KPIs: Loss ratio, fraud analytics, processing efficiency
- 🔍 Smart Fraud Detection: Real-time risk scoring with explainable AI
- ⚡ Cloud-Native & Scalable: Kubernetes deployment with auto-scaling
- 🛡️ Enterprise Security: AWS Secrets Manager, RBAC, secure data handling
- 📈 Production Monitoring: CloudWatch integration with custom metrics
# Required tools
- AWS CLI (configured with credentials)
- kubectl (v1.27+)
- Terraform (v1.5+)
- Docker (v20.10+)
- jq# Clone repository
git clone https://github.com/aws-samples/sample-agentic-insurance-claims-processing-eks.git
cd sample-agentic-insurance-claims-processing-eks
# Deploy everything (infrastructure + apps + data)
./scripts/deploy.shWhat it does:
- ✅ Auto-detects your AWS account ID and region
- ✅ Deploys EKS cluster and infrastructure via Terraform
- ✅ Builds and pushes Docker images to ECR
- ✅ Deploys Kubernetes applications
- ✅ Loads 500 sample policies and 100 claims
- ✅ Displays application access URL
# Infrastructure only
./scripts/deploy.sh --terraform-only
# Applications only (skip Terraform)
./scripts/deploy.sh --apps-only
# Custom data volumes
./scripts/deploy.sh --policies 1000 --claims 300
# Load additional data
./scripts/load-data.sh --policies 500 --claims 200 --clearAccess via ALB URL (displayed after deployment):
| Portal | Endpoint | Purpose |
|---|---|---|
| Claimant | /claimant |
Submit insurance claims with policy verification |
| Adjuster | /adjuster |
Review claims, AI risk assessment, approve/deny |
| SIU | /siu |
Investigate fraud, escalate cases, document findings |
| Supervisor | /supervisor |
Business KPIs, analytics, performance monitoring |
The Supervisor Portal provides enterprise-grade analytics:
- Loss Ratio: (Incurred Losses + LAE) / Earned Premiums (target: <70%)
- Expense Ratio: Operating Expenses / Earned Premiums (industry avg: 25-30%)
- Combined Ratio: Loss Ratio + Expense Ratio (<100% = underwriting profit)
- Approval Rate: % of processed claims approved
- Processing Time: Average claim resolution time (current: 2.3 min)
- AI Accuracy: Fraud detection model performance (94.7%)
- Financial Performance: Premiums, incurred losses, operating expenses, underwriting profit
- Fraud Risk Analysis: High/medium/low risk distribution
- Claims Distribution: By type, status, and geographic location
- Operational Metrics: Processing efficiency, throughput, uptime
┌─────────────────────────────────────────────────────────┐
│ Application Load Balancer (ALB) │
└───────────────────────┬─────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌────▼────┐ ┌─────▼──────┐ ┌───▼──────┐
│ Web UI │ │Coordinator │ │Simulator │
│ Portal │ │ (Agent) │ │ │
└────┬────┘ └─────┬──────┘ └──────────┘
│ │
│ ┌─────┴─────┬──────────┬──────────┐
│ │ │ │ │
│ ┌────▼────┐ ┌───▼────┐ ┌───▼────┐ ┌──▼─────┐
│ │ Policy │ │ Fraud │ │ Risk │ │External│
│ │ Agent │ │ Agent │ │ Agent │ │ APIs │
│ └────┬────┘ └───┬────┘ └───┬────┘ └──┬─────┘
│ │ │ │ │
└─────────┴──────────┴──────────┴─────────┘
│
┌────────────┴────────────┐
│ │
┌────▼─────┐ ┌────▼────┐
│ MongoDB │ │ Redis │
│ (Claims) │ │ (Cache) │
└──────────┘ └─────────┘
Detailed architecture documentation: ARCHITECTURE.md
| Document | Description | Audience |
|---|---|---|
| Quick Start | One-command deployment to get running in 30 minutes | Everyone |
| Deployment Guide | Complete deployment instructions with configuration options | DevOps, Developers |
| Demo Guide | Interactive 20-30 min demo walkthrough for stakeholders | Sales, Product, Executives |
| Document | Description | Audience |
|---|---|---|
| Architecture Overview | System design, components, and data flow | Technical teams |
| Insurance Claims Processing | Domain features, persona portals, and workflows | Product, Business |
| LangGraph Agentic System | AI architecture and agent coordination | AI/ML Engineers |
| Document | Description | Audience |
|---|---|---|
| Production Deployment | Production checklist and best practices | DevOps, SRE |
| Infrastructure Setup | AWS infrastructure provisioning with Terraform | Cloud Engineers |
| Secrets Management | Security configuration and credential management | Security, DevOps |
| Document | Description | Audience |
|---|---|---|
| Video Demo Guide | 4-5 minute recorded demo instructions | Marketing, Sales |
| Human-in-the-Loop Demo | Complete demo with human decision workflow | Technical demos |
/
├── README.md # This file - project overview
├── ARCHITECTURE.md # System architecture and design
├── DEMO_GUIDE.md # Interactive demo walkthrough
├── AUTOMATED_DEPLOYMENT.md # Automated deployment system docs
├── SECURITY.md # Security policy and guidelines
│
└── docs/
├── DEPLOYMENT_GUIDE.md # Complete deployment instructions
├── INFRASTRUCTURE_SETUP.md # AWS infrastructure details
├── PRODUCTION_DEPLOYMENT.md # Production best practices
├── SECRETS_MANAGEMENT.md # Security and secrets
├── INSURANCE_CLAIMS_PROCESSING.md # Domain features and portals
├── LANGGRAPH_AGENTIC_README.md # AI agent architecture
├── VIDEO_DEMO_GUIDE.md # Video recording guide
└── DEMO_WITH_HUMAN_IN_THE_LOOP.md # Human decision workflow
| Layer | Technology | Purpose |
|---|---|---|
| Orchestration | AWS EKS | Managed Kubernetes |
| IaC | Terraform | Infrastructure as Code |
| Compute | Karpenter | Node auto-scaling |
| Networking | AWS VPC + ALB | Load balancing & routing |
| AI Framework | LangGraph | Agentic workflows |
| LLM | Ollama (Qwen2.5) | Local LLM inference |
| Database | MongoDB | Document storage |
| Cache | Redis | Session & response caching |
| Backend | FastAPI + Python | Web services |
| Monitoring | CloudWatch | Metrics & logging |
| Secrets | AWS Secrets Manager | Credential management |
The deployment scripts automatically detect:
- AWS Account ID via
aws sts get-caller-identity - AWS Region from AWS CLI configuration
- ECR Registry constructed as
{account-id}.dkr.ecr.{region}.amazonaws.com
export AWS_REGION=us-west-2
export EKS_CLUSTER_NAME=agentic-eks-cluster
export OLLAMA_MODEL=qwen2.5-coder:7b# infrastructure/kubernetes/coordinator.yaml
spec:
replicas: 3
resources:
requests:
cpu: "1000m"
memory: "2Gi"
limits:
cpu: "2000m"
memory: "4Gi"| Metric | Value | Target |
|---|---|---|
| Avg Processing Time | 2.3 min | < 3 min |
| Throughput | 1000+ claims/day | - |
| AI Accuracy | 94.7% | > 90% |
| Fraud Detection Rate | 10-15% | Industry standard |
| System Uptime | 99.2% | > 99% |
| API Response Time | < 200ms | < 500ms |
- ✅ IAM Roles for Service Accounts (IRSA)
- ✅ AWS Secrets Manager for credentials
- ✅ Network policies for pod isolation
- ✅ TLS termination at ALB
- ✅ RBAC for Kubernetes resources
- ✅ Container image scanning
- ✅ CloudWatch audit logging
# Validate deployment
./scripts/validate-deployment.sh
# Run end-to-end tests
./tests/comprehensive-e2e-demo.sh
# Load test data (configurable volumes)
./scripts/load-data.sh --policies 1000 --claims 300 --clearECR Authentication Error
aws ecr get-login-password --region $AWS_REGION | \
docker login --username AWS --password-stdin \
$(aws sts get-caller-identity --query Account --output text).dkr.ecr.$AWS_REGION.amazonaws.comPods Stuck in Pending
kubectl get nodes # Check node availability
kubectl describe pod <pod-name> -n insurance-claims # Check eventsMongoDB Connection Issues
kubectl get pods -n insurance-claims -l app=mongodb
kubectl logs -n insurance-claims -l app=mongodb --tail=50Check Application Logs
kubectl logs -n insurance-claims -l app=web-interface --tail=100# Pull latest changes
git pull origin main
# Rebuild and deploy web interface
./rebuild-web-interface.shcd infrastructure/terraform
terraform plan
terraform apply# Create backup
kubectl exec -n insurance-claims <mongodb-pod> -- \
mongodump --out=/backup --username=admin --password=<password> --authenticationDatabase=admin
# Copy backup locally
kubectl cp insurance-claims/<mongodb-pod>:/backup ./mongodb-backup-$(date +%Y%m%d)- Application Logs:
/aws/eks/insurance-claims/application - Container Insights: Cluster-level metrics
- Custom Metrics: Business KPIs and processing metrics
# Check pod status
kubectl get pods -n insurance-claims
# View resource usage
kubectl top pods -n insurance-claims
kubectl top nodes
# Check ingress
kubectl get ingress -n insurance-claims- LangGraph Documentation: langchain-ai.github.io/langgraph
- AWS EKS Best Practices: aws.github.io/aws-eks-best-practices
- Terraform EKS Modules: registry.terraform.io/modules/terraform-aws-modules/eks
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request with clear description
MIT License - see LICENSE file for details
- AWS EKS Blueprints for Terraform modules
- LangGraph team for agentic AI framework
- Ollama for local LLM inference
- MongoDB for flexible document storage
Built for Enterprise AI Applications
Production-ready • Scalable • Secure