Insurance Claim Copilot - Generative UI Global Hackathon: Agentic Interfaces
AI Tinkerers - Pune
Hackathon Showcase

Insurance Claim Copilot

Team consisting of three FPL Technologies (OneCard) software engineers skilled in Python backend, real-time AI voice pipelines, LiveKit, and scalable cloud-native system design.

3 members

Insurance Claim Copilot

One-line pitch

Talk to it like a person. It builds the paperwork for you.


The Problem

Filing an insurance claim is painful. You’re already stressed from an accident, flood, or theft — and now you have to navigate confusing forms, policy jargon, document checklists, and back-and-forth with adjusters. Most people don’t know what they’re entitled to, what documents they need, or whether a settlement offer is fair.

Existing solutions are either rigid web forms or generic chatbots that give paragraphs of advice but still leave you to do all the actual work.


What We Built

Insurance Claim Copilot is an AI-powered claim filing assistant where the conversation is the interface.

You don’t fill out forms — you describe what happened in plain English. The AI agent reads your message and instantly generates the right interactive UI: a pre-filled claim form, a damage assessment card, a coverage analysis dashboard, or a document checklist. Every screen is built on-the-fly from your conversation.

This is not a chatbot. The agent never responds with a wall of text. Every single response is a rendered UI component — interactive, actionable, and specific to your situation.


How It Works

You: "I was rear-ended at a stoplight yesterday. The other driver was texting."  
  
Agent renders:  
  ┌─────────────────────────────────────┐  
  │  Auto Claim Form                    │  
  │  Date:     May 8, 2026  (pre-filled)│  
  │  Fault:    Other Party  (pre-filled)│  
  │  Injuries: [ ] Yes  [x] No          │  
  │  Police report #: [          ]      │  
  │  [Save & Continue]                  │  
  └─────────────────────────────────────┘  
  
You: "The trunk is caved in and the bumper is hanging off."  
  
Agent renders:  
  ┌─────────────────────────────────────┐  
  │  Damage Assessment                  │  
  │  Trunk lid    ████████░░  Severe    │  
  │  Rear bumper  █████████░  Severe    │  
  │  Tail lights  ████░░░░░░  Moderate  │  
  │  Est. cost:   $3,200 - $4,800       │  
  └─────────────────────────────────────┘  
  
You: "Am I covered?"  
  
Agent renders:  
  ┌─────────────────────────────────────┐  
  │  Coverage Analysis — AUTO-2024-7829 │  
  │  Collision       ✅  $500 deductible│  
  │  Rental car      ✅  30 days        │  
  │  Diminished val. ❌  Not covered    │  
  │  Your out-of-pocket:  ~$500         │  
  └─────────────────────────────────────┘  

Different claim type? Completely different UI. “My basement flooded” generates water damage fields, room selectors, and mitigation checklists. The interface is truly generative — not a template switcher.


Key Features

  • Natural language claim filing — describe what happened, agent extracts dates, locations, fault, and damage automatically
  • 9 generative UI components rendered contextually based on conversation — forms, assessments, coverage tables, calculators, timelines, settlement cards
  • Auto-updating document checklist — mention your police report number in chat, the checklist re-renders with that item checked off
  • Coverage analysis — policy terms matched against your specific claim, out-of-pocket calculated automatically
  • Settlement negotiation — compare the insurer’s offer to your claimed value, generate a counter-offer with justification
  • Multi-claim-type support — Auto, Home/Water, Medical, Theft — each generates different form fields and workflows
  • Full claim lifecycle — incident → assessment → coverage → documents → filing → tracking → settlement

Why It’s Different

Traditional Claim Portal Insurance Claim Copilot
Static forms you fill manually Forms pre-filled from your conversation
Generic FAQ chatbot Agent renders interactive UI, not text
Same form for all claim types Different UI generated per claim type
You figure out your coverage Coverage analyzed against your specific claim
Document list buried in FAQs Live checklist auto-updates as you provide info
Settlement offer — take it or leave it Counter-offer flow with justification

Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS
Agent UI CopilotKit (useCopilotAction, CopilotSidebar)
Backend Python FastAPI, LangGraph
LLM Claude claude-sonnet-4-5 (Anthropic)
Protocol AG-UI — SSE stream from agent to browser
DevOps Docker, PowerShell one-command startup

