Microsoft open-sources agent-governance-toolkit to enforce policy on autonomous AI agents

The toolkit intercepts every tool call before execution, covers all ten OWASP Agentic risks, and works with LangChain, CrewAI, AutoGen, and other frameworks across Python, TypeScript, Go, Rust, and .N

cpaua3 min439
Microsoft open-sources agent-governance-toolkit to enforce policy on autonomous AI agents

Microsoft has released the agent-governance-toolkit as open source under the MIT license, giving developers a deterministic policy layer that sits between autonomous AI agents and the tools they invoke. Instead of relying on prompt-level instructions that research shows can be bypassed with 100% success rates on leading models, the toolkit intercepts every tool call, message send, and delegation in application code before the model's intent reaches the wire. Actions the policy engine denies become structurally impossible rather than merely unlikely.

Seven modules cover the full agent lifecycle

The toolkit ships seven composable modules. Agent OS acts as the policy engine and governance gate, evaluating each action against YAML, OPA, or Cedar rules. Agent Mesh provides zero-trust identity, discovery, and encrypted routing between agents using SPIFFE, DID, and mTLS. Agent Runtime manages dynamic execution rings for sandboxing. Agent SRE adds reliability engineering primitives such as circuit breakers and retries. Agent Compliance automates regulatory checks and emits scored evidence. Agent Marketplace governs plugin lifecycles, and Agent Lightning handles reinforcement-learning workflows. Teams can start with a single module and add layers as risk profiles grow.

Framework-agnostic with multi-language SDKs

The governance layer integrates with LangChain, CrewAI, AutoGen, OpenAI Agents SDK, Semantic Kernel, and other agent frameworks. Official SDKs are published on PyPI, npm, NuGet, and crates.io for Python, TypeScript, .NET, Rust, and Go. A single pip install "agent-governance-toolkit[full]" pulls the consolidated core distribution; the base wheel installs only the compliance CLI. The policy engine itself is a Rust core published upstream as the agent-control-spec crate, ensuring fail-closed decisions with deterministic latency.

Policy-as-code with audit trails

Policies are expressed in version-controlled YAML. A rule can allow, deny, or require human approval for specific action types — for example, blocking drop, delete, or truncate operations while routing send_email to a security-team approver. Every evaluation writes a tamper-evident decision record capturing the active policy, the requested action, and the verdict. The CLI includes agt verify for OWASP Agentic Top 10 compliance checks, agt red-team scan for prompt-injection audits against a prompt directory, and agt lint-policy for policy syntax validation in CI pipelines.

Identity and mesh networking built in

Agent Mesh assigns each agent a cryptographic identity and enforces mutual TLS on every hop. This solves the attribution problem in multi-agent systems where five agents might share a single API key. When an incident occurs, the audit log shows exactly which identity performed which action under which policy version. The mesh also handles service discovery and routing, so agents can delegate securely without hard-coded endpoints.

Quick start in two lines

tsx
from agentmesh.governance import govern

safe_tool = govern(my_tool, policy="policy.yaml")

The wrapper evaluates the policy on every call, logs the decision, and raises GovernanceDenied when a rule blocks the action. For programmatic control, the AgentControl API accepts a manifest and evaluates envelopes containing agent identity and input parameters. TypeScript, .NET, Rust, and Go examples follow the same pattern: instantiate a policy engine or client, then call evaluate or execute_with_governance with the action name and parameters.

Claude Code integration

Developers using Claude Code can add the toolkit as a plugin marketplace and install the governance plugin with two commands:

code
/plugin marketplace add microsoft/agent-governance-toolkit
/plugin install agt-governance@agent-governance-toolkit

This brings policy enforcement directly into the coding assistant workflow without leaving the terminal.

Sources

microsoft/agent-governance-toolkitgithub.com/microsoft/agent-governance-toolkit
Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.