ai-engineering-from-scratch
by rohitg00
Course that teaches AI engineering by building and shipping real AI projects yourself.
- Stars
- 80,071 stars
- Forks
- 14k forks
- Last push
- 7 days ago
- Activity
- Active
# Turn your coding agent into a tutor$ npx skills add rohitg00/ai-engineering-from-scratch# Or run lessons locally$ 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 beginnerCommands from the project's README. Run them after installing (see below).
Overview
Understand ai-engineering-from-scratch in 60 seconds
- What it does
- AI Engineering from Scratch is a free, open course where you implement model internals, retrieval pipelines and agent runtimes yourself, then test and inspect them. It has 542 lessons in 20 phases, in Python, TypeScript, Rust, Julia and Go.
- The problem it solves
- Framework calls hide the part that breaks. By writing small versions of each piece, such as a ReAct loop in plain Python, you learn where to look when a loss turns into NaN or an agent loops on the same tool call.
- Why choose it
- Choose it for a large, hands-on, from-scratch curriculum you can follow on the website, with a coding agent as tutor, or by running code locally. It is free and MIT licensed.
- Who should use it
- Developers becoming AI engineers
- Learners who prefer building over reading
- Claude Code and Codex users who want an AI tutor
- People preparing for AI engineering roles
- Setup difficulty
You'll need:
- A web browser for the website
- Python 3 (3.10+ for projects) to run lessons
- Optional: Node.js and a skill-capable coding agent for the tutor
- Node.js 22.18+ and Rust for some projects
How ai-engineering-from-scratch works
Lessons follow a pattern: the problem, build it from scratch, see where real SDKs do the same thing, then ship a reusable artifact such as a skill file for your agent. Learning routes start from model foundations, LLM systems or agents and delivery.
You can learn on the website with no setup, install the course as skills so your coding agent becomes a tutor (with a placement quiz and one lesson per session), or clone the repository and run lesson code. A preflight script checks your environment and suggests fixes.
Three graded projects have staged starters, reference solutions and local graders: a retrieval evaluation lab in Python, an agent trace debugger in TypeScript and a tool call firewall in Rust. The course is translated into many languages.
Features
Key features
542 lessons
20 phases from math foundations to production.
Build it yourself
Write small versions of models, RAG and agent loops.
AI tutor
Install as skills for Claude Code, Codex and others.
Graded projects
Starters, reference solutions and local graders.
Many languages
Python, TypeScript, Rust, Julia and Go code.
Interactive labs
Visualisations such as gradient descent on the website.
Strengths
- Free and MIT licensed
- Deep, hands-on approach
- Flexible ways to learn
- Clear learning routes
Limitations
- Very large; pick a route rather than doing everything
- Some projects need several toolchains
- Self-paced, so it needs discipline
Practical use cases
Learn agent internals
Start at The agent loop and build a ReAct loop.
Interview prep
Do the graded projects and keep the artifacts.
Guided study with an agent
Use /start-learning in Claude Code.
Installation
Install ai-engineering-from-scratch
Commands come from AI Engineering from Scratch's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python 3
- Git
Supported systems
- Windows
- macOS
- Linux
- 1
Open aiengineeringfromscratch.com
No setup or cloning needed.
- 1
Check requirements
Shellnode --versionnpx --versionpython3 --version - 2
Install the skills
Choose the host and scope when asked.
Shellnpx skills add rohitg00/ai-engineering-from-scratch - 3
Start learning
/start-learning in Claude Code, or start-learning in Codex.
- 1
Clone
Shellgit clone https://github.com/rohitg00/ai-engineering-from-scratch.gitcd ai-engineering-from-scratch - 2
Run the environment check
Every required failure includes a corrective command.
Shellpython3 phases/00-setup-and-tooling/01-dev-environment/code/verify.py --route beginner
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Run a dependency-free first lesson
Shellpython3 phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py
ai-engineering-from-scratch's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Start the course with your coding agent as tutor
Get a personalised study plan and your first lesson.
Before you start
- Node.js and npx
- Claude Code or another skill-capable agent
- Python 3
- 1
Install the course skills
Shellnpx skills add rohitg00/ai-engineering-from-scratch - 2
Start
Run /start-learning in Claude Code. A ten-question placement quiz saves a plan to LEARNING.md.
- 3
Take a lesson
Use /learn for one lesson per session: concept, math, code, quiz.
What to expect
A personalised LEARNING.md study plan and your first lesson taught by your agent.
Next steps
- Try /learn-mcp for the MCP path
- Run a graded project locally
- Use /course-guide when stuck
Costs and requirements
What it costs to run
- License
- MIT. Free to use, modify and use commercially.Free
- Course
- Free.Free
- AI tutor
- Uses your coding agent's plan or API.Depends
Troubleshooting
Common setup issues
Not sure your setup is ready
Run the verify.py preflight; it explains each failure and how to fix it.
Tutor skills don't appear
Check that your host discovers the folder you chose during install, such as .claude/skills/.
Project starter fails immediately
That's expected: starters fail until you implement the stages.
Alternatives
Similar AI repositories
hermes-agent
NousResearch
Personal AI agent from Nous Research that learns and improves the more you use it.
AutoGPT
Significant-Gravitas
Platform for building, deploying and running autonomous AI agents.
langflow
langflow-ai
Visual builder for creating and deploying AI agents and workflows by connecting blocks instead of writing code.
langchain
langchain-ai
Framework for building LLM-powered applications and agents.