Inspiration

We've all been there: you track your sleep in one app, your workouts in another, your learning in a third. Each app shows you isolated metrics, but none can answer the questions that actually matter:

"Why was I so productive last Tuesday?" "Does my morning routine actually help my afternoon focus?" "What patterns predict my best creative sessions?"

The insight is obvious: your life is interconnected, but your tools aren't.

Then we thought about AI assistants. They're great at conversations, but they have amnesia - every session starts fresh. What if an AI could not only see connections across your life domains, but also remember what it learned about you and even travel back in time to understand how its knowledge evolved?

That's when LifeGraph was born: an AI agent that models your life as a graph and remembers its journey of discovery.


What it does

LifeGraph is a habit intelligence platform with two superpowers:

1. Graph-Based Pattern Discovery (Neo4j)

  • Your daily habits (health, learning, creativity) are stored as connected nodes in a knowledge graph
  • The SAME_DAY_AS relationship links activities that happened together
  • The AI agent traverses these connections to find non-obvious correlations:
    • "On days with HRV > 55, your learning focus is 23% higher"
    • "Heavy lifting + 8hrs sleep predicts creative satisfaction"
    • "Afternoon coffee correlates with -23% sleep quality"

2. Time-Traveling Memory (MemVerge)

  • At strategic moments (Day 15, Day 45), the agent saves memory checkpoints
  • Users can "restore" to any checkpoint and the agent shows only what it knew then
  • The Day 45 discoveries (cold exposure, protein optimization) literally disappear when you restore to Day 15
  • This demonstrates cognitive time travel - the agent "forgets" future discoveries

The Demo Experience:

  1. Slide the timeline from Day 1 to Day 90 - watch the graph grow
  2. At Day 45, click "RESTORE CHECKPOINT" - see the agent's full knowledge
  3. Slide back to Day 15, restore again - watch the insights change
  4. The cold exposure protocol? Gone. The agent hasn't discovered it yet.

How we built it

Architecture:

React Dashboard (Vercel)
        ↓
FastAPI Backend (GCP Cloud Run)
        ↓
   ┌────┴────┐
Neo4j Aura   MemVerge MMCloud
(Graph DB)   (Memory Checkpoints)

Neo4j Graph Schema:

  • 5 node types: Streak, Log, Day, Concept, Sentiment
  • 9 relationship types including the crucial SAME_DAY_AS
  • 215 nodes, 432 relationships representing 90 days of synthetic habit data

MemVerge Integration:

  • Checkpoints store: discovered patterns, confidence scores, agent thoughts, active node count
  • Restore operation returns the agent's state at that exact moment
  • Frontend replaces the "Agent Thoughts" panel with checkpoint-specific insights

AI Agent Logic:

MATCH (health:Log)-[:SAME_DAY_AS]-(learn:Log)
WHERE health.sleep_hours >= 8 AND health.workout = 'Zone 2 Cardio'
RETURN AVG(learn.focus_score) as avg_focus

This Cypher query discovers: "Zone 2 Cardio + 8hrs sleep = 8.5/10 focus"

Frontend:

  • Timeline scrubber with checkpoint markers (CP15, CP45)
  • Force-directed graph visualization
  • Real-time insight cards with confidence bars
  • "MEMORY RESTORED" banner with checkpoint details

Challenges we ran into

1. Designing the Graph Schema How do you model "life" as a graph? The breakthrough was the SAME_DAY_AS relationship - it connects activities across different domains without complex temporal joins. This simple edge enables powerful cross-streak queries.

2. Defining "AI Agent Memory" MemVerge typically checkpoints VMs. But what IS an AI agent's memory? We defined it as:

  • Discovered patterns (with confidence scores)
  • Agent thoughts (the reasoning stream)
  • Active knowledge (which nodes it's aware of)
  • NOT just raw data - the derived understanding

3. Making Time Travel Feel Real The UI had to clearly show that the agent "forgot" later discoveries. We solved this by:

  • Completely replacing the Agent Thoughts panel (not just filtering)
  • Showing different confidence levels at different checkpoints
  • Adding visual cues (MEMORY RESTORED banner, changed insight count)

4. Real-time Graph Rendering 200+ nodes needed smooth animation. Solution: debounced state updates, React.memo optimization, and progressive loading.


Accomplishments that we're proud of

1. The Time Travel Actually Works When you restore to Day 15, the cold exposure insight genuinely disappears. The agent shows lower confidence scores. It feels like you're looking at a younger, less experienced version of the AI.

2. Cross-Streak Insights Are Real The graph structure enables discoveries that spreadsheets can't: "Frustrated tech sessions → darker haiku themes same evening". The SAME_DAY_AS edge makes this query trivial.

3. Clean Separation of Concerns

  • Neo4j = What happened (data)
  • MemVerge = What the agent knew (memory)
  • This pattern could apply to ANY AI agent application

4. Production-Ready Demo Live at lifegraph-hackathon.vercel.app with real API calls to Neo4j Aura and MemVerge-style checkpoints.


What we learned

About Neo4j:

  • Graph databases make relationship queries first-class citizens
  • Cypher pattern matching is incredibly intuitive for discovery
  • Aura's free tier handled our 215-node graph effortlessly

About MemVerge:

  • Memory checkpointing applies beyond VMs - it's a pattern for any stateful system
  • "Time travel" is a compelling UX metaphor that users immediately understand
  • Agent state includes derived knowledge, not just raw data

About AI Agents:

  • Agents need TWO types of memory:
    • Working memory: Current context and recent interactions
    • Episodic memory: What they learned and when they learned it
  • Graphs are natural for agent reasoning about interconnected domains
  • Persistent memory transforms agents from assistants to companions

What's next for LifeGraph

Short Term:

  • Connect to real data sources (Apple Health, Whoop, Notion)
  • Natural language queries ("What makes me productive?")
  • More granular checkpoints (weekly, monthly)
  • Automatic checkpoint creation when significant patterns emerge

Long Term:

  • Predictive insights ("Based on today's data, try X tomorrow")
  • Multi-user anonymized patterns (collective intelligence)
  • LLM integration for conversational graph exploration
  • Mobile app for daily logging
  • Export/share your graph with coaches or doctors

The Vision: Every person deserves an AI that truly knows them - not just their last conversation, but their patterns, their growth, their journey. LifeGraph is a step toward AI agents with genuine long-term memory.

Built With

Share this project:

Updates