Repository iconcurepo.dev
Blog
ai-engineering-from-scratch preview

rohitg00 / ai-engineering-from-scratch

agentsaiai-agentsai-engineering

Learn it. Build it. Ship it for others.

79.9k Stars
visibility467 Watchers
fork_right14.3k Forks
Python
historyUpdated recently

description README.md

AI Engineering from Scratch

Star History Rank GitHub Trending Repository of the Day

Implement model internals, retrieval pipelines, and agent runtimes. Test them, inspect failures, and keep the code and evaluation results.

Start learning · Choose a path · Try a lab · Build a project · Browse the curriculum

Free, open source, MIT. Learn on the website, with a coding agent, or by running local code.

542 lessons. 20 phases. Python, TypeScript, Rust, Julia, Go.

Turn your coding agent into a tutor with one command:

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

MIT License 542 lessons 20 phases GitHub stars Website

Read in your language

🇬🇧 English · 🇨🇳 简体中文 · 🇹🇼 繁體中文(台灣) · 🇯🇵 日本語 · 🇰🇷 한국어 · 🇵🇹 Português · 🇧🇷 Português (Brasil) · 🇪🇸 Español · 🇩🇪 Deutsch · 🇫🇷 Français · 🇮🇹 Italiano · 🇳🇱 Nederlands · 🇵🇱 Polski · 🇨🇿 Čeština · 🇷🇴 Română · 🇭🇺 Magyar · 🇬🇷 Ελληνικά · 🇸🇪 Svenska · 🇩🇰 Dansk · 🇳🇴 Norsk · 🇫🇮 Suomi · 🇷🇺 Русский · 🇺🇦 Українська · 🇹🇷 Türkçe · 🇮🇱 עברית · 🇸🇦 العربية · 🇮🇷 فارسی · 🇮🇳 हिन्दी · 🇧🇩 বাংলা · 🇵🇰 اردو · 🇹🇭 ไทย · 🇻🇳 Tiếng Việt · 🇮🇩 Bahasa Indonesia · 🇵🇭 Tagalog

Sponsors

SerpApi. Web Search API for your AI apps. Available in Markdown and JSON for any integration.

Your support keeps every lesson free and open source. See all supporters · Become a sponsor

Why build it from scratch

A framework call hides the part that breaks. When a loss turns into NaN or an agent repeats the same tool call, the person who wrote the small version knows where to look. Most lessons have you write that small version first and run it, then show where production tools do the same work.

One lesson in four steps: the problem, build it from scratch, see where production tools do the same work, and ship an artifact you keep. The example is the agent loop lesson in Phase 14.

Text version
  • 01 · THE PROBLEM: An LLM returns text. It cannot act.
  • 02 · BUILD IT: A ReAct loop in stdlib Python.
  • 03 · USE IT: Where agent SDKs run the same loop.
  • 04 · SHIP IT: skill-agent-loop.md, ready for your agent.

Learning paths

RouteStarting lesson
Model foundationsSetup and tooling
LLM systemsPrompt engineering
Agents and deliveryThe agent loop

Compare career paths · Prerequisites and study time

Gradient descent

Twenty starting points follow gradient descent on a quadratic loss. The graph shows their positions and mean loss after each update.