Setup
Three tools, then a checkpoint. If you already have any of them, skip ahead.
1. Install uv
Section titled “1. Install uv”uv manages Python versions, project environments, and packages — one tool instead of three.
brew install uv(Linux: curl -LsSf https://astral.sh/uv/install.sh | sh)
Verify it:
uv --versionAny version number is a pass. Get in the habit: install, then verify. It turns silent failures into obvious ones.
2. Create the project
Section titled “2. Create the project”mkdir -p ~/agent-course && cd ~/agent-courseuv init --python 3.12uv add ollamauv init creates a project with its own isolated environment — your system Python is never touched. uv add ollama installs the one package this course needs: the client library for talking to a local model server.
You’ll run every file in this course with uv run <file> — no virtual-environment activation, no pip, nothing to remember.
3. Install Ollama and pull the model
Section titled “3. Install Ollama and pull the model”Ollama runs open-source language models on your own machine. No account, no API key, no per-call cost.
brew install ollamabrew services start ollamaollama pull qwen2.5:3bThe pull downloads about 2GB — a few minutes. qwen2.5:3b is a small model by today’s standards, and that’s deliberate: it’s free, it runs on a laptop, and its mistakes are visible, which is exactly what you want while learning how the machinery works.
4. Checkpoint
Section titled “4. Checkpoint”ollama run qwen2.5:3b "Explain what a while loop does in one sentence."If a sentence streams back, everything works. That text was generated on your machine — nothing left it, nothing was billed.
One thing worth noticing before you move on: the answer arrives word by word. That’s not a UI effect. The model genuinely produces one token at a time, each conditioned on everything before it. A language model is a machine that predicts what text comes next — everything in this course is built on top of that single primitive.