An AI-powered insurance underwriting research tool built with Tavily. Enter a company name and get a comprehensive underwriting report streamed in real time — covering company background, adverse news, risk assessment, products & services, and claims history.
cp .env.sample .envOpen .env and set your Tavily API key:
TAVILY_API_KEY=tvly-your-key-here
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m backend.appThe API server starts at http://localhost:8000.
In a separate terminal:
cd ui
npm install
npm run devThe UI opens at http://localhost:5173.
- Open http://localhost:5173 in your browser.
- Enter a company name (and optional location).
- Results stream in across five research categories:
- Company Information — legal name, industry, NAICS code, employees, revenue, leadership
- Adverse News — lawsuits, regulatory actions, negative press (last 5 years)
- Risk Assessment — financial health, credit ratings, operational/compliance risks, ESG, overall rating
- Products & Services — product lines, markets served, competitive position
- Claims History — insurance claims, loss records, workplace safety, product liability
├── .env.sample # Environment variable template
├── requirements.txt # Python dependencies
├── backend/
│ ├── app.py # FastAPI entry point
│ ├── models.py # Pydantic request/response models
│ ├── research_tasks.py # Research category configurations
│ └── streaming/
│ ├── event_handler.py # Processes Tavily stream events
│ ├── stream_orchestrator.py # Parallel research orchestration
│ └── tavily_stream.py # Tavily API streaming client
└── ui/
├── package.json
├── vite.config.ts
├── tailwind.config.js
└── src/
├── main.tsx # React entry point
├── App.tsx # Main application component
├── types.ts # TypeScript type definitions
└── components/
├── Header.tsx
├── SearchForm.tsx
├── ProgressTracker.tsx
├── ResultsDashboard.tsx
├── CategoryCard.tsx
├── CompanyInfo.tsx
├── AdverseNews.tsx
├── RiskAssessment.tsx
├── ProductsServices.tsx
├── ClaimsHistory.tsx
└── SourcesList.tsx
| Variable | Required | Description |
|---|---|---|
TAVILY_API_KEY |
Yes | Your Tavily API key. Can also be passed via the Authorization header. |
Streams underwriting research results as Server-Sent Events (SSE).
Request body:
{
"company_name": "Acme Corp",
"location": "New York, NY"
}Response: text/event-stream with real-time research updates per category.
