Skip to content

Back to the catalog

rohitg00/ai-engineering-from-scratch
github.comcourse

rohitg00/ai-engineering-from-scratch

ai-engineering-from-scratch is a free, MIT-licensed curriculum of 542 lessons in 20 phases, from math and deep learning through transformers, LLM engineering, MCP, agents and capstones. Code is in Python, TypeScript, Rust and Julia. It includes three graded projects (retrieval evaluation, agent trace debugger, tool call firewall), installable tutor skills for Claude Code and Codex, and certification prep tracks.

TL;DR Teaches AI engineering through 542 lessons and graded labs, with tutor skills installable in coding agents.
Document

What it claims

The curriculum has 542 lessons in 20 phases. Each lesson has you implement an algorithm from scratch first, then run the same thing through a production library such as PyTorch or sklearn. Each lesson also ships a reusable artifact. The repository holds 414 skills and 100 prompts under phases/**/outputs/, plus agents and MCP servers. Phase 19 alone has 85 lessons: 17 end-to-end products and 9 deep-build tracks, at 20 to 40 hours per project. The page reports 114,584 readers and 181,995 page views in the 30 days to August 29, 2026.

How it works

Every lesson folder has the same layout:

  • code/ holds the implementations.
  • docs/en.md holds the narrative.
  • outputs/ holds the produced prompts, skills, agents or MCP servers.

Lessons follow six beats: motto, problem, concept, build it, use it, ship it. Phase 3 builds a mini framework before it introduces PyTorch and JAX.

The phase graph branches after Phase 3 Deep Learning Core. Vision, speech and RL are side branches. The path to LLMs runs through NLP, Transformers, LLMs from Scratch and LLM Engineering, then on to Tools and Protocols and Agent Engineering.

The core phases compile into a six-volume EPUB and PDF series. CI attaches the books to each GitHub release. The certification tracks are left out of the books.

The three graded projects each set up a specific failure:

  • Retrieval Evaluation Lab (Python): mean NDCG improves while one query regresses.
  • Agent Trace Debugger (TypeScript): latency is unchanged but token usage rises by 200 and a span fails.
  • Tool Call Firewall (Rust): a write changes after review, or an approval is replayed.

Starters fail until you implement the stages.

How to use it

Stated study times by starting point:

BackgroundStart atTime
New to programming and AIPhase 0~306 h
Know Python, new to MLPhase 1~270 h
Know ML, new to deep learningPhase 3~200 h
Know deep learningPhase 10~100 h
Senior engineer, agents onlyPhase 14~60 h
MCP pathPhase 13 subset~23 h 15 min
Agent Skills path5 lessons~9.5 h
Reverse Engineering pathPhase 13 lessons 32 to 45~32.5 h

Local start, from the repository root:

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python3 phases/00-setup-and-tooling/01-dev-environment/code/verify.py --route beginner
python3 phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py

To run a graded project, initialise it and then check stages. Python 3.10+ is required. The trace debugger also needs Node.js 22.18+, and the firewall needs Rust.

python3 scripts/project_test.py retrieval-evaluation-lab \
  --init learning-artifacts/retrieval-evaluation-lab
python3 scripts/project_test.py retrieval-evaluation-lab \
  --all --path learning-artifacts/retrieval-evaluation-lab --strict

The tutor needs Node.js and npx but no clone. The placement quiz writes LEARNING.md.

npx skills add rohitg00/ai-engineering-from-scratch

To install lesson artifacts into an agent's skills directory, use the script below. It refuses to overwrite existing files and exits 1 unless you pass --force. Each run writes a manifest.json.

python3 scripts/install_skills.py ~/.claude/skills/ --phase 14 --dry-run

To scaffold the Phase 14 Agent Workbench into your own repo, use the command below. The pack includes AGENTS.md, schemas, task_board.json and agent_state.json.

python3 scripts/scaffold_workbench.py path/to/your-repo

The two certification tutors are claude-certification and mcpa-certification. The first covers four Claude tracks. The second has 34 lessons on the stateless 2026-07-28 MCP protocol and includes three practice exams.

Limits

  • Code checking is shallow. scripts/lesson_run.py only byte-compiles by default. --execute runs each entry file with a 10-second timeout and skips lessons that declare non-stdlib dependencies. The script is not wired into CI, so lesson code is not routinely executed.
  • The firewall is not a sandbox. Approvals are single-use within one invocation. The project provides no persistent authorization and no operating-system sandbox.
  • Retrieval metrics are not correctness. The retrieval lab states that its metrics describe relevance judgments and do not establish answer correctness.
  • The tutor needs a supported setup. It requires a supported host and a writable skill scope. Without them, real-host discovery and invocation evidence stays pending.
  • The certification prep is unofficial. It is independent, not affiliated with Anthropic or the Linux Foundation, reproduces no live exam questions, and guarantees no pass.
  • Navigation has exceptions. The MCP path runs out of numeric order (18 comes before 17). The Agent Skills path should not follow the "next" link from lesson 22 to 23.

Organisations named here

  • Anthropic
  • Agentic AI Foundation
  • Linux Foundation Training
  • Linux Foundation
  • Claude Code
  • Cursor
  • Hermes
  • Model Context Protocol
  • OpenClaw
  • Rohit Ghumare

Technologies named here

  • AI Engineering from Scratch
  • skills
  • start-learning
  • learn
  • course-guide
  • learn-mcp
  • learn-agent-skills
  • learn-reverse-engineering
  • claude-certification
  • mcpa-certification
  • find-your-level
  • check-understanding
  • scripts/project_test.py
  • scripts/install_skills.py
  • scripts/scaffold_workbench.py
  • scripts/build_catalog.py
  • scripts/lesson_run.py
  • scripts/audit_lessons.py
  • scripts/build_book.py
  • Model Context Protocol
  • Agent Skills
  • PyTorch
  • JAX
  • scikit-learn
  • TypeScript
  • Rust
  • Node.js
  • Claude Code
  • Codex
  • Cursor
  • Docker
  • LoRA
  • GitHub
  • Whisper
  • BERT
  • Julia
  • Python
  • RAG
  • Transformer

Techniques named here

  • Build It / Use It lesson structure
  • Retrieval evaluation with per-query comparison
  • Agent trace debugging
  • Tool call firewall
  • Gradient descent comparison
  • Evidence-based learning loop

Also named here

  • Attention Is All You Need