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.
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.
- 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
## 🏗️ 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:
- Topic extraction — parses the user's learning goal into structured topics
- Search strategy — runs a different retrieval strategy depending on whether a topic is a main focus or supporting material
- Curriculum generation — builds the day-by-day plan
- Persistence — writes the plan and tasks to PostgreSQL
| Layer | Technology |
|---|---|
| Agent orchestration | LangGraph, LangChain, LangSmith |
| LLM | Groq (Llama 3.3) |
| Web search | Tavily |
| Backend | FastAPI, SQLAlchemy |
| Database | PostgreSQL |
| Frontend | Next.js, TypeScript |
- Python 3.10+
- Node.js 18+
- PostgreSQL 14+
- API keys for Groq and Tavily
# 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 --reloadcd ../frontend
npm install
npm run devThe app should now be running at http://localhost:3000, with the API at http://localhost:8000.
| 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.)
- Spaced repetition for review-flagged topics
- Support for additional LLM providers
- Multi-user accounts and shared curricula
- Export curriculum as PDF
This project is licensed under the MIT License — see the LICENSE file for details.
Ahmed Afli AI Engineer & Full-Stack Developer Portfolio