The Hackathon Angle

This project demonstrates what Generative UI actually means — not just generating text that describes a form, but generating the form itself. The agent decides what component to render, what fields to show, and what data to pre-fill — all from a single natural language message.

Every judge interaction looks different. Every claim type produces a unique interface. That’s the demo that wins.

Insurance Claim Copilot — Project Status

Event: AI Tinkerers Hackathon — Generative UI Track
Date: May 9, 2026
Repo: github.com/VISHARAD17/ai-hackathon


What We Built

An AI copilot for filing and managing insurance claims.
The user describes what happened in plain English — the agent responds with interactive UI, not text.
Forms, damage assessments, coverage dashboards, and settlement flows are all rendered dynamically from conversation.

“Same app. Two claim types. Completely different UI.” — That’s generative UI.


Tech Stack

Frontend

Technology Version Role
Next.js 16.2.6 App framework (App Router)
React 19.2.4 UI rendering
TypeScript 5.x Type safety
Tailwind CSS 4.x Styling
CopilotKit React Core 1.57.1 Agent communication + useCopilotAction
CopilotKit React UI 1.57.1 CopilotSidebar chat interface
CopilotKit Runtime 1.57.1 Next.js API route handler

Backend

Technology Version Role
Python 3.12.7 Runtime
FastAPI 0.115+ HTTP server + REST API
Uvicorn 0.32+ ASGI server
LangGraph 1.0+ Agent state machine (graph orchestration)
LangChain Anthropic 0.3+ Claude integration
Claude (claude-sonnet-4-5) LLM powering the agent
CopilotKit Python SDK 0.1.88+ AG-UI SSE event emission
python-dotenv 1.0+ Environment variable management

Infrastructure

Tool Role
Docker + docker-compose Containerized deployment
PowerShell (start.ps1) One-command local dev startup
GitHub Source control

Protocol

  • AG-UI (Agent-UI Protocol) — SSE stream from Python agent → CopilotKit runtime → browser
  • CopilotKit wires the LangGraph agent’s tool calls to React component renders

Architecture

Browser (localhost:3000)  
    │  
    │  User types in CopilotSidebar  
    ▼  
Next.js App (App Router)  
    │  
    │  POST /api/copilotkit  
    ▼  
CopilotKit Runtime  ──── remoteEndpoint ────►  FastAPI (localhost:8000)  
                                                    │  
                                                    │  /copilotkit  
                                                    ▼  
                                              LangGraph Agent  
                                              (claude-sonnet-4-5)  
                                                    │  
                                         Agent calls UI tool  
                                         (e.g. showClaimForm)  
                                                    │  
                                           AG-UI SSE event  
                                           streams back to  
                                              browser  
                                                    │  
                                                    ▼  
                                         useCopilotAction render()  
                                         → React component appears  
                                           in the chat sidebar  

What’s Done

Backend ✅

  • FastAPI app (main.py) with CORS for localhost:3000
  • CopilotKit Python SDK wired with LangGraphAGUIAgent
  • LangGraph state machine (agent.py) with AgentState
  • Claude claude-sonnet-4-5 bound to all 9 tools
  • System prompt (prompts.py) — agent NEVER responds with text, always renders a UI tool
  • Health check endpoint: GET /health
  • .env support for ANTHROPIC_API_KEY
  • Dockerfile for containerized deployment
  • .dockerignore configured

9 Backend Tool Definitions ✅

All tools define the exact parameter schemas the LLM must satisfy:

Tool Triggers When
showClaimForm User describes a new incident
showDamageAssessment User describes or uploads damage
showCoverageAnalysis User asks about policy coverage
showCostCalculator User asks about costs / payout
showDocumentChecklist User asks what docs are needed, or provides one
showClaimTimeline User asks about claim status
showSettlementOffer Settlement is discussed
showProviderFinder User asks for repair shops / doctors
showClaimSummary User is ready to submit

