CoolFace
Apppublic

PABPAT/TCI_Shield

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
README.md176 linesDownload Raw Back to root
1---2title: TCI Shield3emoji: ๐Ÿ›ก๏ธ4colorFrom: blue5colorTo: green6sdk: docker7app_port: 85018pinned: false9short_description: AI-powered trade credit insurance underwriting agent10tags:11  - streamlit12  - aws13  - insurance14  - agent15---16 17# TCI Shield18 19AI-powered trade credit insurance underwriting using Amazon Nova.20 21## Overview22 23TCI Shield is a voice and text-based trade credit insurance underwriting agent. A business owner speaks to Alex, an AI underwriter powered by Amazon Nova 2 Sonic, provides their business and buyer details, and receives a policy โ€” entirely through conversation.24 25## Architecture26 27```28Voice (Nova 2 Sonic)     Text Chat (Nova Lite)29        |                        |30        |                        |31        +-----------+------------+32                    |33            Strands Agent34            (Nova Lite)35                    |36        +-----------+------------+37        |           |            |38  Underwriting   Document     DynamoDB39   Engine       Extractor40  (Risk Score)  (Nova         (Policies)41                Multimodal)42```43 44## Nova Models Used45 46- **Amazon Nova 2 Sonic** โ€” real-time bidirectional voice conversation47- **Amazon Nova Lite** โ€” agent reasoning and underwriting orchestration48- **Amazon Nova Multimodal** โ€” financial document extraction (PDF, DOCX, XLSX)49 50## Features51 52- Voice-based insurance application via Amazon Nova 2 Sonic53- Text chat application via AWS Strands Agents and Nova Lite54- Automated risk scoring engine with 6 weighted dimensions55- Financial document extraction using Nova Multimodal56- Policy generation with 3 coverage options57- Policy issuance and storage in AWS DynamoDB58- Streamlit UI with voice agent, text chat, policy summary, and dashboard59 60## Risk Scoring Model61 62The underwriting engine scores risk across 6 dimensions:63 64- Industry risk65- Buyer country risk66- Financial health ratios67- Payment terms68- Portfolio concentration69- Loss history70 71Scores map to 4 policy tiers: Standard, Enhanced, High Risk, or Declined.72 73## Project Structure74 75```76Trade_Credit_Agent/77    app.py                      # Streamlit entry point78    pages/79        1_Voice_Agent.py        # Nova Sonic voice interface80        2_Text_Chat.py          # Nova Lite text chat81        3_Policy_Summary.py     # Latest policy view82        4_Dashboard.py          # All policies dashboard83    tci_agent.py                # Strands Agent + underwriting tools84    voice_agent.py              # Nova Sonic bidirectional streaming85    underwriting_engine.py      # Risk scoring engine86    document_extractor.py       # Nova Multimodal document extraction87    database.py                 # DynamoDB operations88    models.py                   # Pydantic validation models89    config.py                   # AWS configuration90    .env.example                # Environment variables template91```92 93## Setup94 95### Prerequisites96 97- Python 3.1398- AWS account with Bedrock access99- AWS CLI configured with `aws configure`100 101### Installation102 103```bash104git clone https://github.com/PABPAT/TCI_Shield.git105cd TCI_Shield106python -m venv venv107source venv/bin/activate108pip install -r requirements.txt109```110 111### Environment Variables112 113Copy `.env.example` to `.env` and fill in your values:114 115```bash116cp .env.example .env117```118 119```120COMPANIES_HOUSE_API_KEY=your_key_here121```122 123### AWS Setup124 125```bash126aws configure127```128 129Enter your AWS access key, secret key, and set region to `us-east-1`.130 131Enable these models in AWS Bedrock console:132- `amazon.nova-lite-v1:0`133- `amazon.nova-2-sonic-v1:0`134 135### Run136 137```bash138streamlit run app.py139```140 141Open `http://localhost:8501` in your browser.142 143## Dependencies144 145```146strands-agents147strands-agents-tools148boto3149aws-sdk-bedrock-runtime150smithy-aws-core151pyaudio152pydantic153streamlit154python-dotenv155```156 157## Built With158 159- Amazon Nova 2 Sonic160- Amazon Nova Lite161- Amazon Nova Multimodal162- AWS Strands Agents163- AWS Bedrock164- AWS DynamoDB165- Python 3.13166- Streamlit167 168## Hackathon169 170Built for the [Amazon Nova AI Hackathon](https://amazon-nova.devpost.com/) โ€” March 2026.171 172Category: Voice AI + Agentic AI173 174## Live Demo175๐Ÿš€ [Try TCI Shield on Hugging Face](https://huggingface.co/spaces/PABPAT/TCI_Shield)176