Skip to content

N-45div/EducraAI

Repository files navigation

Educra AI 🧠

Personal Learning Intelligence - An adaptive AI tutor powered by Google Gemini 3

Gemini 3 Live Demo Next.js Python Devpost

πŸ† Gemini 3 Hackathon Submission

EducraAI leverages the full power of Gemini 3:

Gemini 3 Feature How We Use It
Thinking Models Visible step-by-step reasoning in chat (MINIMAL/LOW/MEDIUM/HIGH levels)
Gemini Live API Real-time bidirectional voice tutoring with audio streaming
Google Search Grounding Factual accuracy with citations for verified learning
Structured Output JSON extraction for quizzes, concepts, notes, and knowledge graphs
System Instructions Custom tutor personality with emotional intelligence

🎯 What is Educra AI?

Educra AI is a next-generation learning companion that goes beyond simple Q&A chatbots. It combines:

  • Real-time Voice Tutoring with Gemini Live API
  • Adaptive Confusion Detection that senses when you're struggling
  • Living Notes that auto-generate as you learn
  • Knowledge Graph Visualization to see your understanding
  • Cognitive-Science-Based Quizzing with spaced repetition
  • Proactive Learning Interventions based on memory decay

πŸ—οΈ Architecture

flowchart TB
    subgraph Frontend["Frontend (Next.js 15)"]
        UI[TutorSession - Voice/Text Chat]
        KG[Knowledge Graph Viz]
        LN[Living Notes]
        QM[Quiz Mode]
        MS[Mind Stream]
        PB[Proactive Bar]
    end
    
    subgraph Backend["Backend (FastAPI + Python)"]
        AS[Agent Server]
        GA[Gemini Agent<br/>Thinking Models]
        GLA[Gemini Live Agent<br/>Voice Streaming]
        EA[Evaluator Agent]
        EMA[Episodic Memory Agent]
        PE[Proactive Engine]
        KGA[Knowledge Graph Agent]
        CA[Consolidation Agent]
    end
    
    subgraph External["Gemini 3 APIs"]
        G3[Gemini 3 Flash<br/>+ Google Search Grounding]
        GL[Gemini Live API<br/>Real-time Audio]
    end
    
    subgraph Storage["Persistence"]
        N4J[(Neo4j Aura<br/>Knowledge Graph)]
        LS[(LocalStorage<br/>Client State)]
    end
    
    UI -->|REST/WebSocket| AS
    KG -->|Concepts| AS
    LN -->|Episodes| AS
    MS -->|Recall| AS
    PB -->|Interventions| AS
    QM -->|Evaluation| AS
    
    AS --> GA
    AS -->|WebSocket| GLA
    AS --> EA
    AS --> EMA
    AS --> PE
    AS --> KGA
    AS --> CA
    
    GA -->|Thinking + Grounding| G3
    GLA -->|Bidirectional Audio| GL
    EMA --> N4J
    KGA --> N4J
    
    UI --> LS
    KG --> LS
Loading

✨ Key Features

1. Voice-First AI Tutoring

Real-time bidirectional audio with Gemini Live. Speak naturally and get instant voice responses.

2. Living Notes πŸ“

AI automatically extracts key concepts and generates study notes as you learn. No more manual note-taking.

3. Confusion Detection 🎯

The AI senses when you're confused based on your questions and adapts its teaching approach in real-time.

4. Knowledge Graph πŸ•ΈοΈ

Visualize your learning progress across concepts. See what you've mastered and what needs work.

5. Cognitive Quiz Engine πŸ§ͺ

Based on cognitive science research:

  • Spaced Repetition - Review at optimal intervals
  • Retrieval Practice - Active recall strengthens memory
  • Desirable Difficulty - Challenging questions promote deeper learning
  • Adaptive Difficulty - Questions adjust to your level

6. Mermaid Concept Visualizer πŸ“Š

Generate beautiful diagrams (mind maps, flowcharts, hierarchies) for any concept using AI.

7. Notion Integration πŸ“š

Import your existing study notes from Notion to enhance personalized learning.

8. Proactive Learning Bar

Get gentle nudges for spaced repetition reviews based on memory decay algorithms.

