Skip to content
AgenticAIWiki
  1. Learn
  2. Part 12
  3. 66. Governance and compliance
  4. 66.7

Lesson 66.7 · 7 of 7 · 8 min read · Reviewed 24 Nov 2026

Lab: a compliance checklist for an enterprise agent

By the end, you can

  • Turn governance requirements into a checklist with evidence for each item.
  • Score an enterprise agent against the checklist and list the blockers before launch.

This is a hands-on lesson. You will build a compliance checklist for an enterprise agentAgent: A system where a model decides its own next steps, calling tools in a loop until the task is done. as data, attach evidence, and write a small script that scores it and prints the blockers. The lab for this lesson runs in the Playground with plain Python; no API key needed.

The agent

Procurement assistant for a large company. Staff ask it to find suppliers, compare quotes and raise purchase orders. It reads supplier emails and attachments, searches a contracts database, and can call create_purchase_order. It is used by staff in the EU and the UK. Orders above a set amount need a manager’s approval.

Step 1. Write testable items

Bad item: “The agent is secure.” Good item: “Every create_purchase_order call is checked by a policy outside the prompt, and calls above the threshold wait for approval. Evidence: policy test results.”

Each item gets:

Field Example
id actions.approval
text Orders above the threshold need manager approval
evidence The artefact that proves it: a test, a document, a config
owner A named role, such as payments lead
blocker True if launch must wait for it

Step 2. Cover the six questions

Section Example items Links
What it is Intended use written down; owner named; risk tier assessed with legal 104.5, 104.6 Govern and Map
Data Data-flow map; retention schedule for every copy; residency of processing; ZDR terms checked 70.4, 66.2, 66.3
What it can do Least-privilege tools; approval gate on orders; spend cap; kill switch 65.5, 64.5, 72.3
What is recorded Append-only audit log of every action and denial; redacted traces 66.1, 67.3
How it is tested Eval set; injection red-team set from supplier emails; bias check on supplier ranking 65.7, 66.4
Who responds Incident runbook; on-call owner; rollback tested 72.5

The bias check here is real: if the assistant ranks suppliers, does it treat small or foreign suppliers worse for the same quote?

Step 3. Attach evidence and score

In the lab, the evidence is a dictionary from item id to a status: done, partial or missing. Your script:

  1. Counts done, partial and missing items per section.
  2. Lists every blocker that is not done.
  3. Prints a launch decision: ready only when no blocker is open.

Step 4. Read the result like a reviewer

A typical first run might print:

data          3/4 done
actions       2/4 done
BLOCKERS: actions.approval (partial), record.audit (missing)
Decision: NOT READY (2 blockers open)

That output is the conversation you want before launch: two concrete gaps, two owners, no vague debate.

Step 5. Make it repeatable

  • Store the checklist in source control next to the agent’s prompts and tool definitionsTool definition: The name, description and input schema that tell the model what a tool does and how to call it. (72.1).
  • Re-run it when the model, tools, data sources or users change.
  • Keep evidence links current; an evalEval: A repeatable test that measures how well an AI system performs on a set of cases with defined success criteria. report from last year is not evidence for this release.

What carries over

  • Frameworks such as the NIST AI RMF and laws such as the EU AI Act tell you which questions to ask. Your checklist is how your team answers them for one system.
  • The checklist is only as good as its evidence. Prefer automated checks (a test that a denied call writes an audit entry) to documents that say it does.

This lab teaches a method, not a complete legal checklist. Have your legal and security teams review the items for your situation.

Key points

  • A useful compliance checklist is a list of testable items, each with an owner and a piece of evidence, not a list of good intentions.
  • Group items by the questions reviewers ask: what the system is, what data it touches, what it can do, what is recorded, how it is tested and who responds.
  • Mark items as blockers or follow-ups so a launch decision is clear, and re-run the checklist after every major change.
Hands-on labRuns in the Playground

Score a compliance checklist for launch

Turn a governance checklist into data, score the evidence and print a clear launch decision.

You will have: A score() function that prints done counts per section, open blockers with owners, follow-ups and the decision.

Steps

  1. Run the starter: it says READY without looking at any evidence.
  2. Count done items per section.
  3. List open blockers with their status and owner, and non-blocking gaps as follow-ups.
  4. Print READY only when no blocker is open.
  5. Read the second run, where two owners add evidence, and check the decision changes.

Done when

  • The first run lists actions.approval (partial) and record.audit (missing).
  • The first decision is NOT READY with 2 blockers open.
  • The second run says READY while the three follow-ups stay listed.

Open in the Playground No API key needed.

