Inspiration

We all want to help the planet, but most "sustainable" advice feels disconnected from reality. Being told to "bike to work" completely ignores the fact that you might live 20 miles away, and generic tips often fail to address the upfront costs of going green. People are paralyzed not by a lack of caring, but by a lack of relevant direction. We were inspired to build GreenGain to stop the outrageous, cookie-cutter advice and start giving homeowners a hyper-personalized roadmap. We wanted to prove that you can make a massive impact without upending your entire lifestyle—and save thousands of dollars while you're at it.

What it does

GreenGain is a sustainability assistant that respects your reality.

  1. Personalized Assessment: Users complete a quick survey about their specific situation (home type, location, current habits).
  2. No-Nonsense AI Roadmap: Our LangGraph agent analyzes this data to banish generic advice. It finds concrete, high-impact upgrades (like heat pumps or smart insulation) that actually fit the user's profile and saves them tons of money!!
  3. Financial Reality Check: It automatically filters out "bad deals" (like upgrades with 30+ year ROI), focusing only on changes that make financial sense for the user right now.
  4. Impact You Can Feel: It translates abstract carbon metrics into fun, motivating analogies (e.g., "This upgrade saves as much CO2 as planting 50 trees"), making the positive impact tangible.

How we built it

  • Frontend: Next.js and React with Tailwind CSS v4 for a seamless experience.
  • Backend: FastAPI orchestrating the logic, with Supabase for secure user data and state management.
  • The Brains: We used LangChain and LangGraph to build an autonomous agent powered by Google Gemini 2.5 flash
  • Logic: We built strict filtering layers to ensure the AI never suggests something "outrageous" if it doesn't save money or makes no sense for the zip code, the user never sees it.
  • RAG Architecture: We built a custom Retrieval-Augmented Generation (RAG) pipeline.
  • Ingestion: Custom scrapers (scraper.py) harvest rebate data from utility PDFs and websites.
  • Vector Database: Pinecone stores these chunks, indexed by zip code and upgrade type.
  • Embeddings: OpenAI's text-embedding-3-small provides high-precision semantic search.

Challenges we ran into

  • Managing Agentic State: Orchestrating a cyclic graph with LangGraph was complex. Since the graph state updates with every iteration (e.g. accumulating search queries, retries, and document contexts), debugging the flow when the agent loop "decided" to retry or hallucinated a bad edge transition was a major hurdle.
  • Creating the ReAct Loop: Orchestrating a cyclic graph in LangGraph was our biggest technical hurdle. We had to implement a self-reflection step where the agent autonomously evaluated retrieval quality—asking, “Is this source credible, or is it noise?” Debugging the flow when the agent got stuck on low-quality data and forcing it to retry rather than hallucinating an answer required rigorous state management.

Accomplishments that we're proud of

  • Seamless Agent Integration: Successfully creating a background agent that works silently to produce a complex financial roadmap while the user waits is a technical win we are proud of.
  • Actually Useful Advice: We built a tool that we would actually use. It doesn't guilt-trip you; it gives you a shopping list of smart investments.

What's next for GreenGain

  • Auto Filling Tax Forms: Since we already know the exact upgrade and cost, we can automatically fill out the IRS Form 5695 (Residential Energy Credits) PDF for our users, saving them from tax-season headaches.

Built With

  • css
  • fastapi
  • gemini
  • langgraph
  • next.js
  • openai
  • pinecone
  • supabase
  • tailwind
Share this project:

Updates