Inspiration

I forget things. Not things of high importance, just the small stuff. Did I sleep well last week? Was I more energetic on days I exercised? I kept meaning to track it and never did. Every app I tried either asked too much upfront or gave nothing back. I wanted something that felt like texting a friend who actually remembered what you told them.

What it does

LifeLog Agent is a health logger you talk to. Tell it how your day went , sleep, mood, energy, water, whether you worked out and it stores everything. Ask for a weekly review and it pulls your data and gives you an actual summary tied to your specific logs, not generic wellness advice.

How we built it

Flask sits in the middle, routing chat messages to Vertex AI Agent Engine and health data to MongoDB Atlas. The agent streams responses over SSE so the UI feels live. PyMongo handles all queries directly. No ORM with every query scoped by user ID so logs stay isolated per person. The frontend is plain HTML/CSS/JS, no framework, no build step. Rate limiting, CSRF origin checks, and Basic Auth on admin routes are all handled as Flask middleware in a single before_request hook. both MongoDb MCP server and the flask app are both deployed to cloud run and the Vertex Agent (Lifelog Agent) is integrated into the app via its Query URL.

Challenges we ran into

Getting the Vertex AI agent to handle both casual entries ("slept 6 hours, felt okay") and structured queries ("how was my week?") with the same agent took more prompt tuning than expected. SSE was the other rough edge. The agent streams chunk in inconsistent formats depending on response type, so parsing reliably required handling several edge cases that only showed up at runtime.

Accomplishments that we're proud of

The weekly review actually works. It reads your real data. average sleep, mood frequency, exercise days and surfaces patterns you wouldn't notice day to day. Getting that to feel conversational rather than like a generated report took real effort on the agent side.

Also shipping a full-stack AI app, solo, with auth-middleware, streaming, and MongoDB aggregations, in hackathon time.

What we learned

The biggest lesson was how much the agent's behaviour depends on instruction precision. Early on, it would drift in the wrong direction ignoring the user's actual logged data when answering health questions and defaulting to generic advice instead. Fixing that meant rewriting the system prompt to explicitly prioritise personal context: when a user asks about sleep or energy, the agent should check their logs first and answer relative to their own patterns, not population averages. General health knowledge is fair game, but it has to be grounded in what the user has actually recorded. The tighter that instruction was written, the more useful the responses got.

What's next for LifeLog Agent

  • Add goal tracking: let users set weekly targets (e.g. 7h sleep, 4 exercise days) and have the agent report progress against them
  • Push weekly review summaries as notifications instead of requiring the user to ask
  • Explore voice input for faster logging on mobile

Built With

Share this project:

Updates