Inspiration

We kept running into the same problem, when you're stuck on something at 2am, there's no one to actually explain it to you. Google has answers, YouTube has tutorials, but nothing that just talks to you and figures out what you need. We wanted to build something that felt like having a tutor on call, not just a search engine.

What it does

Mentora is a real-time AI voice tutor powered by Gemini Live API. You talk to it, it talks back, and it automatically detects what subject you're studying from context alone. You can pick a teaching persona depending on how you like to learn. It also generates practice tests, flashcards, and session summaries on demand. Your conversation history is saved to Firestore so you can pick up exactly where you left off.

How we built it

  • Gemini Live API for real-time bidirectional voice streaming over WebSocket
  • Vertex AI (gemini-2.5-flash) for chat, subject detection, image analysis, practice tests, summaries, and flashcards
  • Node.js + Express backend deployed on Google Cloud Run
  • Firebase Firestore for persistent session storage
  • Firebase Hosting for the frontend
  • Google Cloud Secret Manager to securely store and load the Gemini API key at startup

Challenges we ran into

The hardest part was getting the WebSocket pipeline stable. The Gemini Live API accumulates tokens over the course of a session at 25 tokens per second of audio, so longer sessions would hit the 128k context window limit and cut off unexpectedly. We also spent a lot of time debugging the migration from direct API keys to Vertex AI ADC authentication and getting Secret Manager wired correctly into the Cloud Run deployment.

Accomplishments that we're proud of

Getting the full end-to-end voice pipeline working with natural interruptions and low latency was the biggest win. The subject auto-detection working purely from conversation context with no user input was also something we're really happy with.

What we learned

A lot about WebSocket session management, Google Cloud IAM and Application Default Credentials, how the Gemini Live API handles long-running sessions with token accumulation, and how to structure a production backend on Cloud Run with Secret Manager.

What's next for Mentora

Expanding the persona system with more teaching styles and subject-specific tutors, adding multi-language support so students can learn in their native language, and building a progress tracking system so students can see how they are improving over time.


Proof of Google Cloud Deployment

Backend source code showing Vertex AI API calls: https://github.com/sukhrajsandhar/Mentora/blob/main/backend/js/server.js

Optional Developer Contributions

LinkedIn post (created for the purposes of entering the #GeminiLiveAgentChallenge): https://www.linkedin.com/posts/sukhrajsandhar_geminiliveagentchallenge-share-7438821893408976896-pSQz?utm_source=share&utm_medium=member_desktop&rcm=ACoAADi0ik0BlEfUQzVRlaAUcqCfwixXwiv_92s

GDG Membership: Sukhraj Sandhar - https://developers.google.com/profile/u/sukhrajsandhar Manraaj Singh - https://developers.google.com/profile/u/UmbraDomini

Built With

  • css
  • firebase-hosting
  • gemini-live-api
  • google-cloud-run
  • html
  • javascript
  • secret-manager
  • vertex-ai
Share this project:

Updates