--- title: PolicyBridge emoji: ๐Ÿ  colorFrom: yellow colorTo: blue sdk: docker app_port: 7860 pinned: false --- # PolicyBridge โ€” P&C Insurance Multi-Agent Pipeline Bronze โ†’ Silver โ†’ Gold ยท 5 XGBoost Agents ยท Flask API ยท Clever Cloud MySQL ## Endpoints | Method | Route | Description | |--------|-------|-------------| | GET | `/status` | DB connectivity + agent model check | | GET | `/submissions/recent?limit=10` | Latest Bronze submissions | | POST | `/submit` | Ingest new submission into Bronze layer | | POST | `/agent/kyc` | Run Agent 1 โ€” SSN / KYC | | POST | `/agent/property` | Run Agent 2 โ€” Property Risk | | POST | `/agent/underwriting` | Run Agent 3 โ€” Underwriting | | POST | `/agent/pricing` | Run Agent 4 โ€” ML Pricing | | POST | `/agent/issuance` | Run Agent 5 โ€” Policy Issuance | | GET | `/debug/tables` | List all DB tables (dev) | | GET | `/debug/submission` | Inspect latest submission (dev) | ## HuggingFace Secrets Required Add these in **Settings โ†’ Variables and Secrets**: ``` MYSQL_ADDON_HOST = btvbbpqhvnttzvptguj3-mysql.services.clever-cloud.com MYSQL_ADDON_PORT = 3306 MYSQL_ADDON_USER = utenclk29u394u1j MYSQL_ADDON_PASSWORD = QXFZTmUtPnXrKFqZKpLQ MYSQL_ADDON_DB = btvbbpqhvnttzvptguj3 ``` ## Model Files (Git LFS) `.pkl` files in `models/` must be tracked with Git LFS before pushing: ```bash git lfs install git lfs track "*.pkl" git add .gitattributes git add models/*.pkl git commit -m "add model files via LFS" git push ```