agent-governance-toolkit is a free, open source compliance & risk management project written in Python and released under MIT. It has 6,278 GitHub stars, 1,120 forks and 176 open issues, and was last pushed 8 hours ago. On this registry it ranks #13 of 45 tracked projects in Compliance & Risk Management, with 5 head-to-head comparisons available. It gained 11 stars over the last 3 tracked days.

What is agent-governance-toolkit?

Agent Governance Toolkit is a Microsoft open-source Python toolkit that adds policy enforcement, zero-trust identity, execution sandboxing, and reliability engineering to autonomous AI agents, aimed at teams putting tool-using or multi-agent systems into production under compliance obligations.

What it is

Agent Governance Toolkit (AGT) is an MIT-licensed toolkit distributed from the microsoft organization, written in Python and published to PyPI as agent-governance-toolkit, with companion SDKs on npm (@microsoft/agent-governance-sdk) and NuGet (Microsoft.AgentGovernance). It ships as a public preview with production-quality releases, and the maintainers warn that breaking changes may arrive before general availability. The project is framework-agnostic by design: the README states "One pip install, any framework." Documentation is localized into Japanese, Simplified Chinese, and Korean under docs/i18n/, and the repository carries OpenSSF Scorecard and OpenSSF Best Practices badges alongside CI status.

The concrete problem is the control gap that opens once an agent is connected. OAuth scopes and IAM roles govern which services an agent can reach, not what it does after it reaches them, so an agent holding send_email and query_database should not also be able to run drop_table. Attribution is the second gap: in a multi-agent system, five agents may share a single API key, which makes "an agent did it" useless during incident response. The third gap is evidence, because auditors and regulators require tamper-evident records of every decision including the active policy, the request, and the allow-or-deny outcome. AGT replaces prompt-level safety as the control surface. The README is blunt about why: a prompt-level instruction is a polite request to a stochastic system, and OWASP LLM01:2025 states that fool-proof prompt-injection prevention methods are unclear. The published evidence supports that position, including work by Andriushchenko et al. at ICLR 2025 reporting a 100% attack success rate against GPT-4o, GPT-3.5, Claude 3, and Llama-3 on the JailbreakBench benchmark, and Microsoft's own AI Red Teaming Agent, which formalizes Attack Success Rate as the canonical metric. AGT does not attempt to win that fight inside the prompt.

Key capabilities

  • Compliance coverage for the OWASP Agentic Top 10 at 7 full and 3 partial, documented in docs/compliance/owasp-agentic-top10-architecture.md.
  • Policy enforcement that decides whether a requested action is allowed, denied, or otherwise constrained before the agent acts.
  • Zero-trust identity, so each agent carries its own verifiable identity rather than sharing a single credential across a fleet.
  • Execution sandboxing that bounds what an agent's code can touch at runtime.
  • Reliability engineering for agents, tracked against the AARM Extended (R1–R9) framework and the five elements of the Agentic Trust Framework.
  • Tamper-evident records of every governance decision, capturing the active policy, the agent's request, and the reasoning behind the outcome.
  • Multi-language distribution through PyPI, npm, and NuGet, with localized documentation in English, Japanese, Simplified Chinese, and Korean.

Who uses it and how

  • Platform teams running multi-agent systems where agents currently authenticate with one shared API key and need per-agent attribution.
  • Operators of tool-heavy agents that hold credentials for services such as send_email and query_database and must be prevented from destructive operations like drop_table.
  • Compliance and audit functions that must produce tamper-evident decision records for regulators and internal reviewers.
  • Security and red team practitioners measuring Attack Success Rate against adversarial input, since model-layer defenses are probabilistic by construction.
  • Engineering groups on any agent framework, because AGT installs as a single Python package rather than binding to one orchestration stack.

Getting started

Install the Python package with pip install agent-governance-toolkit; JavaScript and .NET teams pull @microsoft/agent-governance-sdk from npm or Microsoft.AgentGovernance from NuGet.

How it compares

No comparable governance or agent-policy tools are named in the available facts, and no set of paid products is listed as being replaced, so this project stands alone in this registry. Anyone evaluating it should treat it on its own terms rather than as a drop-in substitute for a named commercial control plane.

When to use it — and when not to

The project is in public preview and the maintainers state that breaking changes may land before general availability, while the repository currently carries 176 open issues, so teams that cannot absorb API churn should wait for a stable release or pin aggressively. It is also the wrong choice for anyone looking for a prompt-only guardrail, since AGT deliberately puts enforcement outside the prompt rather than trying to harden it. Self-hosters should expect to operate and maintain a governance layer themselves, with no hosted fallback described in the available documentation.

project readme (upstream, from github) — read inline

🌍 English | 日本語 | 简体中文 | 한국어

Agent Governance Toolkit

Agent Governance Toolkit

Ship agents to production without losing sleep

Full Documentation

🚀 Quick Start · 📋 Specifications · 📦 PyPI · 📝 Changelog

CI Discord License: MIT PyPI version npm NuGet OpenSSF Scorecard OpenSSF Best Practices OWASP Agentic Top 10 AARM Extended ATF

[!IMPORTANT] Public Preview -- production-quality public preview releases. May have breaking changes before GA.

Policy enforcement, identity, sandboxing, and SRE for autonomous AI agents. One pip install, any framework.


The Problem

Your AI agents call tools, browse the web, query databases, and delegate to other agents. Once deployed, they make decisions autonomously. You need answers to three questions:

1. Is this action allowed? An agent with access to send_email and query_database should not be able to drop_table. OAuth scopes and IAM roles control which services an agent can reach, not what it does once connected.

