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

Installing the toolkit, and the name it imports under

One pip command, and then a surprise about what to import. This lesson installs the stack and finds out what is actually in it.

The toolkit is published by Microsoft on PyPI under the MIT licence. The base package is an installer and a handful of static checks; the runtime governance lives in companion distributions that come in through an extra.

bash
pip install "agent-governance-toolkit[full]==4.1.0"

Pin the version. This is a public preview and the APIs move between releases; every output in this course came from 4.1.0.

The name it imports under

The obvious import does not work, and the error says nothing useful about why.

Example
try:
    import agent_governance_toolkit
except ModuleNotFoundError as exc:
    print("no:", exc)

import agent_compliance
print("yes:", agent_compliance.__name__)

The distribution is called agent-governance-toolkit but the module it installs is agent_compliance. The package was published as ai-agent-compliance before it was renamed, and the import name never followed.

A version constant kept the old name too. agent_compliance.__version__ reports 3.2.2 on the 4.1.0 release, so never use it to decide what your code can rely on. pip show agent-governance-toolkit tells the truth.

What the extra brought in

The [full] extra pulls three more distributions. The runtime governance this course is about lives in the core one, under names of its own.

Example
import agent_control_plane, agent_os, agentmesh, agent_sandbox

for module in (agent_control_plane, agent_os, agentmesh, agent_sandbox):
    print(module.__name__)

agent_control_plane holds the kernel and the policy engine and is where this course spends most of its time. agent_os carries the declarative policy files of part 3. agentmesh is identity, and agent_sandbox is execution isolation.

Importing agent_os prints a deprecation warning telling you to use agent-governance-toolkit-core. That is the distribution name you already installed, and the module keeps working; it is the package consolidation talking, not a broken install.

DistributionModuleWhat is in it
agent-governance-toolkitagent_complianceInstaller, linting, supply chain checks
agent-governance-toolkit-coreagent_control_planeThe kernel and the policy engine
agent-governance-toolkit-coreagent_osDeclarative policy files
agent-governance-toolkit-coreagentmeshIdentity, trust and delegation
agent-governance-toolkit-cliagent_sandboxSandbox providers
Try it yourself
  • Run pip show agent-governance-toolkit and compare the version with agent_compliance.__version__.
  • Import agent_os on its own and read the deprecation warning in full.
  • Try import agent_control_specification, which is the newest policy layer and is not in the pip install at all. Lesson 29 says what it needs.

Slow is fine. Stopping is the only problem.