Index Ai Academy
Twelve stages · 244 lessons · free

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

35 lessons need no account. A free account opens the other 209 and saves your progress.

How long will it take you?

Where you're starting from
Hours a week

244 lessons, about 157 hours of study. At 5 hours a week, that's about 32 weeks.

The hours include re-tries and reviews. Your own projects and a job search come on top. Not sure what you already know? The placement test checks in about 10 minutes and marks it off for you.

The roadmap at a glance

  1. Python and developer tools
  2. Building with LLMs
  3. Math for AI
  4. Machine learning
  5. Deep learning
  6. Transformers
  7. Modern LLM engineering
  8. Software engineering
  9. APIs
  10. Model Context Protocol (MCP)
  11. Agent harnesses
  12. Shipping and getting hired

Stage by stage

  1. Stage 1: Python and developer tools

    24 lessons · about 12 hours

    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
    1. Your first Python program, step by step Free
    2. Python variables explained for beginners Free
    3. Python numbers: integers, floats and rounding Free
    4. Python strings and f-strings explained Free
    5. Python if, elif and else statements Free
    6. Python lists: indexing, slicing and changing Free
    7. Python for loops and while loops Free
    8. Python dictionaries explained with examples Free
    9. Python functions: arguments and return values Free
    10. Python list comprehensions explained Free
    11. Python errors, tracebacks and try/except Free
    12. Python modules and imports explained Free
    13. Python classes and objects for beginners Free
    14. Working with JSON in Python Free
    15. Read and write files and CSV in Python Free
    16. NumPy arrays for beginners Free
    17. Terminal commands for beginners Free
    18. Git basics for beginners: commits and undo Free
    19. pip and venv: Python packages and environments Free
    20. How APIs work: HTTP requests and responses Free
    21. How to call an API in Python Free
    22. What is an API key? Keeping keys secret Free
    23. Your first LLM API call in Python Free
    24. Python project: build an AI ad-copy reviewer Free

    Related: Free Python for AI course

  2. Stage 2: Building with LLMs

    31 lessons · about 17 hours

    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
    1. What is an LLM? How language models work Free
    2. LLM tokens and context windows explained
    3. Prompt engineering basics, with examples
    4. What is a system prompt? Roles explained
    5. Few-shot prompting explained with examples
    6. LLM structured output: getting reliable JSON
    7. Prompt chaining explained with examples
    8. How to choose an LLM: capability, speed, cost
    9. Reasoning models: how thinking effort works
    10. How to stream LLM responses in Python
    11. How LLM memory works: chat history explained
    12. Sending images and PDFs to an LLM
    13. What are embeddings? Explained with examples
    14. Similarity search with embeddings explained
    15. Chunking for RAG: how to split documents
    16. What is a vector database? How it works
    17. What is RAG? Retrieval-augmented generation
    18. Improve RAG: hybrid search and reranking
    19. Why LLMs hallucinate, and how to reduce it
    20. LLM function calling and tool use explained
    21. How AI agents work: the agent loop explained
    22. What is MCP? Model Context Protocol explained
    23. AI agent design patterns explained
    24. Using LLMs in automations and workflows
    25. What is prompt injection? How to limit it
    26. LLM evals: how to measure output quality
    27. LLM as a judge: grading output with rubrics
    28. Reduce LLM cost: prompt caching and batching
    29. LLM observability: logging and monitoring
    30. How to deploy an LLM app to production
    31. 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

  3. Stage 3: Math for AI

    29 lessons · about 15 hours

    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
    1. What is a vector? Linear algebra for ML Free
    2. Vector addition, scaling and length explained
    3. Dot product and cosine similarity explained
    4. What is a matrix? Matrices in machine learning
    5. Matrix multiplication explained step by step
    6. Linear transformations: what a matrix does
    7. Matrix transpose, identity and inverse
    8. What is a tensor? Explained for deep learning
    9. Eigenvectors explained with intuition
    10. PCA and SVD explained with intuition
    11. Functions and graphs for machine learning
    12. Exponentials and logarithms explained
    13. What is a derivative? Explained with slopes
    14. Derivative rules: power, sum and product
    15. Chain rule explained for backpropagation
    16. Partial derivatives explained simply
    17. What is a gradient in machine learning?
    18. Gradient descent explained: the math
    19. Probability basics for machine learning
    20. Conditional probability and Bayes' rule
    21. Probability distributions explained
    22. Mean, variance and standard deviation
    23. The normal distribution explained
    24. Standard error and confidence intervals
    25. A/B testing and statistical significance
    26. Maximum likelihood estimation explained
    27. Softmax function explained with examples
    28. Entropy in machine learning explained
    29. Cross-entropy loss and KL divergence explained

    Related: Gradient descent, visualized

  4. Stage 4: Machine learning

    24 lessons · about 14 hours

    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
    1. What is machine learning? A clear introduction Free
    2. Supervised learning: features and labels
    3. Data preparation for ML: clean, encode, scale
    4. Feature engineering explained with examples
    5. Train, validation and test sets explained
    6. Linear regression explained with Python
    7. Loss functions in machine learning explained
    8. Gradient descent in Python, step by step
    9. What is the learning rate in machine learning?
    10. Logistic regression explained with Python
    11. Multiclass classification with softmax
    12. Decision trees explained with examples
    13. Random forests and gradient boosting explained
    14. K-nearest neighbors (KNN) explained
    15. Overfitting and underfitting explained
    16. Regularization in machine learning: L1 and L2
    17. The bias-variance tradeoff explained
    18. Precision, recall and F1 score explained
    19. ROC curves and AUC explained
    20. K-fold cross-validation explained
    21. K-means clustering explained
    22. Dimensionality reduction: PCA and t-SNE
    23. Scikit-learn tutorial: fit, predict, evaluate
    24. Customer churn prediction in Python: a project

    Related: ROC curve, precision and recall, explained interactively · Overfitting, visualized · Machine learning interview questions and answers

  5. Stage 5: Deep learning

    23 lessons · about 15 hours

    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
    1. What is an artificial neuron? Explained simply Free
    2. Activation functions: ReLU, sigmoid and GELU
    3. Multi-layer perceptrons (MLP) explained
    4. The forward pass in neural networks explained
    5. Computation graphs in deep learning
    6. Backpropagation explained step by step
    7. Build an autograd engine in Python (micrograd)
    8. Weight initialization in neural networks
    9. The neural network training loop explained
    10. Mini-batch gradient descent and SGD explained
    11. Optimizers explained: SGD, momentum and Adam
    12. Batch norm and layer norm explained
    13. Dropout in neural networks explained
    14. Vanishing and exploding gradients explained
    15. How to debug neural network training
    16. Residual and skip connections explained
    17. Convolutional neural networks (CNN) explained
    18. Recurrent neural networks (RNN) explained
    19. Embedding layers in neural networks explained
    20. PyTorch tensors tutorial for beginners
    21. PyTorch autograd and nn.Module tutorial
    22. Why deep learning needs GPUs, explained
    23. 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

  6. Stage 6: Transformers

    21 lessons · about 14 hours

    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
    1. Language models: predicting the next token Free
    2. BPE tokenization explained step by step
    3. Build a bigram language model in Python
    4. Temperature, top-k and top-p explained
    5. Neural language models: beyond counting
    6. Attention in transformers: the intuition
    7. Query, key and value in attention explained
    8. Scaled dot-product attention, line by line
    9. Causal attention masks in transformers
    10. Multi-head attention explained
    11. Positional encoding in transformers explained
    12. The transformer block explained, part by part
    13. GPT architecture explained
    14. Build a GPT from scratch in Python
    15. BERT and embedding models explained
    16. How LLMs are trained: pretraining at scale
    17. LLM scaling laws explained
    18. KV cache in LLM inference explained
    19. Long context in LLMs: efficient attention
    20. Mixture of experts (MoE) explained
    21. 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

  7. Stage 7: Modern LLM engineering

    22 lessons · about 16 hours

    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
    1. Base model vs chat model: what's different Free
    2. Supervised fine-tuning (SFT) explained
    3. Instruction and preference data for LLMs
    4. RLHF explained: learning from human feedback
    5. DPO explained: direct preference optimization
    6. What is constitutional AI? Explained
    7. How reasoning models are trained
    8. Prompting vs RAG vs fine-tuning: how to choose
    9. LoRA fine-tuning for LLMs explained
    10. How to fine-tune an open LLM: a full project
    11. Knowledge distillation for LLMs explained
    12. LLM quantization explained: GGUF, AWQ and more
    13. LLM serving: batching, throughput and latency
    14. Speculative decoding explained
    15. How to run open LLMs locally
    16. LLM benchmarks explained, and their limits
    17. LLM interpretability explained
    18. AI alignment and safety explained
    19. Multi-agent systems explained
    20. How to evaluate AI agents
    21. How to read AI research papers
    22. Fine-tune and deploy an LLM assistant
  8. Stage 8: Software engineering

    16 lessons · about 12 hours

    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
    1. How computers run code, explained for Python Free
    2. Big O notation explained with Python
    3. Python concurrency and asyncio explained
    4. How to profile and speed up Python code
    5. Data structures explained with Python
    6. Recursion, trees and graphs in Python
    7. Sorting, searching and dynamic programming
    8. Python testing for beginners with pytest
    9. How to debug code systematically
    10. Clean code and refactoring in Python
    11. Python type hints and dataclasses explained
    12. Software design basics: modules and interfaces
    13. SQL basics: queries and joins for beginners
    14. Secure coding basics: injection and secrets
    15. Python project structure, packaging and CI
    16. Build a command-line app in Python
  9. Stage 9: APIs

    13 lessons · about 10 hours

    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
    1. How HTTP works: requests and headers explained Free
    2. REST vs RPC vs GraphQL vs gRPC explained
    3. Build an API server in Python from scratch
    4. How Flask and FastAPI work, from the inside
    5. REST API design best practices
    6. Validate API requests with JSON Schema
    7. Build a CRUD API in Python with SQLite
    8. API authentication: keys, tokens and OAuth
    9. API rate limiting, retries and idempotency
    10. How webhooks work: signing and retries
    11. OpenAPI explained: documenting your API
    12. Running APIs in production: a practical guide
    13. Build a complete REST API in Python
  10. Stage 10: Model Context Protocol (MCP)

    14 lessons · about 11 hours

    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
    1. JSON-RPC 2.0 explained with Python Free
    2. MCP protocol versions and stateless requests
    3. MCP discovery and capabilities explained
    4. MCP stdio transport explained
    5. MCP Streamable HTTP transport explained
    6. Build an MCP server: tools in Python
    7. MCP resources and prompts explained
    8. MCP progress notifications and subscriptions
    9. Build an MCP client in Python
    10. MCP hosts: connecting servers to a model
    11. MCP OAuth: securing remote servers
    12. MCP security: tool poisoning and rug pulls
    13. How to test and deploy an MCP server
    14. Build a production MCP server: a full project
  11. Stage 11: Agent harnesses

    14 lessons · about 10 hours

    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
    1. What is an agent harness? Explained Free
    2. Build the core loop of an AI agent
    3. Build a tool registry for AI agents
    4. Build file and search tools for AI agents
    5. Run agent code safely: sandboxes and limits
    6. AI agent permissions and approval prompts
    7. Agent hooks and skills explained
    8. Agent context management and compaction
    9. AI agent memory and planning for long tasks
    10. What are subagents? How to use them
    11. Agent streaming, interrupts and sessions
    12. Build an evaluation harness for AI agents
    13. AI agent tracing, budgets and guardrails
    14. Build a coding agent in Python
  12. Stage 12: Shipping and getting hired

    13 lessons · about 10 hours

    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
    1. System design fundamentals for beginners Free
    2. Caching, queues and background jobs explained
    3. AI system design: latency, cost and fallbacks
    4. Docker containers and deployment explained
    5. CI/CD pipelines explained for beginners
    6. SLOs, error budgets and incident response
    7. Git for teams: pull requests and rebasing
    8. Code review best practices
    9. How to read an unfamiliar codebase
    10. How to use AI coding tools well
    11. Technical writing for engineers: a guide
    12. AI engineer interviews and portfolio guide
    13. Ship a production AI service: a full project

    Related: AI engineer interview questions and answers

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.

39 lessons · about 20 hours

Build AI apps

Chatbots, retrieval, tools and evals on top of language models.

36 lessons · about 23 hours

Build APIs and backends

Solid Python, HTTP APIs and services that hold up in production.

82 lessons · about 53 hours

Build agents and MCP tools

Agent loops, MCP servers and a coding agent of your own.

97 lessons · about 56 hours

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.

Create a free account Start the first lesson