Skip to content

Latest commit

ย 

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ LearnOS

The Open-Source AI University

What if Coursera was rebuilt from scratch โ€” with AI agents instead of pre-recorded lectures?

Stars Forks License Issues


Education shouldn't be locked behind logins, paywalls, or a single vendor.

LearnOS is an agentic AI university you run yourself โ€” where AI agents teach, adapt, and certify. Clone it, drop in an OpenRouter key, and go. No accounts, no paywall, no lock-in. Open-source and community-driven.


๐Ÿ“ธ Screenshots

LearnOS Landing Page
๐Ÿ  Landing โ€” AI-powered learning at a glance

Course Module View
๐Ÿ“š Course Modules โ€” structured content with real-world applications

AI Tutor
๐Ÿง‘โ€๐Ÿซ AI Tutor โ€” pick a module, start a Socratic tutoring session


๐ŸŒ The Problem

Online education is broken:

  • ๐Ÿ’ธ Expensive โ€” Coursera, edX, and Udacity charge per course, per certificate, per degree
  • ๐Ÿ“น Static โ€” Pre-recorded lectures from 2019 teaching a 2026 world
  • ๐Ÿงฑ One-size-fits-all โ€” Same content whether you're a beginner or an expert
  • ๐Ÿ๏ธ Isolated โ€” You learn alone, drop out alone (completion rates: ~5-15%)

๐Ÿš€ The Vision

LearnOS is an AI-native university platform where:

Traditional Platforms LearnOS
Pre-recorded video lectures AI agents that teach in real-time, adapting to you
Locked to one vendor's models One OpenRouter key โ€” pick any model, pay only for tokens
Static content that ages Living courses generated on demand
Learn alone, drop out alone Cohort-based learning with AI + human communities
Certificates that nobody trusts Mastery-verified certificates backed by AI assessment
Courses created by institutions only GitHub of Courses โ€” anyone can create, star, and share

Read the full VISION.md for where this is headed.

๐Ÿค– Agentic Architecture

LearnOS isn't "a platform with an AI chatbot." It's a system of specialized AI agents that collaborate to deliver a complete university experience. Every agent is a real module under ai/agents/:

Agent Role
๐Ÿ—บ๏ธ Curriculum Agent Designs personalized learning roadmaps from your goals
๐Ÿง‘โ€๐Ÿซ Tutor Teaches via Socratic dialogue in live sessions โ€” adapts in real-time
๐Ÿ“ Assessment Agent Generates assignments, grades work, and gives targeted feedback
๐Ÿ” Research Agent Pulls in supporting resources from the open web
๐Ÿ“Š Analytics Agent Tracks learning patterns and surfaces habit insights
๐ŸŽฏ Profiling Agent Models your level, style, and goals during onboarding

All agents run through a single LLM layer (ai/llm.js) that talks to OpenRouter โ€” one key unlocks every major model (Claude, GPT, Gemini, Llama, and more) with per-agent model routing and usage metering. Pick whatever balance of quality and cost you want, per agent.

โœจ Features (What Works Today)

  • ๐Ÿ—บ๏ธ AI-Generated Learning Roadmaps โ€” Describe a goal, get a structured path of milestones and nodes
  • ๐Ÿง‘โ€๐Ÿซ Personal AI Tutor โ€” Live Socratic tutoring sessions that adapt to your understanding
  • ๐Ÿ“ Smart Assignments โ€” Auto-generated with rubrics and AI grading
  • ๐Ÿƒ Flashcards โ€” Spaced-repetition review generated from your material
  • ๐Ÿ“š Courses โ€” Generate full courses with readings, labs and question banks; star what you keep coming back to
  • ๐Ÿค Sharing โ€” A course is a portable file. Export it, send it, import it whole. Optionally publish to a registry so others can find it โ€” LearnOS works completely without one
  • ๐Ÿ… Certificates & Badges โ€” Mastery-verified certificates and achievement badges
  • ๐Ÿ“… Study Schedule โ€” Plan and track your learning cadence
  • ๐Ÿ“Š Learning Analytics โ€” Daily stats, streaks, XP, and activity history
  • ๐ŸŽฏ Learner Profiling โ€” Onboarding that tailors the experience to your level and style
  • ๐Ÿ‘ค Local Profile โ€” Your name, avatar, bio, and links โ€” no account, no login
  • ๐Ÿ”‘ One OpenRouter Key โ€” A single key unlocks every model; set it in-app or via env
  • ๐Ÿ’พ Persistent Progress โ€” SQLite storage, your data survives restarts

๐Ÿ›ฃ๏ธ Roadmap

Phase Status Description
Foundation โœ… Done Roadmaps, tutor, assignments, flashcards, analytics, profiling
Sharing โœ… Done Courses as portable files, publish/browse via an optional registry, certificates, badges
Hardening โœ… Done SSRF guard, upload validation, rate limiting, CI
Scale ๐Ÿ”จ Building Cohort learning, richer course library, streaming responses
Reach ๐Ÿ”ฎ Vision Multi-language, mobile, accreditation & employer verification

