A curriculum that makes you derive before you import
Most AI learning material teaches in scattered pieces: a paper here, a fine-tuning post there, a flashy agent demo somewhere else, and the pieces never quite line up. This repository is the opposite bet. It is a free, open-source curriculum that runs as a single spine from linear algebra to autonomous swarms, building every algorithm from raw math first. Backprop, the tokenizer, attention, the agent loop, you derive and implement each before a framework like PyTorch shows up, so by the time it does you already know what it is doing underneath.
The scale is serious: 503 lessons across 20 phases, roughly 320 hours, in Python, TypeScript, Rust, and Julia. The promise it makes is not “watch and understand” but “build and understand,” which is the reason to choose it over a video course if your goal is to be able to explain, not just run, the systems you ship.
The lesson loop, and the artifact payoff
Every lesson runs the same loop: read the problem, derive the math, write the code, run the test, keep the artifact. That last step is the distinctive part. Each lesson ships a reusable artifact, a prompt, a skill, an agent, or an MCP server, so you finish not just with understanding but with a growing toolkit of things you built and can actually use. A curriculum that leaves you with 503 working artifacts is a different proposition from one that leaves you with notes.
It is free, MIT-licensed, and built to run on your own laptop, with no five-minute videos, no copy-paste deploys, and no hand-holding. It comes from the creator of Agent Memory, so the agent-and-tooling phases are written by someone shipping in that space.
How to use it
There is no install in the package-manager sense; you work through the lessons in the repository, building each artifact in your own environment. The intended path is linear, phase by phase, because later lessons assume the math and code you built earlier. You can dip in for a specific topic, but the value compounds when you follow the spine, since the whole design is that attention makes more sense after you have written a tokenizer, and an agent loop makes more sense after you have written attention.
Who it is for, and the honest caveats
Reach for it if you want depth over speed and you are willing to invest real hours to understand AI systems from the ground up, especially if you are one of the many who use AI tools daily but do not feel prepared to build with them professionally, which is the gap the curriculum names as its target.
Set expectations honestly. Roughly 320 hours is a large commitment, and a 503-lesson curriculum built rapidly by a small team will have uneven spots and a tracker of corrections in flight (61 open issues as of 2026-06, on a project created in 2026-03). Treat it as a living curriculum you learn from actively, reporting and working around rough lessons, rather than a polished, finished textbook. The build-it-yourself depth is the payoff, and it costs time by design.
ai-engineering-from-scratch versus build-your-own-x
| ai-engineering-from-scratch | build-your-own-x | |
|---|---|---|
| Stars | 30,905 | 513,858 |
| Form | original linear curriculum | curated index of external tutorials |
| Scope | AI engineering, end to end | general technologies |
| Output | a reusable artifact per lesson | whatever each tutorial yields |
Counts are from GitHub as of June 2026. build-your-own-x shares the rebuild-to-learn philosophy but is a broad index pointing at third-party tutorials. This is the focused, original counterpart for AI specifically: one authored path, one domain, an artifact at the end of each step. If AI engineering is the thing you want to understand by building, this is the structured route; build-your-own-x is the wider map.
Related
For the same philosophy as a general, self-directed index, see build-your-own-x. For the broader model ecosystem the later phases touch, see LLM tooling, and for what else is climbing, the daily digest and the weekly report.
FAQ
What is the curriculum’s approach? Build everything from scratch: derive the math, write the code, test it, and keep a reusable artifact, before any framework is introduced.
How big is it? 503 lessons across 20 phases, roughly 320 hours, in Python, TypeScript, Rust, and Julia. It is free and MIT-licensed.
Do I need a strong background first? It starts from raw math like linear algebra and builds up, so it is designed to take you from fundamentals, but the time commitment is substantial.
How is it different from build-your-own-x? This is an original, linear curriculum for AI specifically with an artifact per lesson; build-your-own-x is a curated index of external tutorials across many technologies.