AI Engineering from Scratch is a free, open-source curriculum for developers who want to understand how AI systems actually work rather than just call APIs against them. It's built for people who already write code and want a structured path from linear algebra through transformers, LLMs, and multi-agent systems, implementing the core algorithms themselves before switching to production libraries like PyTorch or sklearn.
The curriculum runs 20 phases and 503 lessons, roughly 320 hours of material, spanning Python, TypeScript, Rust, and Julia. Each lesson follows the same loop: read the problem, derive the math, write the code from scratch, run it against a real library, then produce a reusable artifact (a prompt, a skill, an agent, or an MCP server). Everything is MIT-licensed and designed to run on your own laptop.
code/ directory with runnable implementations, a docs/en.md narrative, and an outputs/ folder with the shipped artifact./find-your-level maps your existing knowledge to a starting phase, and /check-understanding <phase> quizzes you per phase, both usable inside Claude, Cursor, Codex, or similar agent tools.This fits developers who already know how to code and want a rigorous, sequential path into AI engineering, starting from math and working up to autonomous agents and multi-agent systems. It's a good fit for self-taught engineers preparing for AI-focused roles, bootcamp grads wanting depth beyond API calls, or teams building internal training material and wanting a reference structure.
It's not a good fit if you want a quick intro to prompting or just need to call an LLM API for a weekend project. It also isn't a fit if you want video-based learning or guided GUI tooling; there's no hand-holding, no five-minute explainer videos, and progress depends on actually writing and running code. If you already have strong ML fundamentals and only want the agent/LLM-engineering phases, you can skip ahead, but the curriculum assumes you'll backfill gaps in earlier phases rather than treat it as pure reference documentation.
There are three ways to use the curriculum.
Read it directly on the companion site, no setup needed:
Visit aiengineeringfromscratch.com or browse the phase folders in the repo.
Clone and run lessons locally:
git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py
Use the built-in agent skills (inside Claude, Cursor, Codex, or another agent tool that reads SKILL.md files):
/find-your-level
This runs a ten-question placement quiz and generates a personalized path with hour estimates. After finishing a phase, check your understanding:
/check-understanding 3
ls phases/03-deep-learning-core/05-loss-functions/outputs/
To install all lesson skills at once:
python3 scripts/install_skills.py
Prerequisites are minimal: you should be able to write code in some language (Python helps most), and you should want to understand how AI works internally rather than only calling existing APIs.