AI Engineering from Scratch Deep Dive: 435 Lessons × 20 Stages
Why, of the 84% Who Use AI Tools, Do Only 18% Feel "Prepared"?
On May 22, 2026, the #5 GitHub Trending AI Engineering from Scratch opened with a shocking statistic:
84% of students already use AI tools. Only 18% feel prepared to use them professionally.
This open-source course, created by Rohit Ghumare (@rohitg00) and released under the MIT license, has only one goal: to help that 84% truly understand AI, not just be able to call APIs.
1. Course Design Philosophy: "Build, Don't Import"
1.1 Core Philosophy
❌ Traditional AI teaching: "Use pip install transformers, call GPT models"
✅ AIEFS: "First derive the Attention mechanism from mathematics, then implement it with NumPy,
and only at the end use PyTorch for comparison: this way you know what the framework is doing internally"
1.2 The "Six-Beat Rhythm" Teaching Method
Every lesson follows the same structural cycle:
┌────────────────────────────────────────────────────┐
│ │
│ MOTTO One-sentence core concept │
│ ↓ │
│ PROBLEM Specific pain point: Why is this needed? │
│ ↓ │
│ CONCEPT Intuitive understanding: diagrams + analogies │
│ ↓ │
│ BUILD IT From scratch: pure math, no frameworks │
│ ↓ │
│ USE IT Production tools: PyTorch / sklearn implementation │
│ ↓ │
│ SHIP IT Deliverables: Prompt · Skill · Agent │
│ · MCP Server │
│ │
└────────────────────────────────────────────────────┘
Key Innovation: Each lesson is not just about "learning a concept", but about producing a reusable digital asset: a prompt template, an Agent Skill, or an MCP Server.
II. Complete 20-Phase Roadmap
2.1 Overall Architecture
Phase 0: Setup & Tooling (12 lessons)
↓
Phase 1: Math Foundations (22 lessons) ← Linear Algebra, Calculus, Probability
↓
Phase 2: ML Fundamentals (18 lessons) ← Regression, Decision Trees, SVM
↓
Phase 3: Deep Learning Core (25 lessons) ← Perceptron→Backprop→PyTorch
↓
┌──────┼────────┬──────────┐
↓ ↓ ↓ ↓
Phase 4 Phase 5 Phase 6 Phase 9
Vision NLP Speech RL
(18 lessons) (22 lessons) (15 lessons) (20 lessons)
│ │ │ │
│ ↓ │ │
│ Phase 7 ─────┘ │
│ Transformers (28 lessons) │
│ │ │
│ ↓ │
│ Phase 8 │
│ GenAI (20 lessons) │
│ │ │
│ ↓ │
│ Phase 10 │
│ LLMs from Scratch (35 lessons)│
│ │ │
│ ├───────────────────┤
│ ↓ ↓
│ Phase 11 Phase 12
│ LLM Engineering (30 lessons) Multimodal (18 lessons)
│ │
│ ↓
│ Phase 13: Tools & Protocols (20 lessons)
│ │
│ ↓
│ Phase 14: Agent Engineering (40 lessons) ← 🔥 Core
│ │
│ ├───────────────────┐
│ ↓ ↓
│ Phase 15 Phase 17
│ Autonomous Systems Infrastructure (22 lessons)
│ (20 lessons) │
│ │ │
│ ↓ │
│ Phase 16 ──────────────────┤
│ Multi-Agent & Swarms │
│ (25 lessons) │
│ │ │
│ ├──────────────────────┤
│ ↓ ↓
│ Phase 18 ─────── Phase 19 ─┘
│ Ethics (12 lessons) Capstone (8 lessons)
2.2 Key Content for Each Phase
| Phase | Lessons | Core Content | Language |
|---|---|---|---|
| 0. Setup | 12 | Development environment, Git, Docker, uv package management | Shell |
| 1. Math | 22 | Linear algebra, calculus, probability theory, information theory | Python |
| 2. ML Fundamental | 18 | Linear regression, logistic regression, decision trees, SVM, ensemble learning | Python |
| 3. Deep Learning | 25 | Perceptron, Backpropagation, Optimizers, Introduction to PyTorch | Python |
| 4. Vision | 18 | CNN, ResNet, object detection, image segmentation | Python |
| 5. NLP | 22 | Tokenization, Word2Vec, RNN/LSTM, Seq2Seq | Python |
| 6. Speech | 15 | Audio processing, ASR, TTS | Python |
| 7. Transformers | 28 | Self-Attention, Multi-Head, Positional Encoding, BERT/GPT | Python |
| 8. GenAI | 20 | VAE, GAN, Diffusion Models | Python |
| 9. RL | 20 | Q-Learning, Policy Gradient, REINFORCE, PPO, Multi-Agent RL | Python |
| 10. LLMs from Scratch | 35 | Tokenizer implementation, GPT architecture, pretraining, SFT, RLHF, DPO | Python |
| 11. LLM Engineering | 30 | RAG, Fine-tuning, Prompt Engineering, Agents | Python | | 12. Multimodal | 18 | CLIP, DALL-E, Vision-Language Models | Python | | 13. Tools & Protocols | 20 | MCP, A2A, API Design | TS/Rust | | 14. Agent Engineering | 40 | Reflection, Tool Use, Planning, Memory, Computer Use | Python/TS | | 15. Autonomous Systems | 20 | Self-Improving Agents, AutoGPT Patterns | Python | | 16. Multi-Agent Swarms | 25 | Agent Collaboration, Negotiation, A2A Protocol, Swarm Intelligence | Python/TS | | 17. Infrastructure | 22 | Model Deployment, Inference Optimization, Monitoring, Scaling | Rust/Python | | 18. Ethics | 12 | Bias, Safety, Alignment, Explainability | Python | | 19. Capstone | 8 | End-to-End AI System Construction | All |
III. Phase 14, Agent Engineering: The Core of the Entire Course
Phase 14 is the stage with the greatest practical value in AIEFS, and its 40 lessons cover all key patterns in current AI Agent development:
3.1 Selected Course Content
| # | Course | Type | Description |
|---|---|---|---|
| 01 | Agent Loop Fundamentals | Build | Implement the Agent main loop from scratch (Observe→Think→Act) |
| 03 | Reflexion & Verbal RL | Build | Reinforcement learning from verbal feedback |
| 05 | Tool Use & Function Calling | Build | Tool use and function calling mechanisms |
| 08 | Planning Agents | Build | Task decomposition and plan generation |
| 10 | Skill Libraries (Voyager) | Build | Skill libraries and lifelong learning |
| 12 | Memory Systems | Build | Short-term, long-term, and working memory architectures |
| 14 | RAG Agents | Build | Retrieval-augmented generation Agent implementation |
| 17 | Claude Agent SDK | Build | Claude's Subagents and Session Store |
| 19 | OpenAI Agents SDK | Build | OpenAI Agent framework |
| 21 | Computer Use Agents | Build | Claude CUA, OpenAI Operator, Gemini |
| 25 | Code Generation Agents | Build | SWE-Agent, Devin pattern |
| 30 | Multi-Agent Coordination | Build | Inter-Agent communication and coordination |
| 35 | Agent Evaluation | Build | Benchmarking and performance evaluation |
| 37 | Runtime Feedback Loops | Build | Runtime self-improvement |
| 40 | Multi-Session Handoff | Build | Cross-Session Agent handoff |
3.2 Claude Agent SDK Course (Lesson 17)
This lesson is especially important to us:
Content covered:
├── Claude Code's Subagent architecture
├── Session Store read/write operations
├── Sub-Agent lifecycle management
├── Cross-Agent context passing
└── Error handling for multi-layer Agent trees
3.3 Computer Use Agents (Lesson 21)
Supported frameworks:
├── Claude Computer Use (Anthropic)
├── OpenAI CUA (Computer Using Agent)
├── Gemini Computer Use
└── Custom Browser Automation Agent
4. Course Technology Stack Selection
4.1 Four-Language Strategy
AIEFS is not a Python-only course. It selects the most suitable language based on the technical requirements of each phase:
| Language | Phases Used | Rationale |
|---|---|---|
| Python | Phase 1-12, 14-16 | Most mature ML/DL ecosystem |
| TypeScript | Phase 13, 14 | Web ecosystem integration for MCP/A2A protocols |
| Rust | Phase 17 | Inference engines, high-performance infrastructure |
| Julia | Phase 1 | Mathematical derivation and scientific computing |
4.2 File Structure for Each Lesson
phases/14-agent-engineering/17-claude-agent-sdk/
├── code/
│ ├── build/ ← From scratch implementation
│ │ └── agent_loop.py
│ └── use/ ← Using the framework
│ └── claude_agent.py
├── docs/
│ └── en.md ← Course narrative (Motivation→Concept→Implementation→Reflection)
├── outputs/ ← Deliverables
│ ├── agent_skill.md
│ └── mcp_server.py
└── tests/
└── test_agent.py
5. Built-in Claude Code Skills
AIEFS is not just a course. It also includes two Claude Code Skills to support learning:
5.1 find-your-level (Placement Quiz)
→ Analyze your existing knowledge
→ Recommend the best starting phase
→ Generate a personalized learning path
5.2 check-understanding (Phase Quiz)
→ Diagnostic quiz after completing each Phase
→ Identify knowledge gaps
→ Recommend specific courses to review
6. Course Statistics and Scale
| Metric | Value |
|---|---|
| Total courses | 435 (including the latest merge in Phase 19) |
| Total phases | 20 |
| Estimated learning time | ~320 hours |
| Programming languages | Python, TypeScript, Rust, Julia |
| Output assets | Prompt templates, Agent Skills, MCP Server |
| License | MIT (completely free to use, including commercial use) |
| Glossary | 277 terms |
| Contributors | 30+ |
| GitHub Stars | 14,000+ and growing rapidly |
7. Learning Path Recommendations
7.1 Beginner Path (Starting from Zero)
Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 5 → Phase 7
→ Phase 10 → Phase 11 → Phase 14
Estimated time: ~200 hours
7.2 Experienced Path (Skip the Basics)
Skip Phase 0-3 → Phase 7 (Transformers) → Phase 10 (LLMs)
→ Phase 11 (LLM Engineering) → Phase 14 (Agent Engineering)
→ Phase 16 (Multi-Agent)
Estimated time: ~120 hours
7.3 Practitioner Path (Agent Layer Only)
Phase 13 (Tools & Protocols) → Phase 14 (Agent Engineering)
→ Phase 16 (Multi-Agent) → Phase 19 (Capstone)
Estimated time: ~80 hours
8. Comparison with Other AI Courses
| Course | Lessons | From-Scratch Implementation | Agent Engineering | Multi-Agent | License | Language |
|---|---|---|---|---|---|---|
| AIEFS | 435 | ✅ All | ✅ 40 lessons | ✅ 25 lessons | MIT | 4 languages |
| fast.ai | ~30 | Partial | ❌ | ❌ | Apache 2.0 | Python |
| DeepLearning.AI | ~50 | Partial | ✅ A few | ❌ | Proprietary | Python |
| CS229 (Stanford) | ~20 | ✅ Mathematics | ❌ | ❌ | N/A | Python |
| CS224N (Stanford) | ~20 | Partial | ❌ | ❌ | N/A | Python |
| Full Stack DL | ~20 | Partial | ❌ | ❌ | MIT | Python |
AIEFS is the only full-stack AI engineering course that spans from mathematical foundations to Multi-Agent Swarm, and it is completely free and MIT licensed.
9. Implications for Junze Think Tank
9.1 Direct Value
| Application | Corresponding AIEFS Courses |
|---|---|
| Deepen Claude Code Usage | Phase 14 Lesson 17 (Claude Agent SDK) |
| Understand Agent Collaboration Mechanisms | Phase 14 Lesson 30 (Multi-Agent Coordination) |
| Design Research Agent Systems | Phase 14 Lesson 12 (Memory Systems) |
| Computer Use Automation | Phase 14 Lesson 21 (Computer Use Agents) |
| DS Bridge Optimization | Phase 14 Lesson 40 (Multi-Session Handoff) |
9.2 Strategic Recommendations
- Prioritize Phase 14: The 40 lessons in Agent Engineering directly correspond to our existing Claude Code + DeepSeek Bridge architecture
- Produce Agent Skills: Refer to the SHIP IT section to convert learning outcomes into reusable Agent Skill
- Establish a Team Learning Path: If the development team expands in the future, AIEFS can serve as standardized training material
- Commercial Friendliness of the MIT License: Course code and outputs can be freely used in commercial projects
9.3 Estimated Learning Investment
Following the practitioner path (Phase 13→14→16→19), assuming 2 hours per day:
Time required: about 6-8 weeks (80 hours ÷ 2h/day ÷ 5 days/week)
10. Conclusion
AI Engineering from Scratch is the most noteworthy open-source AI education project of 2026. Its unique value lies in:
- Full coverage: Math → ML → DL → Transformers → LLMs → Agents → Swarms, with no skipped steps
- Built from scratch: Every algorithm is first written by hand, then implemented with a framework, for true understanding rather than memorization
- Output-oriented: Every lesson produces reusable Prompt/Skill/Agent/MCP Server
- Future-facing: Agent Engineering and Multi-Agent Swarms are the most cutting-edge directions of 2026
| Advantages | Disadvantages |
|---|---|
| 435 lessons with full coverage and no blind spots | Long learning time (~320h for the full path) |
| Build→Use→Ship output orientation | Some Phases are still under construction |
| MIT licensed, completely free | The large volume of content may make it hard to know where to begin |
| Hands-on practice in four languages, not just theory | Requires some programming foundation |
| Claude Code Skills built in | Documentation is currently mainly in English |
One-sentence summary: This is not a course that "teaches you to use AI" but a roadmap that "teaches you to become an AI engineer," from matrix multiplication to autonomous Agent Swarm, with all 435 lessons open source.
Version: v1.0 · 2026-05-24 · Based on rohitg00/ai-engineering-from-scratch (14,000+ ⭐, MIT)
More in Tools
- PaddleOCR in Practice: Extracting Hong Kong Stock Annual Report Financial Data in 83 Seconds
- Webb-Site: The Essential Hidden Treasure for Hong Kong Stock Research, a One-Click Tool to Get Annual Report PDFs for All Listed Companies
- Academic Research Skills Deep Technical Breakdown: How 45+ Agents Collaborate to Complete the Full Workflow from Literature Review to Peer Review
- CodeGraph Deep Technical Breakdown: How to Save AI Coding Agents 35% in Costs and Cut Tool Calls by 70%