This is a free preview. Enrol on the course to save your progress and open every lesson.

Lesson 3 of 32 · 25 min

Set up Ollama and meet Front Desk

What you need

  • A Windows, Mac or Linux computer with at least 8 GB of memory and about 6 GB of free disk space
  • Python 3.10 or newer, and some Python: functions, lists, dictionaries and loops. Our free Python Foundations course covers it all.
  • No accounts, no API keys and no cost. The models run on your own computer with Ollama.

If your computer is too slow or you can't install software, open the Front Desk notebook in Google Colab. It installs everything on a free Google computer and runs the same programs; you only need a Google account.

Set up

  1. Download the starter files (attached to this lesson) and unzip them.
  2. Install Ollama from ollama.com, then download two free models (about 5 GB together):
    ollama pull qwen3:4b-instruct
    ollama pull llama3.2
  3. Open a terminal in the ai-agents-starter folder and set up Python:
    python -m venv .venv
    source .venv/bin/activate      # Windows PowerShell: .venv\Scripts\activate
    pip install -r requirements.txt

We use qwen3:4b-instruct for most of the course: it's small enough for a laptop and good at calling tools. llama3.2 is smaller and faster, and we use it to compare. To try another model with any program, set MODEL first:

MODEL=llama3.2 python module-1/no_tools.py          # Mac and Linux
$env:MODEL="llama3.2"; python module-1/no_tools.py  # Windows PowerShell

Meet Brightside Tutoring

Brightside is a small tutoring centre in Parramatta run by Priya Nair. It tutors maths, English and science in small groups of up to four. The starter files hold its pretend systems:

FileWhat's in it
data/notes/Five short notes: about, prices, policies, subjects and tutors, term dates
data/timetable.json13 sessions, like M3: maths, Years 7 to 8, Wednesday 4:00 pm with Tom Becker, with places taken
data/accounts.jsonInvoices for three families: Kowalski, Osei and Tran
brightside.pyPlain Python that searches the notes, works out free places, saves bookings and remembers facts. No AI.

Brightside gets the same questions all day: "Is there room on Wednesday?", "How much for two kids?", "How much do I owe?" Priya wants an assistant, Front Desk, that answers them correctly, books trials when a staff member says yes, and never makes things up.

Front Desk, version 0

Let's start with no tools at all: a model with a system prompt, like a chat tool.

module-1/no_tools.py

"""Front Desk without tools: a plain chat reply. Watch what it does with a question it can't know."""
import os
import sys

import ollama

MODEL = os.environ.get("MODEL", "qwen3:4b-instruct")
question = " ".join(sys.argv[1:]) or input("Ask Front Desk: ")

response = ollama.chat(model=MODEL, options={"temperature": 0}, messages=[
    {"role": "system", "content": "You are Front Desk, the assistant for Brightside Tutoring in Parramatta. "
                                  "Answer parents' questions in two or three sentences."},
    {"role": "user", "content": question},
])
print(response["message"]["content"])

Result:

$ python module-1/no_tools.py "Is there a free place in Year 8 maths on Wednesday afternoon? My son Leo wants a trial."
Hi! Yes, there’s a free trial spot available in Year 8 Maths on Wednesday afternoon. Leo can join us for a 30-minute session to see if it’s a good fit. Just let us know your preferred time, and we’ll confirm the details!

It sounds great, and it's wrong. The model has never seen Brightside's timetable. It said yes because yes is a likely, friendly answer. It also invented a "30-minute session" (Brightside's lessons are 60 minutes) and didn't say which time or tutor, because it doesn't know.

This is the problem the whole course solves. A language model on its own only knows what was in its training data, and it fills gaps with whatever sounds right. To answer about your business, it needs tools that look things up, and a loop that uses them. That's Module 2.

Try it

  1. Run python module-1/no_tools.py and ask three questions Brightside's notes could answer (prices, opening hours, which tutors teach science). Open the notes in data/notes/ and mark each answer right or wrong.
  2. Run one of the same questions with MODEL=llama3.2. Is it wrong in the same way?
  3. Add "If you don't know, say so" to the system prompt. Does that fix it? (Usually only partly. Keep that in mind for Module 3.)

Downloads

2 files to download once you enrol.