A practical, architecture-first guide to governing AI agents from the first prototype to production. The examples focus on Microsoft Agent Governance Toolkit (AGT) / Agent Control Specification (ACS), LangGraph, MCP, and policy engines such as OPA and Cedar.
Version note: Agent frameworks and governance APIs evolve quickly. Treat code in this guide as teaching patterns, not guaranteed drop-in code for every package version. Before deploying, pin versions and check the linked official documentation for the exact API, supported adapters, and lifecycle hooks. In particular, do not assume that AGT/ACS automatically executes arbitrary OPA or Cedar policies unless the version and integration you use explicitly document that support.