Starter code (Python)
# Score a compliance checklist for the procurement assistant and print the launch decision.
CHECKLIST = [
    # (id, text, owner, blocker)
    ("what.use", "Intended use and users written down", "product lead", True),
    ("what.tier", "Risk tier assessed with legal", "legal counsel", True),
    ("data.flow", "Data-flow map covers every store and vendor", "platform lead", True),
    ("data.retention", "Retention schedule for every copy", "platform lead", True),
    ("data.residency", "Processing pinned to approved regions", "platform lead", True),
    ("data.zdr", "Provider retention terms checked for features used", "legal counsel", False),
    ("actions.least", "Tools limited to what the task needs", "agent lead", True),
    ("actions.approval", "Orders above the threshold need manager approval", "payments lead", True),
    ("actions.cap", "Daily spend cap enforced outside the prompt", "payments lead", True),
    ("actions.kill", "Kill switch tested in staging", "on-call lead", False),
    ("record.audit", "Append-only audit log of every action and denial", "security lead", True),
    ("record.traces", "Traces redacted before storage", "platform lead", False),
    ("test.evals", "Eval set passes the release bar", "agent lead", True),
    ("test.injection", "Injection red-team set from supplier emails", "security lead", True),
    ("test.bias", "Supplier ranking checked for size and country bias", "agent lead", False),
    ("respond.runbook", "Incident runbook with on-call owner", "on-call lead", True),
]
EVIDENCE = {  # item id -> "done" or "partial"; anything absent is missing
    "what.use": "done", "what.tier": "done",
    "data.flow": "done", "data.retention": "done", "data.residency": "done",
    "actions.least": "done", "actions.approval": "partial", "actions.cap": "done", "actions.kill": "partial",
    "record.traces": "done",
    "test.evals": "done", "test.injection": "done", "test.bias": "partial",
    "respond.runbook": "done",
}
SECTIONS = ["what", "data", "actions", "record", "test", "respond"]


def score(checklist, evidence):
    for sec in SECTIONS:
        items = [c for c in checklist if c[0].split(".")[0] == sec]
        # TODO 1: count the items in this section whose evidence is "done"
        print(f"{sec:<8} ?/{len(items)} done")
    # TODO 2: list blockers (c[3] is True) whose evidence is not "done", with status and owner
    # TODO 3: list non-blocking items that are not done as follow-ups
    # TODO 4: print "Decision: READY" only when no blocker is open, else "Decision: NOT READY (N blockers open)"
    print("Decision: READY")

score(CHECKLIST, EVIDENCE)
print("--- after the payments and security leads add their evidence")
score(CHECKLIST, {**EVIDENCE, "actions.approval": "done", "record.audit": "done"})
Show a solution
# Score a compliance checklist for the procurement assistant and print the launch decision.
CHECKLIST = [
    # (id, text, owner, blocker)
    ("what.use", "Intended use and users written down", "product lead", True),
    ("what.tier", "Risk tier assessed with legal", "legal counsel", True),
    ("data.flow", "Data-flow map covers every store and vendor", "platform lead", True),
    ("data.retention", "Retention schedule for every copy", "platform lead", True),
    ("data.residency", "Processing pinned to approved regions", "platform lead", True),
    ("data.zdr", "Provider retention terms checked for features used", "legal counsel", False),
    ("actions.least", "Tools limited to what the task needs", "agent lead", True),
    ("actions.approval", "Orders above the threshold need manager approval", "payments lead", True),
    ("actions.cap", "Daily spend cap enforced outside the prompt", "payments lead", True),
    ("actions.kill", "Kill switch tested in staging", "on-call lead", False),
    ("record.audit", "Append-only audit log of every action and denial", "security lead", True),
    ("record.traces", "Traces redacted before storage", "platform lead", False),
    ("test.evals", "Eval set passes the release bar", "agent lead", True),
    ("test.injection", "Injection red-team set from supplier emails", "security lead", True),
    ("test.bias", "Supplier ranking checked for size and country bias", "agent lead", False),
    ("respond.runbook", "Incident runbook with on-call owner", "on-call lead", True),
]
EVIDENCE = {  # item id -> "done" or "partial"; anything absent is missing
    "what.use": "done", "what.tier": "done",
    "data.flow": "done", "data.retention": "done", "data.residency": "done",
    "actions.least": "done", "actions.approval": "partial", "actions.cap": "done", "actions.kill": "partial",
    "record.traces": "done",
    "test.evals": "done", "test.injection": "done", "test.bias": "partial",
    "respond.runbook": "done",
}
SECTIONS = ["what", "data", "actions", "record", "test", "respond"]


def score(checklist, evidence):
    for sec in SECTIONS:
        items = [c for c in checklist if c[0].split(".")[0] == sec]
        done = sum(evidence.get(c[0]) == "done" for c in items)
        print(f"{sec:<8} {done}/{len(items)} done")
    open_blockers = [c for c in checklist if c[3] and evidence.get(c[0]) != "done"]
    if open_blockers:
        print("BLOCKERS: " + ", ".join(f"{c[0]} ({evidence.get(c[0], 'missing')}, owner {c[2]})" for c in open_blockers))
    follow_ups = [c[0] for c in checklist if not c[3] and evidence.get(c[0]) != "done"]
    print("follow-ups:", ", ".join(follow_ups) or "none")
    if open_blockers:
        print(f"Decision: NOT READY ({len(open_blockers)} blockers open)")
    else:
        print("Decision: READY")


score(CHECKLIST, EVIDENCE)
print("--- after the payments and security leads add their evidence")
score(CHECKLIST, {**EVIDENCE, "actions.approval": "done", "record.audit": "done"})
Quick checkA checklist item reads "The agent handles personal data responsibly." Why is it weak?
How sure are you?
Pick an answer and how sure you are

Finished the chapter? Take the chapter check.