rohitg00

ai-engineering-from-scratch: Learn AI by Building It

A free, MIT-licensed curriculum that teaches AI engineering through runnable lessons and hands-on artifacts. It covers foundations through LLMs, agents, protocols, and production, with paths for beginners and experienced developers.

View on GitHub Compare
Stars
62.9k
Forks
10.8k
Stars, last 30 days
+11,360

Our take

Health score

61/100

How it is scored
Activity
70
Community
38
Issues
65
Pull requests
71

+11,360 stars in the last 30 days

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

78,175

Forks

13,895

Change since Nov 9, 2026: +316 stars·+73 forks

Overview

ai-engineering-from-scratch is a hands-on curriculum for learning how AI systems work and how to build them. Its lessons emphasize implementing concepts from first principles, running code, and producing reusable artifacts rather than only consuming explanations or calling APIs.

The material spans mathematical and machine-learning foundations through generative AI, LLM engineering, agents, MCP, and production topics. It suits learners who want a structured route from fundamentals to practical systems, as well as developers who want to focus on a particular domain or learning path.

Key Features

  • Structured curriculum organized into 20 phases, from setup and math to production and capstone projects.
  • Practical lessons pair explanations with code, exercises, and artifacts such as prompts, skills, agents, and MCP servers.
  • Covers machine learning, deep learning, computer vision, NLP, speech, transformers, generative AI, reinforcement learning, and LLM applications.
  • Includes focused routes for agent engineering, MCP, Agent Skills, coding agents, and certification preparation.
  • Provides runnable code in Python, TypeScript, Rust, and Julia, depending on the lesson.
  • Offers a website, repository-based lessons, AI tutor skills, and downloadable book editions.

Use Cases

  • A learner with programming experience can follow the curriculum from math and ML basics toward building AI applications.
  • An application developer can study targeted lessons on prompts, RAG, evaluation, tool use, and production LLM systems.
  • An engineer exploring agents or MCP can use the focused paths and build working examples alongside the concepts.
  • A student or instructor can use the lessons, runnable examples, and artifacts as a structured self-study or teaching resource.

Getting Started

Clone the repository and run a dependency-free introductory lesson:

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python3 phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py

See the README for setup guidance, learning paths, and the website option.

Considerations

  • The curriculum is broad and substantial, so learners may prefer to choose a phase or focused path rather than attempt every lesson at once.
  • Some lessons use different languages or tools; check individual lesson instructions and prerequisites before running them.
  • The README recommends programming experience and notes that Python helps. Some later topics may involve heavier software or compute requirements than introductory lessons.
  • Certification materials are independent study resources, not affiliated with the relevant organizations, and do not guarantee exam results.

Found this useful?

Share it with someone who would like ai-engineering-from-scratch.

Comparisons