Free lesson · Course 4

An agent that asks when it could leak.

Lesson 3.1 of AI Security Engineering, exactly as students get it: the screencast, the written lesson and the full code. No sign-up.

4 min 51 s · captions in the video, transcript below the lesson · narrated by an AI version of Charafeddine's voice, from his script.

Course 4 of 6 in the Engineering Series, which builds one AI platform in Python for Larkfield Supply, a fictional company. In the lesson, E1 to E6 are the six courses; you can skip mentions of other lessons on a first read. Reading needs no setup. To run the code, you need the course repository (tag e4-m3-l1) and the earlier lessons.

You'll leave with a harness that counts, on every turn, which of the three dangerous properties the person's tools give the agent, and sends every write and send to a person when all three are present, the harness's own notes_add included.

In one screen

  • Use it on Monday: On every agent turn, check three things: untrusted input, sensitive data, and the power to write or send. When all three meet, a person approves the writes and sends.
  • The picture: Every turn, the harness counts three legs (untrusted input, sensitive data, changes or sends) from what the person's tools declare, notes_add included; with all three, every write and send waits for a person.
  • The decision: A turn with all three legs still runs, its writes and sends raised to the person's approval. Refuse it only for agents that don't need all three, and split their work so each holds two.
  • You'll run: uv run python -m aip.security.admission support: sarah legs=ABC, with her draft, carrier lookup and notes raised to her approval, and tom legs=A-C, running as resolved.

Why this matters

Simon Willison named the lethal trifecta on 16 June 2025: private data, exposure to untrusted content, and a way to communicate externally. An agent that holds all three can be made to leak. Meta generalized it as the Agents Rule of Two: within a session an agent should hold no more than two of [A] processing untrustworthy inputs, [B] access to sensitive systems or private data, [C] changing state or communicating externally (31 October 2025). Sarah's support agent at Larkfield Supply (the fictional company this series builds for) holds all three. Sarah is a support lead. Her job needs all three. So the question becomes who decides, and where.

The idea

Course 3 (E3) already built a taint gate, which does half of this: once untrusted text is in the context, a write or send waits for the person (E3 lesson 4.2). That's a rule about what the context holds at that point. It reacts.

The Rule of Two, in one line: a turn may hold any two of the three properties on its own, and never all three without a person. It's a rule about what the turn could do. It looks at the tools this person was granted for this turn, plus the tools the harness adds itself, and asks three questions:

[A] untrusted input     any tool whose output isn't trusted, or any sub-agent
[B] sensitive data      any tool declared sensitive
[C] changes or sends    any tool whose effect is write or send

two or fewer   ->  the turn runs as resolved
all three      ->  every write and send needs at least "self"

Meta's own escape hatch for an [ABC] agent is a human, or another reliable validation. We already have the human: E3's approvals, where a held call waits as a proposal until the person (self) or a second person (four_eyes) approves it. So admission doesn't refuse Sarah's turn. It raises approvals, and never lowers them.

Why compute it from grants and not from what happened? Because Sarah's turn holds all three before it reads anything. If the model drafts a reply on a clean context, the taint gate lets it through. With admission, it waits for her. That's the test I care about most in this lesson, and decision record 0402 in docs/decisions/ names it.

Why does it go in the harness and not the API? Because the harness is where every turn passes: a person's turn, a sub-agent's turn, a turn resumed after a crash. A check in the API layer would miss two of those three.

Build it

We'll write the rule down next to the code, count a turn's legs from what it's granted, then put admission in the loop and see it decide for three people.

git checkout e4-m3-l1 && uv sync --all-extras

Every run here uses a scripted model, no key and no network. The pinned versions and the files this tag changes are in Going deeper.

Step 1: Write the rule down where the code is

The docstring carries Meta's wording. The next person to touch this file should read the source, not my paraphrase.

From src/aip/security/admission.py:

"""The Rule of Two as an admission rule, checked on every resolved turn.

Meta, "Agents Rule of Two" (31 Oct 2025): within a session an agent should satisfy no
more than two of
  [A] it can process untrustworthy inputs
  [B] it can access sensitive systems or private data
  [C] it can change state or communicate externally
If a turn needs all three, it does not run autonomously: every [C] tool needs a human.

    uv run python -m aip.security.admission support    # the legs, per persona
"""

Step 2: Legs, and what admission returns

From src/aip/security/admission.py:

@dataclass(frozen=True)
class Legs:
    untrusted_input: bool   # [A]
    sensitive_data: bool    # [B]
    external_action: bool   # [C]

    def __str__(self) -> str:
        return "".join(x if on else "-" for x, on in zip("ABC", (
            self.untrusted_input, self.sensitive_data, self.external_action)))

@dataclass(frozen=True)
class Admission:
    resolved: ResolvedAgent         # what runs: approvals possibly raised
    legs: Legs
    raised: tuple[str, ...] = ()    # tools that now need a person

Legs prints as ABC or A-C, so a trace or a log line shows the shape of a turn at a glance. Admission returns a new ResolvedAgent, never a mutated one: the rights resolved in E3 (which tools this person may use, at which approval level, worked out per person and per turn) stay what they were, and what runs is a copy with stricter approvals. raised lists the tools admission changed.

Step 3: Count the legs from the declarations

From src/aip/security/admission.py:

def legs_of(resolved: ResolvedAgent, registry: Registry,
            harness_tools: Iterable[Tool] = ()) -> Legs:
    tools = [*(t for n in resolved.tools if (t := registry.get(n))), *harness_tools]
    return Legs(
        # A sub-agent's result carries whatever it read: count it as untrusted.
        untrusted_input=any(not t.trusted_output for t in tools) or bool(resolved.subagents),
        sensitive_data=any(t.sensitive for t in tools),
        external_action=any(t.effect in ("write", "send") for t in tools))

No new configuration. All three legs come from what tools already declare since E3 lesson 4.1: effect (read, write or send), sensitive (it touches private data) and trusted_output (its output is safe to treat as trusted). A new security rule is eight lines because the facts were already there.

Two lines to argue about. The sub-agent line: a read-only sub-agent can't write or send, but its result carries whatever it read. E3 lesson 4.2 made its result tainted in the parent. Here, holding a sub-agent counts as leg [A] even if every tool the parent holds is trusted.

And harness_tools. The registry holds Larkfield's tools. The harness adds one of its own on every top-level turn: notes_add, which writes a note every later call in the conversation will see. It's a write. A tool the rule can't see is a leg it can't count. So the harness hands its own tools in, and they're counted like any other.

Step 4: Admit: raise, never lower

From src/aip/security/admission.py:

def admit(resolved: ResolvedAgent, registry: Registry,
          harness_tools: Iterable[Tool] = ()) -> Admission:
    """At most two legs without a human. With all three, every write and send waits for one.
    harness_tools: the tools the harness adds itself (notes_add), counted like any other."""
    extra = {t.name: t for t in harness_tools}
    legs = legs_of(resolved, registry, extra.values())
    if not (legs.untrusted_input and legs.sensitive_data and legs.external_action):
        return Admission(resolved, legs)
    approvals, raised = dict(resolved.approvals), []
    for name in sorted({*resolved.tools, *extra}):
        tool = extra.get(name) or registry.get(name)
        if tool and tool.effect in ("write", "send"):
            level = stricter(approvals.get(name, tool.approval), "self")
            if level != approvals.get(name, tool.approval):
                raised.append(name)
            approvals[name] = level
    return Admission(replace(resolved, approvals=approvals), legs, tuple(raised))

stricter is E3's function from src/aip/rights/floors.py: it takes the higher of two levels on the ladder none < self < four_eyes. So a refund at four_eyes stays at four_eyes, and a draft at none goes to self. The rule can only add a person.

From the ground. The legs tell you when a person must look. They don't tell you how hard. For that I use one question per tool, before it ever joins an agent: if this call is wrong, can we take it back? My working rule for risk is probability times impact times reversibility (E2 lesson 1.1, the evals course's opening lesson). Admission handles the first factor through grants. The approval floor is where the other two live. A draft that nobody sent can be deleted, so self is enough. A message that reached a customer, or an order id that reached a carrier, can't be called back. So write one line next to every tool you register: how we undo it, or "we can't". Where the answer is "we can't", give the tool a person whatever the legs say. The one I remember: an agent updating a database that mattered for compliance at a very large, heavily regulated company. Its rights weren't configured properly, and it broke the database. It had also changed the backup configuration, so restoring was hard, and for a while nobody could say what the true state was. It wasn't strictly irreversible, but the only way back was painful manual reconstruction.

Step 5: Into the loop, every turn

