
Overview. DeskBot, the fictional support agent of a travel agency, is attacked with harmless test attacks and then run with every defence on. The plan for the course, what you need, and the course code (attached here as a download).
Hands-on. The three risky properties (outsider text, private data, outside actions), task profiles with least privilege, the 2026 OWASP Top 10 for LLM Applications applied to DeskBot, and the test set of 24 attacks and 12 normal tasks.
Hands-on. Direct attacks in chat, indirect attacks in e-mails, a customer-written help page and web pages, all against the course's own toy app with harmless payloads, measured on a real local model.
Hands-on. A rules detector and a local classifier measured for catches and false alarms, cheap evasions that beat them, and spotlighting to keep untrusted text marked as data.
Hands-on. Tool profiles, record scope, argument schemas, allowlists, an approval card for risky actions and an action budget, tested against a worst-case model that obeys every injection.
Hands-on. Secrets kept out of prompts with a vault and a canary, personal data redacted in international formats, and an output filter that stops the markdown-image leak.
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. The full attack suite on every defence configuration, the worst-case model, regressions between runs, and what the real model did with all defences on.
Hands-on. A hash-chained audit log, alerts, and a security gate with floors that fails a release when a defence is switched off.
Hands-on, offline. A risk register with owners and an appetite, evidence that runs for every control, a first sort of use cases into the EU AI Act's risk levels, a support bot's duties under a data-protection law (GDPR as the example) and a release that needs the right sign-offs. Not legal advice.
This course contains the use of artificial intelligence.
Large language model apps and agents now read e-mails, search documents, call tools and move money. This course shows you how to build them so that a fooled model cannot do harm, with every defence measured.
You work on one small, fictional app: DeskBot, the support agent of a travel agency, with bookings, a help centre, an inbox and six tools. You attack it with 24 harmless test attacks (direct, in e-mails, in a customer-written help page and in web pages) and check 12 normal tasks after every change. Then you build the defences in plain Python: a threat model with the Rule of Two and the 2026 OWASP Top 10 for LLM Applications; a rules detector and a local model classifier, measured for catches and false alarms; spotlighting; tool profiles, record scope, argument schemas, allowlists, human approval and an action budget; secrets kept out of prompts, PII redaction in international formats and an output filter for the markdown-image leak; a red-team suite with a worst-case model that obeys every injection; an audit log with alerts and a release gate; and finally the governance layer: a risk register with owners and an appetite, evidence that runs for every control, a first sort of use cases into the EU AI Act's risk levels with the European Commission's own examples, the duties of a data-protection law that touch a support bot (with the GDPR as the example), and a release that needs the right sign-offs, with every step on a hash-chained trail.
Everything runs on an ordinary laptop with a small local model through Ollama: no API key and no paid account needed. All attacks target only the course's own toy app with harmless payloads. Every number shown is from a real run on 31 October and 1 November 2026 (the governance section on 8 November 2026, offline); legal facts come only from official pages read on 8 November 2026, and the course is not legal advice; 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 25 min of video in nine sections. Section 1 is the overview and setup; sections 2 to 9 are hands-on, and every program is run for real on screen. Each section comes with a one-page cheat sheet (PDF), a short quiz, a hands-on practical with starter and solution files and an assignment with a model answer; five coding exercises and a capstone assignment let you write the code yourself.