This starts chapter B1. Its course guide is B1 in the Function B course guide →
Not recorded yet. The lesson below is complete and runnable today — the video is added later without touching this page.
recordings/B1.0.mp4Place the six functions of the commons on one diagram and find where your own work sits.
This is a reading lesson — diagrams and prose, and no skill of its own to run. The ways to do it at the foot of the page still apply: they fetch the code as it stands here and show what changed, which needs no model.
Two teams argue for an hour about whether an agent is safe, and discover at the end that one of them meant the model and the other meant the loop calling the tools. Neither was wrong. They were describing different components of a system nobody had drawn.
What it covers. Place the six functions of the commons on one diagram and find where your own work sits.
Why a security engineer needs it. Without a shared architecture, "secure the agent" has no referent, and every control argument is really an argument about two different systems. The control it builds is: one picture, three chapters: the architecture and its risks, then identity and ingress, then runtime and the gateway.
This is an orientation lesson. It has no code — it exists so the chapters after it are read in the right order.
"Secure the agent" has no referent until the system is drawn, so every control argument is really an argument about the picture.
Read the three chapters in order: the architecture and its risks, then identity and ingress, then runtime and the gateway.
Nothing yet, honestly. This chapter produces the component map every later count in the commons is taken against.
Measure this
| what to measure | denominator or target |
|---|---|
| nothing is computed here | the chapter produces the component map every later count is taken against |
THE AGENT AS YOUR INSTRUMENT THE AGENT AS WHAT YOU PROTECT
you ---> agent ---> the the ---> agent <--- attacker
business
the same system, two directions of concern - and Function B works at
the architecture layer, where both of them land on one component map:
[ chapter 1 ] [ chapter 2 ] [ chapter 3 ]
the picture --> securing it: --> securing it:
and its risks identity and runtime and
ingress the gateway
everything downstream (B, C, D, E) names a component from chapter 1CyberTravels is a company that does not exist, and it is the most important thing in this commons. It is a corporate travel business: it books flights and hotels for other companies' staff, takes payments, issues refunds, and keeps customer profiles. Ordinary. Then it shipped an agentic platform, and became the one system this entire curriculum is taught on.
Every lesson in all six functions is grounded in it. Not illustrated with — grounded in. When Function B names a component, it is a CyberTravels component. When Function D attacks something, it attacks CyberTravels. When Function E writes a detection, it writes it against CyberTravels' telemetry, and when Function F counts a control, it counts CyberTravels' controls.
That is a deliberate cost. Any given lesson could find a sharper example of its own idea somewhere else, and several would. What you get instead is accumulation: the refund limit an attacker walks past in B1.2 is the same refund limit a detection watches for in Function E and a report counts in Function F. By the fourth function you are not learning a fourth example — you are watching a system you already understand fail in a new way.
The alternative is what most security material does: a fresh example per topic, so the reader holds a hundred unrelated systems and never builds a model of any of them. One system, followed all the way through, is worth more than a hundred sharp illustrations.
Where it comes from. The narrative, the six risk families and the twelve-row register are adapted from Agentic AI is rising fast — but the attack surface is exploding (May 2025). The architecture below, the mapping onto lessons, the controls and all of the code are this commons'.
So: meet the company.
---
Meet CyberTravels. It sells corporate travel, and last quarter it shipped an agentic platform that plans and manages a whole trip through a conversation. Alex is the product engineer who built it.
CyberTravels is four agents, not one:
Most of them reach their tools through MCP servers — one internal, one from a third party. Some call APIs directly, with no MCP in the path at all. They send each other messages. And when Alex runs CyberTravels locally to debug it, it reads his laptop's filesystem over standard I/O.
Every one of those sentences is a design decision, and every one of them is also an attack surface. That is the whole subject of this commons, and CyberTravels is the one system it is taught on. You will attack CyberTravels in Function D, build the pipeline that reviews its code in Function C, detect it misbehaving in Function E, and govern it in Function F. It starts here, because none of the rest is possible until the system is drawn.
Zero trust has a one-line definition that survives contact with agents: no implicit trust from position in the network, and every request authenticated, authorised and logged at the point it is served. Applied to a user on a laptop, that means the VPN is not a permission. Applied to CyberTravels, it means four harder things.
booking.* for an hour is one injected instruction away from a refund. The grant has to be booking.create, issued for this task, expiring with it.Stated in the negative, which is how you audit it: the system prompt is not a control, the network boundary is not a control, and "the model was told not to" is not a control. Each of those has to be replaced by something that holds when the model does the wrong thing, because sooner or later it will.
Function B is built out of two kinds of lesson, and the split is deliberate.
A risk lesson shows a failure happening, before anything tries to stop it. It names the component of CyberTravels it attacks and produces the evidence — so the control that follows is answering something you have already watched go wrong, rather than a hazard somebody asserted.
A control lesson builds the mechanism, then breaks it, so you can see what the control is actually load-bearing for. A control whose limits you cannot state is one you will over-trust.
One warning about the shape of this function, and it is the reason B1.19 exists. The agentic risks are the new ones, not the only ones. CyberTravels still has to scan its dependencies, segregate production from everything else, encrypt at rest and in transit, manage credentials and keys, validate input and log what happened. An agent platform built on an estate that has not done those is not an agentic security problem; it is an ordinary one wearing a new hat.
The CyberTravels narrative, the six risk families and the twelve-row register used throughout this commons are adapted from Agentic AI is rising fast — but the attack surface is exploding (May 2025). The mapping onto lessons, the controls and all of the code are this commons'.
| the rule | what it means for CyberTravels | where it is built |
|---|---|---|
| Identity is per workload | Each of the four agents gets its own attested identity. A shared service account means you cannot say which agent acted, and cannot revoke one without breaking all four. | B2.1 · B2.2 · B2.5 |
| Authority is per call | booking.create issued for this task and expiring with it, never booking.* held for the session. This is what stops an injected instruction reaching the refund endpoint. | B2.3 · B2.4 |
| Instructions are data until proven otherwise | The operator prompt, the traveller's message and a retrieved document arrive as the same kind of token. Provenance at ingress is what stops the third one selecting a tool. | B2.6 · B3.1 |
| The decision is adjudicated outside the agent | A model asked to enforce its own policy is both subject and guard. Default-deny sits at the gateway in front of the tool call, with the sandbox and egress control behind it. | B3.1 · B3.2 · B3.3 |
| agent | what it does | what it can reach |
|---|---|---|
| Workflow Agent | executes business workflows — flights, hotels, payments, refunds — through an MCP server with tool orchestration | flights · hotels · payments and refunds · CRM |
| RAG Travel Advisor | recommends itineraries from curated travel templates indexed in a vector store, sorted by destination and package | the vector store — and whatever else was ingested into it |
| Coding Agent | writes code, patches libraries, tests features in lower environments and generates unit tests | the repository, and the CI runner that builds it |
| File System Agent | parses vendor and customer PDFs and images with OCR plus an LLM, then updates backend APIs and validates invoice data | uploaded files, backend APIs, and Alex's laptop when run locally |
Function A built the system. The five after it take that same system and ask a different question of it.
| function | the question it asks of CyberTravels | what it produces |
|---|---|---|
| A | how is it built, and what did I just ship | a running agentic platform on your own machine |
| B | what can go wrong here, and what closes it | an architecture and its controls |
| C | how do we review its code, at its speed | a pipeline, and a harness that scores it |
| D | can we break it before somebody else does | findings you generated yourself |
| E | would we see it happening, and could we stop it | detections, runbooks and a root cause |
| F | who signed off, and can they still evidence it | indicators an auditor can re-compute |
Not a claim about tidiness. It is why the map has to come first: every later function names a component of CyberTravels from it.
| chapter | what it covers | kind of lesson |
|---|---|---|
| B1 | the architecture, every risk it carries, and the two indexes that close it | risk |
| B2 | securing it — identity and ingress | control |
| B3 | securing it — runtime and the gateway | control |
Three ways to do this lesson. Pick one. They run the same procedure against the same code — what changes is who drives it, and how much you see.
The agent reads the lesson, explains the idea, fetches the code, runs the check and answers your questions as you go. This is the one to take if you are here to learn.
Install it, once. From the folder you cloned. --all does every agent it finds on your machine:
python3 scripts/install_skills.py --all --lessons B1.0Then restart your agent and open it in that folder. On Windows, if python3 says Python was not found, use python instead.
Then pick b1-0-start-here:
| agent | install just for this agent | start it |
|---|---|---|
| Claude Code | python3 scripts/install_skills.py --tool claude --lessons B1.0 | type /b1-0-start-here |
| GitHub Copilot (VS Code) | python3 scripts/install_skills.py --tool copilot --lessons B1.0 | type /b1-0-start-here in Chat |
| Cursor | python3 scripts/install_skills.py --tool cursor --lessons B1.0 | type / in Agent chat and search for it |
| Codex | python3 scripts/install_skills.py --tool agents --lessons B1.0 | type $b1-0-start-here, or run /skills |
No agent, no conversation. The same lesson executes and prints the same readback. Take this one if you have no assistant, if you are reviewing rather than learning, or if you want the result without the teaching around it.
python3 scripts/lesson.py B1.0Neither of the above, and no model needed. The first command writes CyberTravels exactly as it stood at the end of this lesson; the second prints the diff — the lines this lesson added or changed, and nothing from any later one.
python3 scripts/checkpoint.py --at B1.0 --out work/cybertravels
python3 scripts/checkpoint.py --at B1.0 --diffOn Windows, type python wherever these say python3 — and use \ instead of / in the paths. Everything else is identical. A0.0 step 2 explains why.
Ways 1 and 2 need a model; way 3 does not. A signed-in Claude Code CLI needs no API key, and any OpenAI-compatible endpoint works too. With neither, the audit exits 2 and says so rather than inventing an answer. A0.0 sets this up.
Ways 1 and 2 both end with the same readback: What I did, What changed, The number and Read this next. A step that was skipped or refused is reported as exactly that, never as a pass.
If you did the last lesson’s challenge, expect this to stop. Most challenges ask you to edit the code, and ways 1 and 2 will not overwrite your edits: you get stopped, not a failure, with two options — --out for a fresh folder that keeps your work, or --force to discard it and start this lesson clean.
Draw your own CyberTravels before the next lesson — the agents you run, the MCP servers and APIs they reach, and which of them can move money or ship code. B1.1 gives you the standard names for the boxes; comparing your drawing to it is the fastest way to find the component you forgot you had.
Skill source: skills/