9. Mind Stream 🌊

View your complete learning journey with episodic memory. Every session is stored with linked concepts, timestamps, and source types (voice, text, notes).

10. Learning Metrics Dashboard πŸ“Š

Research-backed progress tracking with:

  • Mastery Progress - Track concept understanding
  • Active Recall Score - Questions asked and quiz performance
  • Feynman Readiness - Concepts ready to teach
  • Review Streak - Spaced repetition adherence
  • Expandable Research Citations - Learn about the science behind your learning

11. Enhanced Voice Experience πŸŽ™οΈ

  • Visual Audio Waveform - See your voice as you speak
  • AI Speaking Indicator - Know when the AI is responding
  • Recording Status - Clear feedback during voice sessions

πŸš€ Quick Start

Prerequisites

1. Clone & Install

cd EducraAI

# Frontend
npm install

# Backend
cd backend
pip install -r requirements.txt

2. Configure Environment

Create .env.local in the root:

NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key
GEMINI_API_KEY=your_gemini_api_key

3. Run the Application

# Terminal 1: Backend
cd backend
python agent_server.py

# Terminal 2: Frontend
npm run dev

Open http://localhost:3000

πŸ“ Project Structure

EducraAI/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                 # Next.js App Router
β”‚   β”‚   └── page.tsx         # Main dashboard
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ TutorSession.tsx      # Voice/text tutoring
β”‚   β”‚   β”œβ”€β”€ LivingNotes.tsx       # Auto-generated notes
β”‚   β”‚   β”œβ”€β”€ KnowledgeGraphViz.tsx # ReactFlow visualization
β”‚   β”‚   β”œβ”€β”€ QuizMode.tsx          # Cognitive quiz engine
β”‚   β”‚   β”œβ”€β”€ ConceptVisualizer.tsx # Mermaid diagrams
β”‚   β”‚   β”œβ”€β”€ NotionIntegration.tsx # Notion import
β”‚   β”‚   β”œβ”€β”€ MindStream.tsx        # Episodic memory feed
β”‚   β”‚   β”œβ”€β”€ ProactiveBar.tsx      # Learning reminders
β”‚   β”‚   └── ConfusionMeter.tsx    # Understanding gauge
β”‚   └── lib/
β”‚       β”œβ”€β”€ gemini-live.ts        # Gemini Live client
β”‚       β”œβ”€β”€ gemini-socket.ts      # WebSocket handler
β”‚       └── knowledge-graph.ts    # KG state management
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ agent_server.py           # FastAPI main server
β”‚   └── agents/
β”‚       β”œβ”€β”€ gemini_agent.py       # Text chat agent
β”‚       β”œβ”€β”€ gemini_live_agent.py  # Voice agent
β”‚       β”œβ”€β”€ evaluator_agent.py    # Answer verification
β”‚       β”œβ”€β”€ episodic_memory_agent.py  # Learning memory
β”‚       β”œβ”€β”€ proactive_engine.py   # Intervention logic
β”‚       └── knowledge_graph_agent.py  # Concept tracking
└── public/

πŸ”¬ Research Foundation

Educra AI is built on established cognitive science research:

Principle Implementation Research
Spaced Repetition ProactiveBar timing Ebbinghaus (1885), Pimsleur (1967)
Retrieval Practice Quiz active recall Roediger & Butler (2011)
Desirable Difficulty Adaptive quiz difficulty Bjork (1994)
Cognitive Load Chunked explanations Sweller (1988)
Elaborative Interrogation Feynman Mode Pressley et al. (1987)

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • TailwindCSS - Utility-first styling
  • Framer Motion - Animations
  • ReactFlow - Knowledge graph visualization
  • Mermaid - Diagram generation

Backend

  • FastAPI - High-performance Python API
  • Google GenAI SDK - Gemini 3 integration
  • Neo4j (optional) - Graph database for knowledge persistence

AI

  • Gemini 3 Flash - Thinking model with Google Search grounding
  • Gemini Live API - Real-time bidirectional audio

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines first.

πŸ“„ License

MIT License - see LICENSE for details.


Built with ❀️ for the Google Gemini 3 Hackathon 2026

Educra AI - Learn smarter, not harder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors