Inspiration
Most people renew their car insurance every year without questioning it — overpaying by hundreds of dollars simply because comparing quotes is tedious and confusing. We wanted to build something that does the hard work for you: read your current policy, understand your coverage, and find you a better deal in seconds. Insurance should work for you, not against you.
What it does
Insursense is an AI-powered insurance optimizer. You upload your current car insurance policy PDF, and the agent:
Extracts your coverage details (carrier, premium, deductibles, liability limits) Queries a market database of quotes across 10 carriers and 12 states Compares your plan apples-to-apples against competitors Identifies the cheapest plan and the best value plan for your vehicle Saves the recommendation and optionally notifies you on Slack No manual data entry. No broker calls. Just answers.
How we built it
Next.js — frontend UI with PDF upload, chat interface, and Auth0 login LangGraph — AI agent orchestration; tools chain together: policy lookup → market query → recommendation → Slack notify Auth0 — secure login, scoped API access tokens, and Token Vault for federated Slack connections Ghost (Timescale) — managed PostgreSQL for storing policies, market quotes, and recommendations OpenAI GPT-4o — extracts structured data from uploaded PDFs and drives the agent reasoning Drizzle ORM — type-safe database schema and queries Terraform — Auth0 tenant fully provisioned as code (clients, resource server, roles, actions)
Challenges we ran into
PDF parsing in Next.js — pdf-parse reads test fixtures at build time, crashing the Next.js build. Fixed by importing the internal library module directly and externalizing it from the server bundle. Auth0 Token Vault — federated token exchange requires a custom resource_server app type that the Terraform Auth0 provider doesn't support. Worked around it using the restapi provider against the Management API directly. Drizzle + TimescaleDB — drizzle-kit push conflicts with TimescaleDB system views. Solved by running raw CREATE TABLE IF NOT EXISTS SQL via Ghost MCP instead. Real market data — live insurance quote scraping is brittle and gated. Built a realistic seeded dataset (1,800 rows across 10 carriers × 15 vehicles × 12 states) so the agent always has data to compare against.
Accomplishments that we're proud of
End-to-end working AI agent: upload a PDF → get a personalized savings recommendation in one chat message Fully infrastructure-as-code Auth0 setup — any team member can spin up a new tenant with one terraform apply Agent works even without an uploaded policy — returns best market deals with zero context Ghost MCP integration in Cursor lets us query and manage the live database directly from the IDE
What we learned
LangGraph's interrupt/resume model is powerful for async flows like OAuth — the Slack Token Vault flow pauses the agent mid-run and resumes after the user connects Auth0 v4 SDK (@auth0/nextjs-auth0) has breaking changes from v3 — especially the callback path (/auth/callback not /api/auth/callback) and how audience is passed Seeded dummy data is underrated for demos — realistic variance in premiums makes the agent's comparisons feel genuinely useful
What's next for Insursense
Real-time quotes — integrate live carrier APIs (Progressive, Geico) for actual bindable quotes Multi-policy support — home, renters, and life insurance comparison Airbyte sync — automated nightly refresh of market quote data from insurance aggregators Renewal alerts — proactively notify users 30 days before renewal if a cheaper option exists Mobile app — snap a photo of your insurance card; the agent handles the rest
Built With
- auth0
- ghost
- kiro
- langgraph
- next.js
- typescript
Log in or sign up for Devpost to join the conversation.