Agent Governance Toolkitagent-governance-toolkit 4.1.0 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
23 small wins to finish your pathNext lesson

What you are going to build

The Agent Governance Toolkit is the piece that sits between an agent deciding to call a tool and the tool actually running. The agent says refund this order; the toolkit decides whether that is allowed, records what happened, and either lets the call through or stops it. This course builds that for one shop agent, and every lesson runs on your machine with no API key and no cloud account.

An agent that can call tools can do damage. It can refund the wrong order, email the wrong person, or delete a record because a customer asked it nicely. Governance is the layer that makes those calls answerable to a rule instead of to a sentence the model produced.

Governance, working

Example
from agent_control_plane import AgentKernel, PolicyEngine
from pretend_agent_governance import PretendAgent, TOOLS

policy = PolicyEngine()
policy.add_constraint("support", ["lookup_order", "issue_refund"])
kernel = AgentKernel(policy_engine=policy)

agent = PretendAgent()
for message in ["Where is order A17?", "please delete order A17"]:
    tool, args = agent.decide(message)
    verdict = kernel.intercept_tool_execution("support", tool, args)
    print(tool, "->", "allowed" if verdict is None else "blocked")

The agent chose both calls on its own. The second one never ran, because delete_order is not on the list of tools this agent is allowed to use. Nothing about the agent changed to make that happen.

pretend_agent_governance is a shop agent you write in lessons 1 and 2. The Agent Governance Toolkit governs tool calls, so the course needs something making them; a forty-line router that reads a message and picks a tool is enough, and it means no part of this course needs a model.

No API key, and no Azure either

The Agent Governance Toolkit is published by Microsoft under the MIT licence. A policy engine deciding whether a call is allowed is pure logic, so the whole of it runs offline. This course was written with the network blocked to prove that.

Some of the wider stack does need more than pip: the sandbox providers want Docker or Azure, and the newest policy layer needs a Rust build and the OPA binary. Lesson 29 names those and says what each one needs.

What you will have built

PieceWhat it doesLesson
A shop agentDecides which tool to call, with no model2
The choke pointEvery tool call passes through one gate4
An allow-listEverything is denied unless named5
Policy filesRules in YAML instead of in Python10 to 14
Conditional rulesAllowed only when the context agrees15 and 16
A flight recorderA tamper-evident record of every call20 to 22
Shadow modeWatch a policy before it blocks anything23
A CI gateLint and replay policies before they ship25 and 26
A governed agentAll of it, around one support agent30 to 32
Where the course goes
The gateWriting policyProving itShipping itAgent Governance Toolkit

By lesson 32 there is a support agent whose every tool call is checked against a policy file, recorded in a log that cannot be edited without detection, and testable in CI before it ships.

Back toAll frameworks

Every expert started right here.