PYTHON FOR AGENTS
A gentle course for people who have never written code. Every topic gets two exercises that run in your browser and check your work for you: a guided one that shows you how, then a shorter one where you write the code yourself from a brief. The practice data comes from Lumen Lane Signs, the same made-up neon sign workshop the agent course uses, so you count its stock, look up its orders and sort its tickets. Each module ends with a 45-minute mini project at the workshop and a short test. Nothing here is Python trivia: each lesson teaches something the agent course uses, including the shorthand it writes without explaining, and the capstone has you build a tiny tool runner from a description. The final test doubles as the agent course's entry check, so passing it lets you skip that check.
6 MODULES / 39 LESSONS / 20 UE (15 HOURS)
By the end you can
- Write and run Python with variables, strings, lists, loops and functions
- Write small programs from a short brief, without step-by-step instructions
- Tell print from return, and fix the None that shows up when a function only prints
- Build and read chat messages, which are lists of dicts with a role and some content
- Stop a loop on purpose with a counter, before it stops you
- Read a traceback, catch errors and raise your own
- Turn a model's JSON text into a function call with a registry and **, and never crash on a bad call
- Read the shorthand agent code uses: comprehensions, sets, any and all, isinstance, sorting with key=, rounded money and dates
Narrated by an AI clone of the founder's voice
Who it’s for
- Complete beginners. You have never written code, or not for a long time.
The syllabus. Nothing hidden.
Set at 20 UE, teaching units of 45 minutes, so 15 hours. Lesson minutes are estimates. Lessons marked free open without an account. The rest need a free one.
FIRST LINES
Values, names, lists and loops. Enough to make the console say things on purpose.
- Hello, PythonValues, variables, f-strings and the console.FREE12 MIN
- Hello, Python: on your ownBuild an order line from variables and an f-string, with no TODOs.FREE15 MIN
- Lists and for loopsKeep things in order, then do something to each one.FREE15 MIN
- Lists and for loops: on your ownCount the workshop's shelves with two loops you write yourself.FREE15 MIN
- Mini project: the morning countTurn the stocktake lists into the whiteboard note.FREE45 MIN
- Module test: first linesSix questions from a pool on values, f-strings, lists and loops.FREE10 MIN
DATA WITH LABELS
Dicts, functions and decisions. Most agent code is these three in a trench coat.
- DictsLook things up by name, and read a chat the way an API sees it.15 MIN
- Dicts: on your ownRead and update the stock list, item by item code.15 MIN
- FunctionsName a piece of work, hand it inputs and get an answer back.15 MIN
- Functions: on your ownPrint versus return: fix a function that prints, then build on it.20 MIN
- if, elif and elseCompare things and choose what happens next.15 MIN
- if, elif and else: on your ownDecide which shelves need restocking.20 MIN
- Mini project: sort the inboxSort support tickets into urgent, normal and low with if and elif.45 MIN
- Module test: data with labelsEight questions from a pool on dicts, functions and decisions.12 MIN
LOOPS AND ERRORS
Loops that stop on purpose, errors you can read, and a quiz where you play the computer.
- Loops that know when to stopwhile, break and the counter that saves your afternoon.15 MIN
- Loops that know when to stop: on your ownCount the days until a reorder, and give up on time.20 MIN
- When code breaksRead a traceback, catch errors and raise your own.18 MIN
- When code breaks: on your ownLook up orders, raise for unknown ones and catch it.20 MIN
- What does this print?Run code in your head, which is most of debugging.10 MIN
- What does this print? On your ownEight longer programs, each hiding a classic trap.12 MIN
- Mini project: the stocktake formCount what you can, report what you can't, order boxes with a limit.45 MIN
- Module test: loops and errorsEight questions from a pool on while loops, tracebacks and try.12 MIN
PYTHON YOU'LL MEET IN THE AGENT COURSE
Comprehensions, sets, any and all, type checks, sorting, money and dates. The short forms the agent course writes without stopping to explain.
- Loops on one lineList and dict comprehensions, .items() and sum with a for inside.20 MIN
- SetsIs it one of those? One of each, and the empty set trap.15 MIN
- any and allAsk a question of a whole list, and watch out for the empty one.15 MIN
- Checking typesisinstance, the bool trap and text or JSON.20 MIN
- Sorting and max with key=Rank dicts, pick the likeliest word and break ties on purpose.20 MIN
- Rounding moneyWhy 0.1 + 0.2 is not 0.3, and how the agent course handles cents.20 MIN
- Datesfromisoformat, days between two dates, adding days and isoformat.20 MIN
- Mini project: the Monday reportReorders, late orders and risky calls, with everything from this module.45 MIN
- Module test: the agent course's PythonEight questions from a pool on the shorthand from this module.12 MIN
FROM TEXT TO A FUNCTION CALL
Store functions in a dict, read JSON, and build the tiny tool runner that sits inside any agent with tools.
- Functions in a dictLook a function up by name and call it with **.15 MIN
- Functions in a dict: on your ownGive the workshop two tools and run them by name.20 MIN
- JSON: how models send dataTurn text into dicts and back again.12 MIN
- JSON: on your ownRead a model's JSON verdict on the inbox, and answer in JSON.20 MIN
- Capstone: a tiny tool runnerWrite the piece of code every agent needs, from a description.90 MIN
- Mini project: an order email to JSONRead an order email, check it and turn it into a tool call.45 MIN
- Module test: from text to a function callEight questions from a pool on registries, JSON and the tool runner.12 MIN
FINISH LINE
One last test across the whole course. Pass it and Build Your First Agent lets you skip its entry check.
Lesson one takes 12 minutes.