# Agent Governance Toolkit: Policy Enforcement for Autonomous AI Agents

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/microsoft-agent-governance-toolkit
Generated for open source discovery and AI-assisted research.

The Microsoft Agent Governance Toolkit (AGT) provides robust policy enforcement, zero-trust identity, and execution sandboxing for autonomous AI agents. It addresses critical security and compliance challenges, ensuring agents operate within defined boundaries and providing tamper-evident audit trails. AGT covers all 10 items of the OWASP Agentic Top 10, making it essential for shipping AI agents to production securely.

GitHub: https://github.com/microsoft/agent-governance-toolkit
OSRepos URL: https://osrepos.com/repo/microsoft-agent-governance-toolkit

## Summary

The Microsoft Agent Governance Toolkit (AGT) provides robust policy enforcement, zero-trust identity, and execution sandboxing for autonomous AI agents. It addresses critical security and compliance challenges, ensuring agents operate within defined boundaries and providing tamper-evident audit trails. AGT covers all 10 items of the OWASP Agentic Top 10, making it essential for shipping AI agents to production securely.

## Topics

- agent-framework
- ai-agents
- ai-safety
- compliance
- governance
- security
- zero-trust
- python

## Repository Information

Last analyzed by OSRepos: Thu Aug 27 2026 21:29:30 GMT+0100 (Western European Summer Time)
Detail views: 2
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The Microsoft Agent Governance Toolkit (AGT) is a comprehensive solution designed to ensure policy enforcement, zero-trust identity, execution sandboxing, and reliability engineering for autonomous AI agents. It directly addresses the critical challenges of deploying AI agents in production environments, covering all 10 items of the OWASP Agentic Top 10.

When AI agents are deployed, they make autonomous decisions, call tools, browse the web, and interact with various systems. This raises fundamental questions: "Is this action allowed?", "Which agent performed this action?", and "Can we prove what happened?". Traditional prompt-level safety measures are often insufficient, as they are polite requests to stochastic systems. AGT tackles this by intercepting every tool call, message send, and delegation in deterministic application code *before* the model's intent reaches the wire. Actions denied by the AGT kernel are not merely "unlikely," they are structurally impossible, providing a robust layer of security and control.

## Installation

AGT supports multiple languages, with Python offering the full stack.

To get started with the Python version, ensure you have Python 3.11+ and run:

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


The toolkit also provides SDKs for TypeScript, .NET, Rust, and Go, allowing for broad integration across different development ecosystems.

## Examples

Governing any tool function in Python can be done with just two lines:

python
from agentmesh.governance import govern

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


This `safe_tool` evaluates a YAML policy on every call, logs the decision to an audit trail, and raises `GovernanceDenied` if the policy blocks the action. Here's an example policy:

yaml
# 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"]


The repository includes further examples for various frameworks and languages, demonstrating programmatic control via the `AgentControl` API and integrations with Claude Code, TypeScript, .NET, Rust, and Go.

## Why Use It

Autonomous AI agents introduce new risks related to unauthorized actions, lack of accountability, and difficulty in auditing. The Agent Governance Toolkit provides a critical control plane for these systems. By enforcing policies at the application middleware layer, AGT ensures that agents adhere to defined rules, preventing unintended or malicious operations.

Key benefits include:
*   **Deterministic Policy Enforcement**: Actions are intercepted and evaluated in application code, making denied actions structurally impossible, unlike probabilistic prompt-level defenses.
*   **Zero-Trust Identity**: Establishes clear identity for agents in multi-agent systems, crucial for accountability and incident response.
*   **Execution Sandboxing**: Provides controlled environments for agent execution with privilege rings.
*   **Tamper-Evident Audit Trails**: Records every decision, policy, and agent request, essential for compliance and regulatory requirements (OWASP, NIST AI RMF, EU AI Act, SOC 2).
*   **Multi-Language Support**: Offers SDKs for Python, TypeScript, .NET, Rust, and Go, enabling broad adoption.
*   **Framework Agnostic**: Integrates with popular AI agent frameworks like Microsoft Agent Framework, Semantic Kernel, AutoGen, LangChain, and more.

AGT helps developers and organizations ship AI agents to production with confidence, knowing that robust governance and security measures are in place.

## Links

*   **GitHub Repository**: [https://github.com/microsoft/agent-governance-toolkit](https://github.com/microsoft/agent-governance-toolkit){:target="_blank"}
*   **Official Documentation**: [https://microsoft.github.io/agent-governance-toolkit](https://microsoft.github.io/agent-governance-toolkit/){:target="_blank"}
*   **PyPI Package**: [https://pypi.org/project/agent-governance-toolkit/](https://pypi.org/project/agent-governance-toolkit/){:target="_blank"}