ResolvedAgent, in the code above and below, is what E3's rights resolution produces for one person and one turn: the agent's tools, their approval levels, and via, the chain of parent agents (empty unless this is a sub-agent's turn).

The field first: TurnResult, what run_turn returns, gains one line. From src/aip/harness/loop.py:

    legs: str = ""              # E4: the Rule of Two legs this turn held, e.g. "ABC"

Then a method on the harness, so later lessons can see it in one place. From src/aip/harness/loop.py:

    def admit(self, resolved: ResolvedAgent, harness_tools: dict[str, Tool]
              ) -> tuple[ResolvedAgent, str]:
        a = admit(resolved, self.registry, harness_tools.values())
        return a.resolved, str(a.legs)

And the call. Three names you haven't seen: self.journal is the harness's store of conversations and turns, resolved.subject is the person's id, and resolved.via is non-empty only for a sub-agent. From src/aip/harness/loop.py:

        if self.journal.owner(conversation_id) not in (None, resolved.subject):
            raise NotFoundError("conversation")       # someone else's looks like no one's
        notes = {} if resolved.via else {             # a sub-agent's context is fresh: no notes
            "notes_add": notes_tool(self.journal, conversation_id)}
        resolved, result.legs = self.admit(resolved, notes)   # E4: the Rule of Two, every turn
        turn_id = self.journal.begin(conversation_id, resolved.subject,
                                     resolved.principal.groups, resolved.name, message, turn_id)
        self.record("turn.run", resolved, f"conversation:{conversation_id}",
                    {"turn": turn_id, "message": message, "tools": sorted(resolved.tools)})
        history = self.journal.history(conversation_id)
        history.append(Item({"role": "user", "content": message}))
        tools, skills_index = self.turn_tools(resolved)
        tools = dict(sorted({**tools, **notes}.items()))

The order is the point. In E3 the notes tool was added after the tools were listed, so nothing before that line knew it existed. Here it's built first, admitted with everything else, then added to the turn's tools. Admission runs after the ownership check and before the journal records the turn. From here on, resolved is the admitted one: the taint gate, the approvals store and the audit trail all see the raised levels.

Step 6: See the legs, per person

uv run python -m aip.security.admission support
sarah  legs=ABC  all three: raised to a person's approval: notes_add, replies_draft, shipments_lookup
tom    legs=A-C  two or fewer: runs as resolved
dana   legs=ABC  all three: raised to a person's approval: notes_add
lee    not found

The command counts notes_add the way the harness does. Tom is a support agent: tickets, drafts and the carrier lookup, no invoices. Two legs, so his drafts on a clean context still run. That's the utility (whether the task still gets done) the rule is meant to keep. Sarah is a support lead: she also holds invoices and refunds, so [B] lights up. Her draft is raised to self, and so is shipments_lookup. The carrier lookup is a send: the order id leaves Larkfield (E3 lesson 4.1). With all three legs, it waits for her. Lee, the contractor, isn't granted the support agent at all. Dana's [A] is deliberate; Going deeper says why.

Step 7: The test that justifies the rule

Same scripted model for Tom and Sarah: look up a shipment, draft a reply. Nothing untrusted is read. The three helpers the script uses are described in Going deeper.

uv run python - <<'EOF'
from aip.harness import Harness
from aip.harness.model import ScriptedModel, call, say
from aip.identity.principal import persona
from aip.rights import resolve
from aip.rights.declaration import load_agent
from aip.tools import Registry
from aip.tools.larkfield import Ops, build_tools

for who in ("tom", "sarah"):
    plan = [call("shipments_lookup", order_id="SO-7790"),
            call("replies_draft", ticket_id="T-1039", body="On its way."), say("Done.")]
    ops = Ops()
    h = Harness(ScriptedModel(lambda m, t: plan.pop(0)), Registry(build_tools(ops)))
    me = resolve(load_agent("support"), persona(who), h.registry)
    r = h.run_turn(me, "c1", "Where is SO-7790? Draft a reply for T-1039.")
    held = {e.data["name"]: e.data["approval"] for e in r.events if e.type == "held"}
    print(f"{who:<6} legs={r.legs}  held={held}  effects={len(ops.effects)}")
EOF
tom    legs=A-C  held={}  effects=1
sarah  legs=ABC  held={'shipments_lookup': 'self', 'replies_draft': 'self'}  effects=0

Tom's lookup and draft run; the one effect is his draft, since the lookup changes nothing in Larkfield. Sarah's both wait for her. That's test_admission_holds_a_write_even_before_anything_untrusted_was_read, and four more:

uv run pytest -q tests/unit/test_admission.py
5 passed in 3.75s

Your turn (15 min)

Step 3 says holding a sub-agent counts as leg [A] even when every tool is trusted. Nothing tests that yet with a parent's tools. Write one test at the end of tests/unit/test_admission.py, in the style of the others: take Tom's support agent, keep only shipments_lookup (a send that declares trusted_output), and assert the legs are A-C; then remove his sub-agents too and assert --C. replace from dataclasses and legs_of are already imported. Check: uv run pytest -q tests/unit/test_admission.py should print 6 passed. To see it bite, delete or bool(resolved.subagents) from legs_of and run again: only your test fails. Put the line back. Solution in Check yourself.

What breaks

  • Approval fatigue. Raising every [ABC] write and send to self means more clicks for Sarah. If she approves everything without reading, the rule is theater. "Always allow" did exactly that in the GitHub MCP (Model Context Protocol) case (lesson 2.3). Keep approvals rare by keeping legs off: give Tom's role no invoices, split read-heavy work into a two-leg agent.
  • A tool the rule can't see. A tool that reaches the turn without passing through admission makes the legs wrong. Step 5 closes it for notes_add; lesson 4.1 applies the same idea to MCP tools: one way into the registry.
  • Legs are computed from grants, not from what the model will do. That's the point, and also the cost: a person with one rarely used sensitive tool pays for it on every turn, and loses the notes tool in that agent. The fix is the rights model (narrower grants), not a smarter admission rule.

Decide

What does an [ABC] turn do? Default: run, with every write and send raised to at least the requester's approval, decided in the harness on every turn, harness tools counted. The alternative, refusing [ABC] turns outright, fits agents that don't need all three; then split the work so each agent holds two legs (a reader that can't send, a sender that never reads untrusted text). Meta itself says the rule "should not be viewed as a finish line". Lessons 3.2 and 3.3 add what it doesn't cover: what untrusted text can steer, and what leaves through the answer.

Check yourself

  1. Tom's turn is A-C. Can an injected ticket make him send anything without a person? No. Once he reads the ticket, the taint gate raises any write or send to self, his carrier lookup included, and replies_send isn't granted to his role. Admission adds nothing for Tom; taint does the work.
  2. Why does admission run in run_turn and not in the API handler? Sub-agent turns and resumed turns never pass through the API handler. The harness is where every turn passes.
  3. Sarah's carrier lookup changes nothing in Larkfield's systems. Why does it wait for her? Because it's a send: the order id leaves Larkfield. Effects say where the data goes, not what it changes.
  4. Why does admit take harness_tools? The harness adds notes_add, a write, that isn't in the registry. Without it, a reader of tickets and invoices looks like two legs and its notes go in unchecked.
  5. Your turn. One way to write it:

    def test_a_subagent_is_leg_a_even_when_every_tool_is_trusted():
        _, registry, decl = setup()
        tom = resolve(decl, persona("tom"), registry)
        lookup_only = replace(tom, tools=frozenset({"shipments_lookup"}))  # a trusted send
        assert str(legs_of(lookup_only, registry)) == "A-C"     # Tom still holds ticket-reader
        assert str(legs_of(replace(lookup_only, subagents=frozenset()), registry)) == "--C"
    

    Tom's roles grant the ticket-reader sub-agent, so resolved.subagents isn't empty, and that alone lights [A]. With the sub-agent line removed from legs_of, the first assert sees --C and fails, and the five original tests still pass: none of them covered this line.

Transcript

Module three, and we start containing what an agent can do. Today the lethal trifecta becomes an admission rule: you'll count the legs of a turn, and raise approvals when a turn holds all three. All right, Willison's lethal trifecta: private data, untrusted content, and a way out. If you hold all three, you can be made to leak. Meta turned it into the Rule of Two: no more than two of untrusted input, sensitive data, and changing state or talking to the outside.

Now, Sarah's support agent holds all three, and her job needs all three. So she'll break the rule, and what matters is who decides when she does, and where. By the way, every run in this lesson uses a scripted model, no live key. So we start with three booleans, printed as A, B, C or a dash, so a log line shows you the shape of a turn.

Admission hands back a copy of the resolved rights, with stricter approvals. The rights E3 resolved stay what they were. And it lists what it raised. Now, there's no new configuration here. Every leg comes from what tools have declared since E3: effect, sensitive, trusted output. And there are two lines worth arguing about. First, holding a sub-agent counts as untrusted input, because its result carries whatever it read.

Second, harness tools. The harness adds a tool of its own on every turn, the notes tool, and it's a write. A rule that only counts the registry never sees it, right? And a tool the rule can't see is a leg it can't count. So the harness hands its tools in. With fewer than three legs, nothing changes. With all three, every write and send goes to at least "self".

Stricter takes the higher level, so a refund at four eyes stays at four eyes. So why self, and why not four eyes? Well, the poison is in the data, and Sarah is on our side. Her eyes on the real arguments are enough for a draft, and money already needs a second person. All right, into the loop. A field on the turn result, a small method on the harness, and the call in run turn.

And the order is the point here. The notes tool is built first, admitted with everything else, then added to the turn. Admission runs right after the ownership check, so everything after it sees the raised levels. And run turn is where sub-agent turns and resumed turns pass too. If you put the check in the API, you'd miss both. Let's look at the legs, per person.

Tom holds tickets, drafts and the carrier lookup. That's two legs, so his work on a clean context still runs, and that's the utility the rule keeps. Sarah also holds invoices and refunds. Her draft is raised, and so is her carrier lookup: it sends the order id outside Larkfield, so it's a send. And the notes tool gets raised wherever all three legs are held.

Lee isn't granted this agent at all. Now, Dana shows untrusted input without reading a ticket, because the refund tool doesn't declare its output trusted. That's conservative, on purpose. So, same scripted model for both: look up a shipment, draft a reply. Nothing untrusted gets read. The taint gate from E3 sees a clean context, and it would let both through.

Admission, though, looks at what the turn could do. Tom's lookup and draft run, and the one effect is his draft. Sarah's, both of them wait for her. And Sarah's Tuesday from E3 moved. Two carrier lookups that used to run at once now wait for her click. That's the utility price of the rule, and honestly, I'd rather state it in a test than discover it in a complaint.

Five tests. One gives Sarah only tickets and invoices, so two legs. The notes tool makes it three, and the note isn't written. And the threat model from lesson one point three noticed: forty-four open items, down from forty-six. Now, what does it cost? More approvals means more clicks, and an approval clicked without reading is theater. So keep legs off where you can: Tom doesn't need invoices, you know.

Next up, lesson three point two: a design where the ticket can't steer the plan at all. See you there.

Going deeper

E4's four changes to the harness

This is the first of four changes E4 makes to E3's harness (the loop that runs every agent turn: the model call, the tool calls, the approvals and the audit trail), and each has a decision record: admission (0402), safe output (0404, lesson 3.3), skill hash verification (0407, lesson 4.3), and delegated tokens on every call to a tool served elsewhere (0405 and 0406, lessons 4.1 and 4.2). They aren't refactors. They're security controls placed where nothing can go around them.

Setup: what this tag changes

Pinned for this lesson: Python 3.12, pytest 9.2.0 (docs/VERSIONS.md, read 12 Nov 2026). No service to recreate: one new file and a change to the loop.

git diff --stat=72 e4-m1-l3..e4-m3-l1 -- src agents data:

 src/aip/harness/loop.py       | 14 +++--
 src/aip/security/admission.py | 97 +++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 3 deletions(-)

Step 4: why self, and how hard a person must look

Why self and not four_eyes? Sarah isn't the attacker. Lesson 2.1: the user is legitimate, the poison is in the data. Her eyes on the exact arguments are enough for a draft. Money already needs four eyes (a second person who holds the right confirms the call), by the tool's own floor.

Step 5: a raised notes_add

What happens to a raised notes_add? Nobody can approve it later: it's the harness's tool, not a proposal in someone's inbox. E3's hold (the harness step that turns a call needing approval into a proposal) already handles that case (decision record 0303 in docs/decisions/): the note isn't written and the model reads not run: notes_add needs approval (self) here and cannot wait for it. Tell the person instead. The agent says it in the answer, and the person decides.

Step 6: why Dana shows [A], and the finance agent

Dana is in finance and approves refunds. She holds invoices_read and refunds_issue, nothing that reads tickets. Yet she shows [A], and that's deliberate. refunds_issue doesn't declare trusted_output=True, so its own output counts as untrusted. That's conservative, and I'm keeping it: the default for any tool nobody thought about is "untrusted". It costs her one thing: in this agent, the notes tool is off.

uv run python -m aip.security.admission finance
sarah  not found
tom    not found
dana   legs=ABC  all three: raised to a person's approval: notes_add, shipments_lookup
lee    not found

The finance agent gives Dana the carrier lookup too. Same rule, same result.

Step 7: the helpers, the notes test, Sarah's Tuesday, the threat model

Three helpers set the turn up. persona("tom") returns a fictional Larkfield person (their id, groups and roles) without a sign-in token. load_agent("support") reads the support agent's declaration from agents/support/, and resolve(...) combines the two into that person's ResolvedAgent, or None if their roles grant nothing.

test_notes_add_counts_as_a_write_leg_and_waits_with_the_others takes Sarah with only tickets_read and invoices_read: two legs, AB-. The harness's notes_add adds [C]. The test asserts the turn is ABC, the note isn't written, and the model was told not run: notes_add. Without harness_tools, that turn would have looked like two legs and the note would have gone in.

Sarah's Tuesday moves too: E3's acceptance scenario, one working day of Sarah's played as a test against the whole platform. From tests/integration/test_tuesday.py:

    drafts = text[text.index("sarah> Draft replies"):text.index("sarah> Refund Brightwell")]
    # E4 3.1: Sarah's turn holds all three legs of the Rule of Two, so her sends wait for her
    # even before any ticket is read (at e3-final these two lookups ran at once).
    assert drafts.count("held      shipments_lookup self") == 2
    assert drafts.count("held      replies_draft self") == 2     # after the tickets: her eyes

That's the utility price, stated in a test. Two lookups that used to run now wait for a click. I'd rather pay it than let a lead's agent send order ids out on the model's word.

And the threat model moves: uv run aip-threats | tail -1 prints 11 threats, 44 open items (reviewed 2026-11-12). TM-01 and TM-02 each lost "control rule-of-two not in code yet".

More that breaks

  • "Session" vs turn. Meta's rule is per session; we check per turn. Taint carries [A] across turns (decision record 0303); sensitive data already in the history doesn't count as [B] in a later turn. A session-level rule would catch that; ours doesn't, because grants don't change within a Larkfield conversation. If they can in your platform, admit on the union of the conversation's grants.
Full code

Where each excerpt sits. Line numbers at e4-m3-l1 for the excerpts above:

  • Step 1, src/aip/security/admission.py: lines 1-11
  • Step 2, src/aip/security/admission.py: lines 24-39
  • Step 3, src/aip/security/admission.py: lines 42-49
  • Step 4, src/aip/security/admission.py: lines 52-68
  • Step 5, src/aip/harness/loop.py: line 39
  • Step 5, src/aip/harness/loop.py: lines 82-85
  • Step 5, src/aip/harness/loop.py: lines 115-127
  • Step 7, tests/integration/test_tuesday.py: lines 38-42
Sources
  • Meta AI, "Agents Rule of Two", practical AI agent security post, 31 Oct 2025. https://ai.meta.com/blog/practical-ai-agent-security/ (checked 12 Nov 2026)
  • Simon Willison, "The lethal trifecta for AI agents", 16 Jun 2025. https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/ (checked 12 Nov 2026)
  • Invariant Labs, GitHub MCP case ("Always allow"), 26 May 2025. https://invariantlabs.ai/blog/mcp-github-vulnerability (checked 12 Nov 2026)
  • Ken Huang, critique of the rule (approvals and forensics), secondary. https://kenhuangus.substack.com/p/the-rule-of-two-vs-reality-why-metas (checked 12 Nov 2026)
  • Reference repository ai-platform, branch series, tag e4-m3-l1; decision record 0402 in docs/decisions/.

That was one lesson of 19. The rest builds on it.

The other 18 build the rest of the containment: a threat model, plan-then-execute with a quarantined reader, a sandbox for model-written code, one egress proxy that holds the credentials, and a red-team suite that fails the build on any successful attack.

AI Security Engineering
€197
One-time · lifetime access · all future updates included.
  • 19 lessons, 7 films and 11 step-by-step screencasts
  • The course code as git bundles, labs with tests and a capstone
3 months in the Engine Room, Cohorte's community of people who put AI to work. What's inside the Engine Room
Enroll · €197
Refunds, company invoices and client use of the code: see the FAQ.

A free lesson from each courseCourse 1 · A key and a budget per agent
Course 2 · An LLM judge, checked against human labels
Course 3 · A tamper-evident audit trail for agents
Course 4 · An agent that asks when it could leak (this page)
Course 5 · Retrieval that knows who is asking
Course 6 · A model outage you've already rehearsed