The Open-Source AI University
What if Coursera was rebuilt from scratch โ with AI agents instead of pre-recorded lectures?
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.
๐ Landing โ AI-powered learning at a glance
๐ Course Modules โ structured content with real-world applications
๐งโ๐ซ AI Tutor โ pick a module, start a Socratic tutoring session
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%)
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.
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.
- ๐บ๏ธ 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
| 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.
- 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)
git clone https://github.com/Abelo9996/LearnOS.git
cd LearnOS
npm installNative module note: LearnOS uses
better-sqlite3, a native addon. If you switch Node versions and seeERR_DLOPEN_FAILED, runnpm rebuild better-sqlite3.
# Terminal 1 โ API server (http://localhost:3001)
npm start
# Terminal 2 โ Vite dev server with hot reload (http://localhost:3000)
npm run devOpen 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.
- Go to โ๏ธ Settings โ API Keys and add your OpenRouter key (or set
OPENROUTER_API_KEYfor the server) - Create a course / roadmap โ describe what you want to learn
- Work through milestones, start tutor sessions, take assignments, and track your progress
npm run build # builds the React app into dist/
NODE_ENV=production OPENROUTER_API_KEY=sk-or-... npm startIn production the Express server serves the built frontend from dist/ and the API from the same origin. See DEPLOYMENT.md.
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.
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.
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.
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.
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.