Currently focused on: STEM (CS, Math, Data Science, Engineering) โ†’ expanding outward.

๐Ÿ—๏ธ Quick Start

Prerequisites

  • Node.js 18+
  • An OpenRouter API key (optional for the UI; required for AI features โ€” you can also add it in-app under Settings โ†’ API Keys)

1. Install

git clone https://github.com/Abelo9996/LearnOS.git
cd LearnOS
npm install

Native module note: LearnOS uses better-sqlite3, a native addon. If you switch Node versions and see ERR_DLOPEN_FAILED, run npm rebuild better-sqlite3.

2. Run (two terminals)

# Terminal 1 โ€” API server (http://localhost:3001)
npm start

# Terminal 2 โ€” Vite dev server with hot reload (http://localhost:3000)
npm run dev

Open http://localhost:3000 โ€” there's no login. LearnOS runs as a single local user (it's your machine) and starts completely from scratch: no example data, no demo courses. Generate your first roadmap or course and everything grows from there. No .env is required for local dev; see .env.example for all configurable options.

3. Start Learning

  1. Go to โš™๏ธ Settings โ†’ API Keys and add your OpenRouter key (or set OPENROUTER_API_KEY for the server)
  2. Create a course / roadmap โ†’ describe what you want to learn
  3. Work through milestones, start tutor sessions, take assignments, and track your progress

Production build

npm run build      # builds the React app into dist/
NODE_ENV=production OPENROUTER_API_KEY=sk-or-... npm start

In production the Express server serves the built frontend from dist/ and the API from the same origin. See DEPLOYMENT.md.

๐Ÿ›๏ธ Architecture

Single Node service: Express serves both the REST API and the built React SPA.

LearnOS/
โ”œโ”€โ”€ server.js             # Express 5 entry point โ€” API + static SPA
โ”œโ”€โ”€ routes/               # REST endpoints (courses, roadmaps, sessions, โ€ฆ)
โ”œโ”€โ”€ middleware/           # local-user resolver, logger, url-safety (SSRF guard)
โ”œโ”€โ”€ db/                   # better-sqlite3 โ€” schema.sql, database.js
โ”œโ”€โ”€ ai/
โ”‚   โ”œโ”€โ”€ llm.js            # provider-agnostic LLM layer (Claude) + metering
โ”‚   โ”œโ”€โ”€ jobs.js           # async AI job runner
โ”‚   โ”œโ”€โ”€ schemas.js        # structured-output schemas
โ”‚   โ””โ”€โ”€ agents/           # curriculum, assessment, research, analytics, profiling
โ”œโ”€โ”€ src/                  # React 18 frontend (Vite)
โ”‚   โ”œโ”€โ”€ screens/          # Landing, Auth, Dashboard, Courses, Roadmap, Session, โ€ฆ
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ uploads/              # user uploads (avatars, etc.)
โ”œโ”€โ”€ tests/                # Vitest suite
โ””โ”€โ”€ docs/                 # architecture, specs, status

Frontend talks to the backend via a /api proxy in dev (vite.config.js) and same-origin in production.

๐Ÿค Sharing courses

A course you generate is not trapped in your install. Share โ†’ Export writes the whole thing โ€” modules, readings, resources, labs, and the question bank โ€” to a single .learnos.json file. Anyone with that file gets the entire course by dropping it into their own LearnOS. No server, no account, no network involved.

That is the baseline, and it is enough on its own. On top of it, LearnOS can talk to a course registry: a small optional service (see LearnOSWeb) where instances publish courses for each other to find. Publishing claims a handle โ€” no account, no email โ€” and the registry issues a token that stays on your machine and never reaches the browser; it authorises exactly one thing, updating what you published.

The registry is a convenience and never a dependency. Switch it off in Settings โ†’ Community and LearnOS contacts nothing at all; leave it on and it still works normally when the registry is down, saying so plainly instead of breaking. Nothing imported is trusted either: URLs are re-checked against the same SSRF policy as any other outside content, and imported questions arrive unverified no matter what the exporter believed, because verification is evidence your instance gathered โ€” not a claim that travels with a file.

There is no forum, no leaderboard, and no member directory, because a single-user local app cannot honestly host one.

๐Ÿ”’ Security

LearnOS is meant to be self-hosted for your own use, so it ships without accounts by design. It still keeps real hardening โ€” an SSRF guard on outbound fetches, magic-byte validation on uploads, Helmet headers, encrypted-at-rest API keys, CORS locked to APP_URL in production, and rate limiting. See SECURITY.md to report a vulnerability.

๐Ÿค Contributing

LearnOS is open-source because education should be free. We welcome contributions of all kinds โ€” code, agents, courses, and docs. See CONTRIBUTING.md and look for issues labeled good first issue.

๐Ÿ“„ License

MIT โ€” because knowledge should be free.


โญ Star this repo if you believe education should be free and AI-native.
Built with conviction that the next university won't have a campus โ€” it'll have a GitHub repo.

About

LearnOS ๐ŸŽ“ The open-source AI university. Personal AI tutors, no pre-recorded lectures, mastery-based learning. Education that adapts to you, not the other way around.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages