💡 Inspiration

Almost everyone is quietly bleeding money to subscriptions they forgot about — a free trial that converted to paid, two streaming services that do the same thing, a price that crept up without anyone noticing. Auditing them by hand is tedious, so nobody does it.

I didn't want to build another chatbot that just tells you about the problem. The whole point of this hackathon is AI that takes action — so I built an agent that audits your subscriptions, reasons about what's actually waste, cancels it on your approval, and remembers your decisions so it gets smarter every time you use it.

🛡️ What it does

Second Opinion is a personal subscription-auditing agent that runs a real multi-step mission while keeping you in control:

  1. Recalls you. On open, it reads its memory from MongoDB and greets you with continuity — what you cancelled last time, what you said you want to keep.
  2. Reads your data. It pulls your active subscriptions and six months of transaction history from MongoDB Atlas.
  3. Reasons with Gemini. Gemini decides what's genuine waste — unused services, duplicate/overlapping apps, and silent price hikes caught by comparing old vs. new charges — and, importantly, what to protect.
  4. Takes action. On your approval, it cancels the subscription and writes the decision back to memory so the next session reflects it.
  5. Shows its work. A live "Agent Brain" panel streams every backend step — Mongo reads, memory recall, the Gemini audit — so the reasoning is fully transparent.

In my demo it surfaces ~$50/month (~$600/year) of waste, while deliberately protecting the user's daily-used music and main video services and explaining why.

🧠 How I built it

  • Brain — Gemini: The reasoning runs on Gemini (via the @google/genai SDK). Gemini is the one making the judgment calls: which subscriptions are waste, why, and what to keep.
  • Data + memory — MongoDB Atlas: Three collections do the heavy lifting — subscriptions (operational data), transactions (the six-month history that reveals price hikes), and user_memory (the persistent layer that makes the agent feel like it knows you). This is MongoDB Atlas acting as the memory layer for an agent.
  • Partner integration: MongoDB via its MCP server.
  • Interface — Next.js: A two-zone UI — a chat pane plus the live Agent Brain panel that makes the MongoDB operations and the agent's reasoning visible in real time.

🚧 Challenges I ran into

The hardest parts weren't the idea — they were the plumbing under real time pressure:

  • Authentication maze. Getting a working Gemini setup meant navigating Express mode, blocked billing profiles, and disabled/restricted API keys before landing on a clean Google AI Studio key that worked.
  • MCP wiring. The MongoDB MCP server didn't always expose its tools cleanly to the build environment, so I verified the database directly and built the app to query Atlas reliably.
  • Making "action" real. I pushed past a simple status flag toward a flow where the agent genuinely executes a task — cancelling and persisting the decision — under human approval.
  • Keeping the agent honest. Tuning the system prompt so Gemini reasons about waste from the raw data and shows judgment (protecting what you value) rather than blindly flagging everything.

📚 What I learned

  • Memory is what turns a chatbot into an agent. The single most impactful feature was persistence — an agent that remembers your past decisions feels fundamentally different from one that forgets you the moment you close the tab.
  • Make the reasoning visible. The Agent Brain panel did more for trust and "wow" than any amount of backend polish — letting people see the agent work changes how they perceive it.
  • Ship the working narrow thing. Under a tight deadline, a focused agent that nails one real task beats an ambitious one that breaks.

🚀 What's next

  • Connect real account data through an aggregation provider (e.g. Plaid) so the audit runs on live transactions.
  • Add semantic/vector search over the catalog for natural queries like "what can I cut?"
  • Extend the agent to negotiate or pause subscriptions, not just cancel them.

🛠️ Built with

Gemini · Google Cloud · MongoDB Atlas · MCP · Next.js · TypeScript

Share this project:

Updates