Frontend ✅

  • Next.js App Router setup with TypeScript + Tailwind
  • layout.tsx — CopilotKit provider + CopilotSidebar
  • page.tsx — Landing page with prompt suggestions
  • api/copilotkit/route.ts — API route (proxies to Python backend)
  • use-copilot-actions.tsx — All 9 useCopilotAction hooks registered

9 Generative UI Components ✅

All components built in frontend/src/components/generative-ui/:

Component File Renders
claim-form.tsx Dynamic claim intake form (fields change by claim type)
damage-assessment.tsx Component-level damage breakdown with severity bars
coverage-analysis.tsx Policy coverage table with payout calculation
cost-calculator.tsx Itemized cost breakdown with deductible math
document-checklist.tsx Required docs with auto-check + upload/enter actions
claim-timeline.tsx Progress tracker with stage statuses + dates
settlement-offer.tsx Offer vs claim comparison with accept/counter/explain
provider-finder.tsx Nearby repair shops / medical providers list
claim-summary.tsx Final review card before submission

DevOps / Tooling ✅

  • start.ps1 — Single PowerShell script that:
    • Checks Python + Node installed
    • Creates .venv if missing
    • Installs all Python deps
    • Validates API key
    • Installs Node deps if missing
    • Creates frontend/.env.local if missing
    • Launches backend + frontend in separate windows
  • docker-compose.yml — Full containerized setup
  • frontend/Dockerfile — Multi-stage Next.js build (standalone output)
  • backend/Dockerfile — Python 3.11-slim
  • next.config.ts updated with output: "standalone" for Docker

Documentation ✅

  • INSURANCE_CLAIM_COPILOT.md — Full build guide, UI wireframes, demo script
  • IMPLEMENTATION_PLAN.md — Phase-by-phase task breakdown
  • MULTI_AGENT_ARCHITECTURE.md — 5-agent system design with flow diagrams
  • CLAUDE_AGENT_PROMPTS.md — 6 ready-to-use architect agent prompts
  • frontend/CODE_REVIEW_GRAPH.md — Frontend code review map

What’s Remaining

Task Priority Effort
Fix route.ts to use remoteEndpoints (currently uses OpenAIAdapter) 🔴 Critical 5 min
Add missing 6 actions to use-copilot-actions.tsx (only 3 of 9 registered) 🔴 Critical 30 min
Add mock policy data to backend (mock_data.py) 🟡 High 20 min
Polish landing page (page.tsx) 🟡 High 30 min
End-to-end demo test (all 9 flows) 🟡 High 30 min
Real API key in backend/.env 🔴 Critical 2 min

Demo Flow (2 min pitch)

<ol start="1">  
<li>Open app  →  Landing page + CopilotSidebar open on right</li>  
</ol>  
  
<ol start="2">  
<li>Type: “I was rear-ended at a stoplight yesterday”</li>  
</ol>  
   → Claim Form renders, date/fault pre-filled from message  
  
<ol start="3">  
<li>Type: “The trunk is caved in and rear bumper is hanging off”</li>  
</ol>  
   → Damage Assessment card: severity bars + cost estimate  
  
<ol start="4">  
<li>Type: “Am I covered for this?”</li>  
</ol>  
   → Coverage Analysis: policy table + out-of-pocket calculation  
  
<ol start="5">  
<li>Type: “What documents do I need?”</li>  
</ol>  
   → Document Checklist: items with status  
  
<ol start="6">  
<li>Type: “Police report number is PD-2026-1234”</li>  
</ol>  
   → Checklist RE-RENDERS with police report auto-checked  
  
<ol start="7">  
<li>Type: “I’m ready to submit”</li>  
</ol>  
   → Claim Summary: full review before submit  
  
POWER MOVE: Start second conversation  
   "My basement flooded" → completely different form fields.  
   Proves it's truly generative, not hardcoded.  

Key Numbers

Metric Value
Generative UI components 9
Backend tools 9
Lines of Python ~400 (main + agent + prompts)
Lines of TypeScript ~800 (components + hooks + pages)
Setup time (first run) ~3 min (script handles everything)
Setup time (subsequent) ~5 seconds
LLM Claude claude-sonnet-4-5
Protocol AG-UI over SSE