Agent Governance Toolkit

May 9, 2026 ยท View on GitHub

๐ŸŒ English | ๆ—ฅๆœฌ่ชž | ็ฎ€ไฝ“ไธญๆ–‡ | ํ•œ๊ตญ์–ด

Agent Governance Toolkit

Agent Governance Toolkit

๐Ÿ“– Documentation Site ยท ๐Ÿš€ Quick Start ยท ๐Ÿ“ฆ PyPI ยท ๐Ÿ“ Changelog

CI License: MIT PyPI version npm NuGet GitHub stars Contributors OWASP Agentic Top 10 OpenSSF Scorecard OpenSSF Best Practices Ask DeepWiki

Important

Public Preview โ€” Microsoft-signed, production-quality releases. May have breaking changes before GA. Open a GitHub issue for feedback.

Tip

v3.5.0 is out! Latest stable release with Bedrock adapter, prompt defense improvements, and governance hardening. Changelog โ†’

Runtime governance for AI agents -- deterministic policy enforcement, zero-trust identity, execution sandboxing, and SRE for autonomous agents. Covers all 10 OWASP Agentic risks with 13,000+ tests.

Works with any stack โ€” AWS Bedrock, Google ADK, Azure AI, LangChain, CrewAI, AutoGen, OpenAI Agents, and 20+ more. Python ยท TypeScript ยท .NET ยท Rust ยท Go.


What This Is (and Isn't)

What it does: Sits between your agent framework and the actions agents take. Every tool call, resource access, and inter-agent message is evaluated against policy before execution. Deterministic โ€” not probabilistic.

What it doesn't do: This is not a prompt guardrail or content moderation tool. It governs agent actions, not LLM inputs/outputs. For model-level safety, see Azure AI Content Safety.

Agent Action โ”€โ”€โ–บ Policy Check โ”€โ”€โ–บ Allow / Deny โ”€โ”€โ–บ Audit Log    (< 0.1 ms)

Why it matters: Prompt-based safety ("please follow the rules") has a 26.67% policy violation rate in red-team testing. AGT's deterministic application-layer enforcement: 0.00%.


Get Started in 90 Seconds

# 1. Install
pip install agent-governance-toolkit[full]

# 2. Check your installation
agt doctor

# 3. Verify OWASP compliance
agt verify

# 4. Verify runtime evidence, when available
agt verify --evidence ./agt-evidence.json

# 5. Fail CI on weak runtime evidence
agt verify --evidence ./agt-evidence.json --strict

# 6. Red-team your agent's security posture
agt red-team scan ./prompts/ --min-grade B --strict

Then govern your first action:

from agent_os.policies import PolicyEvaluator, PolicyDocument, PolicyRule, PolicyCondition, PolicyAction, PolicyOperator, PolicyDefaults

evaluator = PolicyEvaluator(policies=[PolicyDocument(
    name="my-policy", version="1.0",
    defaults=PolicyDefaults(action=PolicyAction.ALLOW),
    rules=[PolicyRule(
        name="block-dangerous-tools",
        condition=PolicyCondition(field="tool_name", operator=PolicyOperator.IN, value=["execute_code", "delete_file"]),
        action=PolicyAction.DENY, priority=100,
    )],
)])

result = evaluator.evaluate({"tool_name": "web_search"})    # โœ… Allowed
result = evaluator.evaluate({"tool_name": "delete_file"})   # โŒ Blocked deterministically
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" });
// result.Allowed == true

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.Allow},
        {Action: "*", Effect: agentmesh.Deny},
    }),
)
result := client.ExecuteWithGovernance("data.read", nil)
// result.Allowed == true

Full walkthrough: quickstart.md โ€” zero to governed agents in 10 minutes with YAML policies, OPA/Rego, and Cedar support. ๐ŸŒ Also available in: ๆ—ฅๆœฌ่ชž | ็ฎ€ไฝ“ไธญๆ–‡ | ํ•œ๊ตญ์–ด]


What You Get

CapabilityWhat It DoesLinks
Policy EngineEvery action evaluated before execution โ€” sub-millisecond, deterministic. Supports YAML, OPA/Rego, and Cedar policiesAgent OS ยท Benchmarks
Contributor ReputationScreens PR/issue authors for social engineering: credential laundering, spray patterns, network coordination. Reusable GitHub Action for any repoAction ยท Scripts
Zero-Trust IdentityEd25519 + quantum-safe ML-DSA-65 credentials, trust scoring (0โ€“1000), SPIFFE/SVIDAgentMesh
Execution Sandboxing4-tier privilege rings, saga orchestration, kill switchRuntime ยท Hypervisor
Agent SRESLOs, error budgets, replay debugging, chaos engineering, circuit breakersAgent SRE
MCP Security ScannerDetect tool poisoning, typosquatting, hidden instructions in MCP definitionsMCP Scanner
Shadow AI DiscoveryFind unregistered agents across processes, configs, and reposAgent Discovery
Agent LifecycleProvisioning โ†’ credential rotation โ†’ orphan detection โ†’ decommissioningLifecycle
Governance DashboardReal-time fleet visibility โ€” health, trust, compliance, audit eventsDashboard
Unified CLIagt verify, agt red-team, agt doctor, agt lint-policy โ€” one command for everythingCLI
PromptDefense Evaluator12-vector prompt injection audit for compliance testingEvaluator

Works With Your Stack

FrameworkIntegration
Microsoft Agent FrameworkNative Middleware
Semantic KernelNative (.NET + Python)
Microsoft AutoGenAdapter
LangGraph / LangChainAdapter
CrewAIAdapter
OpenAI Agents SDKMiddleware
pi-monoTypeScript SDK Integration
Google ADKAdapter
LlamaIndexMiddleware
HaystackPipeline
DifyPlugin
Azure AI FoundryDeployment Guide

Full list: Framework Integrations ยท Quickstart Examples


OWASP Agentic Top 10 โ€” 10/10 Covered

RiskIDAGT Control
Agent Goal HijackingASI-01Policy engine blocks unauthorized goal changes
Excessive CapabilitiesASI-02Capability model enforces least-privilege
Identity & Privilege AbuseASI-03Zero-trust identity with Ed25519 + ML-DSA-65
Uncontrolled Code ExecutionASI-04Execution rings + sandboxing
Insecure Output HandlingASI-05Content policies validate all outputs
Memory PoisoningASI-06Episodic memory with integrity checks
Unsafe Inter-Agent CommsASI-07Encrypted channels + trust gates
Cascading FailuresASI-08Circuit breakers + SLO enforcement
Human-Agent Trust DeficitASI-09Full audit trails + flight recorder
Rogue AgentsASI-10Kill switch + ring isolation + anomaly detection

Full mapping: OWASP-COMPLIANCE.md ยท Regulatory alignment: EU AI Act, NIST AI RMF, Colorado AI Act


Performance

Governance adds < 0.1 ms per action โ€” roughly 10,000ร— faster than an LLM API call.

MetricLatency (p50)Throughput
Policy evaluation (1 rule)0.012 ms72K ops/sec
Policy evaluation (100 rules)0.029 ms31K ops/sec
Policy enforcement0.091 ms9.3K ops/sec
Concurrent (50 agents)โ€”35,481 ops/sec

Note: These numbers measure policy evaluation only. In distributed multi-agent deployments, add ~5โ€“50ms for cryptographic verification and mesh handshake on inter-agent messages. See Limitations โ€” Performance for full breakdown.

Full methodology: BENCHMARKS.md


Install

LanguagePackageCommand
Pythonagent-governance-toolkitpip install agent-governance-toolkit[full]
TypeScript@microsoft/agent-governance-sdknpm install @microsoft/agent-governance-sdk
.NETMicrosoft.AgentGovernancedotnet add package Microsoft.AgentGovernance
.NET MCPMicrosoft.AgentGovernance.Extensions.ModelContextProtocoldotnet add package Microsoft.AgentGovernance.Extensions.ModelContextProtocol
Rustagent-governancecargo add agent-governance
Goagent-governance-toolkitgo get github.com/microsoft/agent-governance-toolkit/agent-governance-golang

All 5 language packages implement core governance (policy, identity, trust, audit). Python has the full stack. See Language Package Matrix for detailed per-language coverage.

Individual Python packages
PackagePyPIDescription
Agent OSagent-os-kernelPolicy engine, capability model, audit logging, MCP gateway
AgentMeshagentmesh-platformZero-trust identity, trust scoring, A2A/MCP/IATP bridges
Agent Runtimeagentmesh-runtimePrivilege rings, saga orchestration, termination control
Agent SREagent-sreSLOs, error budgets, chaos engineering, circuit breakers
Agent Complianceagent-governance-toolkitOWASP verification, integrity checks, policy linting
Agent Discoveryagent-discoveryShadow AI discovery, inventory, risk scoring
Agent Hypervisoragent-hypervisorReversibility verification, execution plan validation
Agent Marketplaceagentmesh-marketplacePlugin lifecycle management
Agent Lightningagentmesh-lightningRL training governance

Documentation

Getting Started

  • Quick Start โ€” Zero to governed agents in 10 minutes
  • Tutorials โ€” 40+ numbered tutorials + 7-chapter Policy-as-Code deep dive
  • FAQ โ€” Technical Q&A for customers, partners, and evaluators

Architecture & Reference

Compliance & Deployment

Extensions


Security

This toolkit provides application-level governance (Python middleware), not OS kernel-level isolation. The policy engine and agents run in the same process โ€” the same trust boundary as every Python agent framework.

Production recommendation: Run each agent in a separate container for OS-level isolation. See Architecture โ€” Security Boundaries.

๐Ÿ“– Known Limitations & Design Boundaries โ€” what AGT does not do, honest performance numbers for distributed deployments, and the recommended layered defense architecture.

ToolCoverage
CodeQLPython + TypeScript SAST
GitleaksSecret scanning on PR/push/weekly
ClusterFuzzLite7 fuzz targets (policy, injection, MCP, sandbox, trust)
Dependabot13 ecosystems
OpenSSF ScorecardWeekly scoring + SARIF upload

Contributing

Using AGT? Add your organization to ADOPTERS.md, it helps the project gain momentum and helps others discover real-world use cases.

Governance & Standards

AGT follows open governance practices aligned with foundation incubation requirements:

DocumentPurpose
GOVERNANCE.mdDecision-making, roles, contributor ladder
CHARTER.mdTechnical charter (LF Projects format)
MAINTAINERS.md6 maintainers from 4 organizations
RELEASE.mdRelease process, versioning, registries
SECURITY.mdVulnerability reporting and response SLAs
CODE_OF_CONDUCT.mdMicrosoft Open Source Code of Conduct
CONTRIBUTING.mdDCO, attribution policy, AI-assisted contribution rules
ADOPTERS.md9 adopters across production, pilot, and research

Standards alignment: OWASP Agentic Top 10 (10/10) ยท NIST AI RMF ยท EU AI Act ยท OpenSSF Best Practices (100%)

Important Notes

If you use the Agent Governance Toolkit to build applications that operate with third-party agent frameworks or services, you do so at your own risk. We recommend reviewing all data being shared with third-party services and being cognizant of third-party practices for retention and location of data.

License

This project is licensed under the MIT License.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.