AI engineer roadmap
What to learn to become an AI engineer, and in what order, from your first line of Python to shipping production AI. Every step is a lesson that runs in your browser.
In short: learn Python and how to call APIs, then build with language models, using prompts, retrieval, tools, agents and evals. Go on to the math, machine learning and transformers behind them, then the software engineering, APIs, MCP and agent harnesses that turn a demo into a product. Finish with how to ship it and get hired.
Create a free account Start the first lesson
How long will it take you?
244 lessons, about 157 hours of study. At 5 hours a week, that's about 32 weeks.
The roadmap at a glance
Stage by stage
-
Stage 1: Python and developer tools
Everything after this is Python calling APIs, so start here. It assumes nothing, not even what a variable is, and you send your first request to a language model before it ends.
- Python core
- Working with data
- Developer tools
- Talking to APIs
You'll build: Ad-copy reviewer. Combine files, functions, JSON and an LLM call into one small tool. Free
All 24 lessons
- Your first Python program, step by step Free
- Python variables explained for beginners Free
- Python numbers: integers, floats and rounding Free
- Python strings and f-strings explained Free
- Python if, elif and else statements Free
- Python lists: indexing, slicing and changing Free
- Python for loops and while loops Free
- Python dictionaries explained with examples Free
- Python functions: arguments and return values Free
- Python list comprehensions explained Free
- Python errors, tracebacks and try/except Free
- Python modules and imports explained Free
- Python classes and objects for beginners Free
- Working with JSON in Python Free
- Read and write files and CSV in Python Free
- NumPy arrays for beginners Free
- Terminal commands for beginners Free
- Git basics for beginners: commits and undo Free
- pip and venv: Python packages and environments Free
- How APIs work: HTTP requests and responses Free
- How to call an API in Python Free
- What is an API key? Keeping keys secret Free
- Your first LLM API call in Python Free
- Python project: build an AI ad-copy reviewer Free
Related: Free Python for AI course
-
Stage 2: Building with LLMs
This is most of the day-to-day work: prompts, embeddings and retrieval, tools, agents, evals, cost and security. None of it needs math.
- Prompting
- Context & retrieval
- Tools & agents
- Quality & production
You'll build: Research agent. A marketing research agent with retrieval, tools and evals.
All 31 lessons
- What is an LLM? How language models work Free
- LLM tokens and context windows explained
- Prompt engineering basics, with examples
- What is a system prompt? Roles explained
- Few-shot prompting explained with examples
- LLM structured output: getting reliable JSON
- Prompt chaining explained with examples
- How to choose an LLM: capability, speed, cost
- Reasoning models: how thinking effort works
- How to stream LLM responses in Python
- How LLM memory works: chat history explained
- Sending images and PDFs to an LLM
- What are embeddings? Explained with examples
- Similarity search with embeddings explained
- Chunking for RAG: how to split documents
- What is a vector database? How it works
- What is RAG? Retrieval-augmented generation
- Improve RAG: hybrid search and reranking
- Why LLMs hallucinate, and how to reduce it
- LLM function calling and tool use explained
- How AI agents work: the agent loop explained
- What is MCP? Model Context Protocol explained
- AI agent design patterns explained
- Using LLMs in automations and workflows
- What is prompt injection? How to limit it
- LLM evals: how to measure output quality
- LLM as a judge: grading output with rubrics
- Reduce LLM cost: prompt caching and batching
- LLM observability: logging and monitoring
- How to deploy an LLM app to production
- Build an AI research agent: a full project
Related: Free prompt engineering course · Free RAG course · Free AI agents course · Prompt engineering interview questions and answers · RAG interview questions and answers · AI agent interview questions and answers
-
Stage 3: Math for AI
Only what models actually run on: vectors and matrices, derivatives and gradients, probability and cross-entropy. You can put it off while you're building apps, but the next four stages build on it.
- Linear algebra
- Calculus
- Probability & statistics
- Information
You'll build: Cross-entropy and KL divergence. The loss function language models are trained on.
All 29 lessons
- What is a vector? Linear algebra for ML Free
- Vector addition, scaling and length explained
- Dot product and cosine similarity explained
- What is a matrix? Matrices in machine learning
- Matrix multiplication explained step by step
- Linear transformations: what a matrix does
- Matrix transpose, identity and inverse
- What is a tensor? Explained for deep learning
- Eigenvectors explained with intuition
- PCA and SVD explained with intuition
- Functions and graphs for machine learning
- Exponentials and logarithms explained
- What is a derivative? Explained with slopes
- Derivative rules: power, sum and product
- Chain rule explained for backpropagation
- Partial derivatives explained simply
- What is a gradient in machine learning?
- Gradient descent explained: the math
- Probability basics for machine learning
- Conditional probability and Bayes' rule
- Probability distributions explained
- Mean, variance and standard deviation
- The normal distribution explained
- Standard error and confidence intervals
- A/B testing and statistical significance
- Maximum likelihood estimation explained
- Softmax function explained with examples
- Entropy in machine learning explained
- Cross-entropy loss and KL divergence explained
Related: Gradient descent, visualized
-
Stage 4: Machine learning
How models learn from data, and how to tell whether one really works. Habits from here, like holding back test data and measuring precision and recall, carry over to everything you build later.
- Foundations
- Models
- Evaluation
- Unsupervised
You'll build: Churn prediction. Predict which customers will leave, and measure it properly.
All 24 lessons
- What is machine learning? A clear introduction Free
- Supervised learning: features and labels
- Data preparation for ML: clean, encode, scale
- Feature engineering explained with examples
- Train, validation and test sets explained
- Linear regression explained with Python
- Loss functions in machine learning explained
- Gradient descent in Python, step by step
- What is the learning rate in machine learning?
- Logistic regression explained with Python
- Multiclass classification with softmax
- Decision trees explained with examples
- Random forests and gradient boosting explained
- K-nearest neighbors (KNN) explained
- Overfitting and underfitting explained
- Regularization in machine learning: L1 and L2
- The bias-variance tradeoff explained
- Precision, recall and F1 score explained
- ROC curves and AUC explained
- K-fold cross-validation explained
- K-means clustering explained
- Dimensionality reduction: PCA and t-SNE
- Scikit-learn tutorial: fit, predict, evaluate
- Customer churn prediction in Python: a project
Related: ROC curve, precision and recall, explained interactively · Overfitting, visualized · Machine learning interview questions and answers
-
Stage 5: Deep learning
Neurons, backpropagation and the craft of getting a network to train, including an autograd engine you write yourself, then PyTorch.
- Neural networks
- Training
- Architectures
- Tooling
You'll build: Train a classifier. Build, train and debug a network end to end.
All 23 lessons
- What is an artificial neuron? Explained simply Free
- Activation functions: ReLU, sigmoid and GELU
- Multi-layer perceptrons (MLP) explained
- The forward pass in neural networks explained
- Computation graphs in deep learning
- Backpropagation explained step by step
- Build an autograd engine in Python (micrograd)
- Weight initialization in neural networks
- The neural network training loop explained
- Mini-batch gradient descent and SGD explained
- Optimizers explained: SGD, momentum and Adam
- Batch norm and layer norm explained
- Dropout in neural networks explained
- Vanishing and exploding gradients explained
- How to debug neural network training
- Residual and skip connections explained
- Convolutional neural networks (CNN) explained
- Recurrent neural networks (RNN) explained
- Embedding layers in neural networks explained
- PyTorch tensors tutorial for beginners
- PyTorch autograd and nn.Module tutorial
- Why deep learning needs GPUs, explained
- Build and train a neural network classifier
Related: Neural network playground: train one in your browser · Backpropagation, step by step · Deep learning interview questions and answers
-
Stage 6: Transformers
Attention from the intuition up, then a small GPT you write and train yourself. After this, a language model is no longer a black box.
- Language modeling
- Attention
- The transformer
- Scale & inference
You'll build: Build a tiny GPT. Write and train a small GPT from scratch.
All 21 lessons
- Language models: predicting the next token Free
- BPE tokenization explained step by step
- Build a bigram language model in Python
- Temperature, top-k and top-p explained
- Neural language models: beyond counting
- Attention in transformers: the intuition
- Query, key and value in attention explained
- Scaled dot-product attention, line by line
- Causal attention masks in transformers
- Multi-head attention explained
- Positional encoding in transformers explained
- The transformer block explained, part by part
- GPT architecture explained
- Build a GPT from scratch in Python
- BERT and embedding models explained
- How LLMs are trained: pretraining at scale
- LLM scaling laws explained
- KV cache in LLM inference explained
- Long context in LLMs: efficient attention
- Mixture of experts (MoE) explained
- Multimodal transformers: images and audio
Related: Build an LLM from scratch: a free course · How a transformer works, with a real GPT you can run · Attention in transformers, explained interactively · Temperature, top-k and top-p, explained visually · LLM interview questions and answers
-
Stage 7: Modern LLM engineering
How a raw model becomes an assistant, and how to choose between a better prompt, RAG and fine-tuning. It also covers running models yourself, benchmarks and safety.
- Post-training
- Adapting models
- Inference
- Systems & safety
You'll build: A tuned, evaluated assistant. Fine-tune, evaluate and deploy a specialist assistant.
All 22 lessons
- Base model vs chat model: what's different Free
- Supervised fine-tuning (SFT) explained
- Instruction and preference data for LLMs
- RLHF explained: learning from human feedback
- DPO explained: direct preference optimization
- What is constitutional AI? Explained
- How reasoning models are trained
- Prompting vs RAG vs fine-tuning: how to choose
- LoRA fine-tuning for LLMs explained
- How to fine-tune an open LLM: a full project
- Knowledge distillation for LLMs explained
- LLM quantization explained: GGUF, AWQ and more
- LLM serving: batching, throughput and latency
- Speculative decoding explained
- How to run open LLMs locally
- LLM benchmarks explained, and their limits
- LLM interpretability explained
- AI alignment and safety explained
- Multi-agent systems explained
- How to evaluate AI agents
- How to read AI research papers
- Fine-tune and deploy an LLM assistant
-
Stage 8: Software engineering
What separates a demo from software people can rely on: complexity, concurrency, testing, debugging, design, databases and CI.
- How computers run code
- Data structures & algorithms
- Writing good code
- Building software
You'll build: A command-line app. Design, build and test a complete program with a database.
All 16 lessons
- How computers run code, explained for Python Free
- Big O notation explained with Python
- Python concurrency and asyncio explained
- How to profile and speed up Python code
- Data structures explained with Python
- Recursion, trees and graphs in Python
- Sorting, searching and dynamic programming
- Python testing for beginners with pytest
- How to debug code systematically
- Clean code and refactoring in Python
- Python type hints and dataclasses explained
- Software design basics: modules and interfaces
- SQL basics: queries and joins for beginners
- Secure coding basics: injection and secrets
- Python project structure, packaging and CI
- Build a command-line app in Python
-
Stage 9: APIs
Most AI products reach people through an API. You build one from the wire up, then add validation, a database, authentication, rate limits and webhooks.
- HTTP from the wire up
- Building APIs
- Security & reliability
- Design at scale
You'll build: A complete API. An authenticated, validated, paginated API with tests.
All 13 lessons
- How HTTP works: requests and headers explained Free
- REST vs RPC vs GraphQL vs gRPC explained
- Build an API server in Python from scratch
- How Flask and FastAPI work, from the inside
- REST API design best practices
- Validate API requests with JSON Schema
- Build a CRUD API in Python with SQLite
- API authentication: keys, tokens and OAuth
- API rate limiting, retries and idempotency
- How webhooks work: signing and retries
- OpenAPI explained: documenting your API
- Running APIs in production: a practical guide
- Build a complete REST API in Python
-
Stage 10: Model Context Protocol (MCP)
The standard way to connect models to tools and data. You go from the wire format to a production server with OAuth, and write the client side too.
- Protocol foundations
- Building servers
- Clients and hosts
- Production MCP
You'll build: A production MCP server. A complete, tested server for the practice shop.
All 14 lessons
- JSON-RPC 2.0 explained with Python Free
- MCP protocol versions and stateless requests
- MCP discovery and capabilities explained
- MCP stdio transport explained
- MCP Streamable HTTP transport explained
- Build an MCP server: tools in Python
- MCP resources and prompts explained
- MCP progress notifications and subscriptions
- Build an MCP client in Python
- MCP hosts: connecting servers to a model
- MCP OAuth: securing remote servers
- MCP security: tool poisoning and rug pulls
- How to test and deploy an MCP server
- Build a production MCP server: a full project
-
Stage 11: Agent harnesses
The software around a model that turns it into a capable, safe agent: tools, permissions, context management, subagents, tracing and guardrails.
- Harness foundations
- Tools & environment
- Context & control
- Scaling & shipping
You'll build: Build a coding agent. A harness that edits a project, runs its tests and stops when they pass.
All 14 lessons
- What is an agent harness? Explained Free
- Build the core loop of an AI agent
- Build a tool registry for AI agents
- Build file and search tools for AI agents
- Run agent code safely: sandboxes and limits
- AI agent permissions and approval prompts
- Agent hooks and skills explained
- Agent context management and compaction
- AI agent memory and planning for long tasks
- What are subagents? How to use them
- Agent streaming, interrupts and sessions
- Build an evaluation harness for AI agents
- AI agent tracing, budgets and guardrails
- Build a coding agent in Python
-
Stage 12: Shipping and getting hired
System design, deployment, CI/CD, incidents, working in a team and preparing for interviews. This is where you put it all into production.
- System design
- Shipping
- Working in a team
- Career
You'll build: Ship a production AI service. An AI-backed service with validation, caching, rate limits, fallbacks, logging and evals.
All 13 lessons
- System design fundamentals for beginners Free
- Caching, queues and background jobs explained
- AI system design: latency, cost and fallbacks
- Docker containers and deployment explained
- CI/CD pipelines explained for beginners
- SLOs, error budgets and incident response
- Git for teams: pull requests and rebasing
- Code review best practices
- How to read an unfamiliar codebase
- How to use AI coding tools well
- Technical writing for engineers: a guide
- AI engineer interviews and portfolio guide
- Ship a production AI service: a full project
Shorter routes
You can do useful work long before the last stage. Each route here is only the lessons its final project really depends on, worked out from each lesson's prerequisites.
Build AI apps
Chatbots, retrieval, tools and evals on top of language models.
Build APIs and backends
Solid Python, HTTP APIs and services that hold up in production.
Build agents and MCP tools
Agent loops, MCP servers and a coding agent of your own.
Understand how models work
The math, neural networks and transformers, built from scratch.
Build a plan from any of these, with a finish date for your own hours.
Common questions
What does an AI engineer do?
An AI engineer builds products on top of AI models: choosing a model, writing prompts, connecting it to a company's data with retrieval, giving it tools, measuring the results with evals, and running the whole thing reliably. Most of the job is software engineering with a language model in the middle.
What's the difference between an AI engineer and a machine learning engineer?
A machine learning engineer more often trains and serves models, and an AI engineer more often builds with models that already exist. The titles overlap, and companies use them differently, so read the job description. On this roadmap, stage 2 and stages 8 to 12 are closer to AI engineering, and stages 3 to 7 are closer to machine learning engineering.
How long does it take to become an AI engineer?
The lessons add up to about 157 hours of study from a standing start, which is about 32 weeks at 5 hours a week or 16 weeks at 10. It's less if you can already code. Those hours cover the course only. Building your own projects and looking for work take longer, and we don't have data on how much longer.
Do you need math to become an AI engineer?
Not to start. Neither the AI apps route nor the agents route above includes any lesson from the math stage, so you can build real things first. You'll want the math when you need to know why models behave as they do, and it's what machine learning, deep learning and transformers build on.
Do you need a degree?
Not for the work itself, and nothing here assumes one. Some employers do ask for a degree, so check the postings for the jobs you want. Either way, it helps to have projects you can show.
Is AI engineering hard?
It covers a lot of ground, and parts of it are hard, especially the math and getting a network to train. The lessons take it in small steps, about 32 minutes each on average, and you run the code as you go, so you find out right away whether you've understood it.
What programming language do AI engineers use?
Python is the one to learn first, and it's what every lesson here uses. It runs in your browser, so there's nothing to install.
What should go in an AI engineering portfolio?
Things you built that work, and that you can explain. Each stage above ends in a project, twelve in all, listed on what you'll build. Interviews and your portfolio covers how to present them, and you can practice with AI engineer interview questions.
Is it really free?
Yes. There's nothing to pay and no card to enter. Finish a phase or the whole course and you earn a certificate of completion, with its own link you can share.
Start with stage 1
Your first lesson takes about 15 minutes and needs no account. Create one when you want to keep your progress and open every lesson.