2. Which agent did this? In a multi-agent system, five agents might share a single API key. When something goes wrong, "an agent did it" is not an incident response.

3. Can you prove what happened? Auditors and regulators need tamper-evident records of every decision: what policy was active, what the agent requested, and why it was allowed or denied.

Prompt-level safety ("please follow the rules") is not a control surface. It is a polite request to a stochastic system. OWASP LLM01:2025 states this explicitly: "it is unclear if there are fool-proof methods of prevention for prompt injection." The published numbers back this up. Andriushchenko et al. (ICLR 2025) report 100% attack success rate on GPT-4o, GPT-3.5, Claude 3, and Llama-3 using adaptive attacks with logprob access and suffix optimization, evaluated against the JailbreakBench benchmark (Chao et al., NeurIPS 2024). Microsoft's own AI Red Teaming Agent formalizes Attack Success Rate (ASR), the rate of policy violations under adversarial input, as the canonical metric for this class of failure. Lessons from Red Teaming 100 Generative AI Products reinforces the point: "mitigations do not eliminate risk entirely" and red teaming must be a continuous process because model-layer defenses are probabilistic by construction.

AGT does not try to win that fight inside the prompt. Every tool call, message send, and delegation is intercepted in deterministic application code before the model's intent reaches the wire. Actions the AGT kernel denies are not "unlikely." They are structurally impossible. That is the difference between asking an agent to behave and making it incapable of misbehaving.


Quick Start

Prerequisites: Python 3.11+

pip install "agent-governance-toolkit[full]"

Use the [full] extra for the quick-start imports below. The base agent-governance-toolkit wheel installs the compliance CLI only; the governance modules live in the consolidated core distribution. The agentmesh quick-start import remains the current wrapper API. Importing agent_os emits a DeprecationWarning because the old agent-os-kernel distribution is deprecated. Use agent-governance-toolkit-core (or the [full] extra that includes it) as the replacement distribution. Policy-engine host code uses the ACS SDK; agt-policies provides the one-way v4-to-v5 migration command. The pre-ACS agent_os.policies rule model is gone, and BREAKING_CHANGES.md lists its replacements.

For Claude Code, add AGT as a plugin marketplace and install the governance plugin:

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

Govern any tool function in two lines:

from agentmesh.governance import govern

safe_tool = govern(my_tool, policy="policy.yaml")   # every call checked, logged, enforced

On every call, safe_tool evaluates the YAML policy, logs the decision to an audit trail, and raises GovernanceDenied when the policy blocks the action.

# policy.yaml
apiVersion: governance.toolkit/v1
name: production-policy
default_action: allow
rules:
  - name: block-destructive
    condition: "action.type in ['drop', 'delete', 'truncate']"
    action: deny
    description: "Destructive operations require human approval"

  - name: require-approval-for-send
    condition: "action.type == 'send_email'"
    action: require_approval
    approvers: ["security-team"]
>>> safe_tool(action="read", table="users")
{'table': 'users', 'rows': 42}

>>> safe_tool(action="drop", table="users")
GovernanceDenied: Action denied by policy rule 'block-destructive':
  Destructive operations require human approval

Or use the full AgentControl API for programmatic control:

AgentControl example
from agent_control_specification import AgentControl

runtime = AgentControl.from_path(str("manifest.yaml"))
result = runtime.evaluate(
    "input",
    {
        "envelope": {"agent_id": "example-agent"},
        "input": {"body": {"action": "web_search", "params": {}}},
    },
)
print(result.verdict)
runtime.close()

Run the complete ACS email-tool example.

TypeScript / .NET / Rust / Go examples

TypeScript

import { PolicyEngine } from "@microsoft/agent-governance-sdk";

const engine = new PolicyEngine([
  { action: "web_search", effect: "allow" },
  { action: "shell_exec", effect: "deny" },
]);
engine.evaluate("web_search"); // "allow"
engine.evaluate("shell_exec"); // "deny"

.NET

using AgentGovernance;
using AgentGovernance.Extensions.ModelContextProtocol;
using AgentGovernance.Policy;

var kernel = new GovernanceKernel(new GovernanceOptions
{
    PolicyPaths = new() { "policies/default.yaml" },
});
var result = kernel.EvaluateToolCall("did:mesh:agent-1", "web_search",
    new() { ["query"] = "latest AI news" });

// MCP server integration
builder.Services.AddMcpServer()
    .WithGovernance(options => options.PolicyPaths.Add("policies/mcp.yaml"));

Rust

use agent_governance::{AgentMeshClient, ClientOptions};

let client = AgentMeshClient::new("my-agent").unwrap();
let result = client.execute_with_governance("data.read", None);
assert!(result.allowed);

Go

import agentmesh "github.com/microsoft/agent-governance-toolkit/agent-governance-golang"

client, _ := agentmesh.NewClient("my-agent",
    agentmesh.WithPolicyRules([]agentmesh.PolicyRule{
        {Action: "data.read", Effect: agentmesh.A

readme truncated — read the full docs on github

Frequently asked questions

Is agent-governance-toolkit free to use?

agent-governance-toolkit is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does agent-governance-toolkit do?

AI Agent Governance Toolkit — Policy enforcement, zero-trust identity, execution sandboxing, and reliability engineering for autonomous AI agents. Covers 10/10

What is agent-governance-toolkit written in?

agent-governance-toolkit is primarily written in Python. Its source is publicly available at https://github.com/microsoft/agent-governance-toolkit, and it has 6,278 GitHub stars.