Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Agentic Learning Coach

An AI-powered personalized learning system that builds day-by-day curricula, generates adaptive quizzes, and tracks your progress — powered by a multi-agent LangGraph pipeline.

Python LangGraph FastAPI PostgreSQL Next.js TypeScript


📖 Overview

Agentic Learning Coach turns a learning goal into a structured, personalized curriculum — and keeps you accountable to it. Tell it what you want to learn, how much time you have, and your preferred topics, and a multi-agent pipeline built with LangGraph autonomously generates a day-by-day plan, complete with topic-specific quizzes that adapt based on how you're doing.

✨ Features

  • Multi-agent curriculum generation — a LangGraph state graph orchestrates topic extraction, web-search strategy (differentiated for main vs. supporting topics), and curriculum generation
  • Adaptive daily sessions — auto-generated multiple-choice quizzes per topic, automatically scored
  • Review flagging — tasks are automatically flagged for review when quiz scores fall below 70%
  • Real-time progress tracking — a Next.js frontend with a terminal-style UI shows your progress as you go
  • Persistent state — all goals, tasks, and progress are stored in PostgreSQL via SQLAlchemy

📸 Screenshots

Image

Image

Image

Image

Image

## 🏗️ Architecture
┌─────────────┐      ┌──────────────────┐      ┌────────────────┐
│  Next.js UI │ ───▶ │  FastAPI Backend  │ ───▶ │  LangGraph      │
│  (frontend) │ ◀─── │  (REST API)       │ ◀─── │  Agent Pipeline │
└─────────────┘      └──────────────────┘      └────────────────┘
                              │                          │
                              ▼                          ▼
                      ┌───────────────┐          ┌───────────────┐
                      │  PostgreSQL   │          │ Tavily / Groq │
                      │  (persistence)│          │ (search / LLM)│
                      └───────────────┘          └───────────────┘

The LangGraph pipeline runs as a state graph with distinct nodes for:

  1. Topic extraction — parses the user's learning goal into structured topics
  2. Search strategy — runs a different retrieval strategy depending on whether a topic is a main focus or supporting material
  3. Curriculum generation — builds the day-by-day plan
  4. Persistence — writes the plan and tasks to PostgreSQL

🛠️ Tech Stack

Layer Technology
Agent orchestration LangGraph, LangChain, LangSmith
LLM Groq (Llama 3.3)
Web search Tavily
Backend FastAPI, SQLAlchemy
Database PostgreSQL
Frontend Next.js, TypeScript

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL 14+
  • API keys for Groq and Tavily

Backend setup

# clone the repo
git clone https://github.com/<your-username>/agentic-learning-coach.git
cd agentic-learning-coach/backend
 
# install dependencies
pip install -r requirements.txt
 
# set environment variables
cp .env.example .env
# fill in: DATABASE_URL, GROQ_API_KEY, TAVILY_API_KEY, LANGSMITH_API_KEY
 
# run migrations
alembic upgrade head
 
# start the API
uvicorn main:app --reload

Frontend setup

cd ../frontend
npm install
npm run dev

The app should now be running at http://localhost:3000, with the API at http://localhost:8000.

📡 API Endpoints

Method Endpoint Description
POST /goals Create a new learning goal
GET /goals/{id}/tasks Retrieve daily tasks for a goal
POST /tasks/{id}/quiz Generate a quiz for a task
POST /quiz/{id}/score Submit and score quiz answers
GET /goals/{id}/progress Get progress tracking data

(Adjust these to match your actual route names.)

🗺️ Roadmap

  • Spaced repetition for review-flagged topics
  • Support for additional LLM providers
  • Multi-user accounts and shared curricula
  • Export curriculum as PDF

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

👤 Author

Ahmed Afli AI Engineer & Full-Stack Developer Portfolio

About

Multi-agent AI system that builds personalized day-by-day learning curricula and adaptive quizzes, powered by LangGraph, FastAPI & PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages