Inspiration

My important files were scattered everywhere — insurance PDFs in WhatsApp, tickets in email, statements in Downloads, videos filling my phone. When I needed one detail months later, I'd search five apps and give up. And to save space I'd delete files, then lose the one thing I actually needed. I realized the fear isn't about losing bytes — it's about losing the information inside them. So I built an agent that keeps the memory of a file even after the file itself moves to cheap storage. And since files live on every device but email reaches all of them, email became the way in.

What it does

You email or upload any file — PDF, spreadsheet, document, photo, or video — to an AI agent. The agent reads and understands it, saves a searchable "memory" of its contents, and moves the actual file to cheap cold storage. You get a reply with a summary and a link to your personal vault. Later, you can ask about your files — "what's my policy number?", "how much was rent in January?", "find the beach video" — by web or just by replying to the agent's email, and get the answer or the file back. Bytes go cold, memory stays warm.

How we built it

The backend is FastAPI, with a background email agent (IMAP/SMTP) running inside the same deployment so mail and web work together. Files are parsed by type — text from PDFs, spreadsheets, and documents; visual descriptions of images and video frames using GPT-4o-mini's vision. Everything is embedded with OpenAI embeddings so it's searchable, and questions are answered with retrieval over that memory. Files move to storage through a checksum-verified pipeline (copy → verify → then delete) with an audit trail, so nothing is ever lost. Each user's email address becomes their private vault via a hash — no signup, no passwords — and the agent's reply carries a magic link that logs you straight in. It's deployed on Render and works live today. I built it through intensive AI pair-programming with Claude for architecture and debugging, and used Codex for [fill in honestly: e.g. generating the test suite and running a security review — cite the commits.

Challenges we ran into

Email authentication was the hardest part — Google repeatedly revoked app passwords because it treats automated inbox-scanning as suspicious, which forced a deeper look at OAuth. Making the same code run cleanly on Windows and in the Linux cloud surfaced real bugs: locked SQLite files breaking the reset feature, and file paths behaving differently across systems. A checksum "mismatch" turned out to be trusting a stale saved hash instead of re-hashing the file at archive time. And one corrupt file could silently stop the whole batch from being processed until we isolated failures per file.

Accomplishments that we're proud of

A complete, working product — not a demo — that you can try live in ten seconds or by emailing a file from your phone. The email-as-account idea (your address is your vault, the reply is your login) came together cleanly with no signup flow at all. It handles every common file type including video, describes images with vision, and every file move is checksum-verified so users never have to fear losing anything. And it degrades gracefully — if the AI layer is down, files still store safely.

What we learned

That the interface matters as much as the intelligence — email being universal is what makes this usable by anyone, on any device. On the engineering side: never trust cached state (re-verify at the moment it matters), isolate failures so one bad input can't sink the batch, and expect the same code to behave differently across operating systems. We also learned that authenticating an automated agent with real email providers is a genuine hurdle, and that OAuth exists precisely for this. Most of all, that honest, well-tested foundations beat piling on features.

What's next for Archive Mind

Per-user agent addresses instead of one shared inbox, and full OAuth so the mail layer never breaks. WhatsApp as a second doorway, since that's where many files already live. Auto-tiering to true cold storage (like Glacier) through the same verified pipeline, so storage cost approaches zero. Richer video understanding beyond a single keyframe, and shared family vaults so a household can keep its important documents together.

Built With

Share this project:

Updates