Inbox AI
Chat with all your emails
Upload a Gmail export and ask questions in plain English, like “How much did I spend on flights in 2024?”. Answers come from your own mail, with citations.
- Python
- RAG
- Claude
- GPT-4
- React
Overview
What it does
Email search is fine for exact words and useless for questions. Inbox AI parses and indexes an entire Google Takeout archive, then answers questions about it: what you spent, where you flew, which subscriptions are still running.
It doubles as an experiment in multi-model design: you can switch between Claude and GPT-4 and compare answer quality, latency and cost on the same question.
How it works
Four stages from archive to answer
01
Parse
Reads the mbox export, decodes MIME parts, strips HTML and normalises headers into clean documents.
02
Index
Turns every email into embeddings in a local vector index.
03
Retrieve
Encodes the question, runs a nearest-neighbour search and assembles the most relevant snippets.
04
Answer
Sends that context to the chosen model, which answers with citations back to the source emails.
Features
What is in it
- Automatic categories: travel, finance, shopping, subscriptions and personal
- Structured extraction of flights, hotels and event bookings
- Spending breakdowns, recurring charges and trends
- Conversation history, and exports to CSV or JSON
- Parsing and indexing stay on your machine; only the snippets a question needs go to the model
The hard parts
Problems worth solving
Email is the least consistent format still in use
One export mixes plain text, nested multipart messages, base64 attachments, HTML with inline CSS and mangled forwards. Clean text needed encoding detection, signature stripping and rebuilding forwarded threads into a timeline.
Amounts and dates in a hundred formats
A price can be “$1,234.56”, “USD 1234.56” or “1,234 dollars”. Extraction combines patterns for known templates with entity recognition for everything else, plus a validation pass that catches misparses.
Two providers, two cost curves
The same question can cost very different amounts on each model. Adaptive context windowing sizes the retrieved context to each provider’s limits and pricing, so quality holds without surprise bills.