
Overview. Build your own AI agent from scratch: the finished harness, running. The finished project running first, then the plan for the course, what you need, and the course code (attached here as a download).
Hands-on. What an agent harness really is: the model asks, your code acts. Practical for this section: tool_message(): run one tool call, return the tool message (any Python function usable by an AI).
Hands-on. The agent loop in 50 lines of Python, with a local model. Practical for this section: run(): loop for any model and tools, two stop rules.
Hands-on. Tools and permissions: checked calls, approvals, a locked folder. Practical for this section: decide(): first-match allow/ask/deny rules (office assistant policy).
Hands-on. Context: why agents forget, budgets, summaries, a notes file. Practical for this section: add_note() + system_with_notes() (team preferences, 200-line limit).
Hands-on. Plans, to-do lists and helper agents. Practical for this section: run_checklist(): stop at first failure (month-end checklist).
Quick note: if this course has been useful so far, an honest review helps other learners decide whether it is right for them. It takes about 10 seconds, and you can update it any time as you go further. Questions or anything unclear? Ask in the Q&A, I reply to every one.
Hands-on. Safety and evals: guardrails and 10 tests for your agent. Practical for this section: invented_numbers(): every amount in a report must come from the data.
Hands-on. The same agent with an official SDK, then ship your harness. Practical for this section: build(): OpenAI Agents SDK agent, approval on writes.
This course contains the use of artificial intelligence.
Every AI agent is a model inside a harness: the code that gives it tools, checks what it may do, decides what it sees and when it stops. In this course you write that harness yourself, in plain Python with no framework, around a local model (qwen2.5:0.5b through Ollama, about 400 MB). No API key, no card, and every file stays on your computer.
Every section ends with something you build and run on a small office folder (an expense sheet, meeting notes, a vendor log and a supplier email): the agent loop in about 50 lines; tools built from Python functions with checked arguments, approvals and a folder the agent cannot leave; context budgets, summaries and a notes file, with a measured demo of an agent forgetting; plans, to-do lists, verification and helper agents; guardrails against prompt injection, secrets and invented numbers; an eval suite of 10 tasks run 3 times per version; and the same agent rebuilt with the OpenAI Agents SDK (openai-agents 0.24.0) on the same local model.
The model is tiny on purpose. You see its real mistakes, a harness bug that overwrote the data and how it was made impossible, and an honest final scoreboard where the simplest well-tooled agent beat the version with the most features. Every output shown is from a real run on 31 October 2026; the code, logs, tests, practicals and cheat sheets are included. Narration is AI-voiced; the code, runs and results are real.
The course is 2 h 16 min of video in 8 sections. Section 1 is the overview and setup; the other sections are hands-on, and every program is run for real on screen. Each hands-on section comes with a one-page cheat sheet (PDF), a short quiz, a practical with starter and solution files and an assignment with a model answer; 5 coding exercises let you write the code yourself.