An open source sandbox engine for AI agents that restricts what they can execute, read, write, and reach on the network, with default-deny policies.
microsoft/agent-governance-toolkit
Policy enforcement, zero-trust identity, execution sandboxing, and SRE tooling for autonomous AI agents, usable from Python, TypeScript, .NET, Rust, and Go.
- Stars
- 6,528
- Forks
- 1,126
- Open issues
- 120
- Last commit
- 17 hours ago
What is it?
Agent Governance Toolkit is a Microsoft open-source project for controlling what AI agents are allowed to do once they are deployed. It intercepts tool calls, messages, and delegations to other agents in application code, evaluates them against YAML, OPA, or Cedar-style policies, and records each decision in an audit trail. Denied actions are blocked before they reach the tool, rather than relying on the model to follow instructions in its prompt.
The toolkit is organized into packages covering policy enforcement, agent identity and trust scoring, execution sandboxing with privilege rings, kill switches and SLO monitoring, and OWASP Agentic Top 10 compliance checks. A `govern()` wrapper can be applied to an ordinary tool function, and adapters exist for frameworks such as LangGraph, CrewAI, AutoGen, the OpenAI Agents SDK, and Google ADK. Core governance is also available in TypeScript, .NET, Rust, and Go SDKs, along with plugins for Claude Code and GitHub Copilot CLI.
The project ships a `agt` command-line tool for installation checks, OWASP verification, prompt-injection auditing, and policy linting. It is currently in public preview, so APIs may change before a general availability release.
Key features
- 01Enforces YAML, OPA, or Cedar-style policies on tool calls and agent actions before execution.
- 02Wraps any Python tool function with a single govern() call and records every decision to an audit log.
- 03Assigns agent identities and trust scores, including delegation chains between agents.
- 04Runs agent execution in sandboxes with four privilege rings and includes a kill switch.
- 05Provides a MCP security gateway that scans for tool poisoning and hidden instructions.
- 06Offers SDKs for TypeScript, .NET, Rust, and Go alongside the Python packages.
Use cases
- Adding approval gates and deny rules to agents that can send email, query databases, or run shell commands.
- Producing tamper-evident audit records of agent decisions for compliance reviews.
- Attributing actions to specific agents in multi-agent systems that share credentials.
- Checking agent code and prompts against OWASP Agentic Top 10 controls in CI.
Quick start
- 1
Install the Python package with the full extra (requires Python 3.11+)
pip install "agent-governance-toolkit[full]" - 2
Check the installation with the CLI
agt doctor
Things to know
- It is in public preview and may have breaking changes before GA.
- The base wheel installs only the compliance CLI, so the full extra is needed for the governance modules.
In collections
Topics
FAQ
- What is agent-governance-toolkit?
- Policy enforcement, zero-trust identity, execution sandboxing, and SRE tooling for autonomous AI agents, usable from Python, TypeScript, .NET, Rust, and Go. Agent Governance Toolkit is a Microsoft open-source project for controlling what AI agents are allowed to do once they are deployed. It intercepts tool calls, messages, and delegations to other agents in application code, evaluates them against YAML, OPA, or Cedar-style policies, and records each decision in an audit trail. Denied actions are blocked before they reach the tool, rather than relying on the model to follow instructions in its prompt.
- Is agent-governance-toolkit free to use? What license does it have?
- agent-governance-toolkit is open source under the MIT license. Check the license terms before using it in commercial products.
- Is agent-governance-toolkit still maintained?
- Actively maintained. The last commit to agent-governance-toolkit was on Nov 6, 2026.
- What can I use agent-governance-toolkit for?
- Adding approval gates and deny rules to agents that can send email, query databases, or run shell commands. Producing tamper-evident audit records of agent decisions for compliance reviews. Attributing actions to specific agents in multi-agent systems that share credentials. Checking agent code and prompts against OWASP Agentic Top 10 controls in CI.
- How do I install agent-governance-toolkit?
- Install the Python package with the full extra (requires Python 3.11+): pip install "agent-governance-toolkit[full]" Check the installation with the CLI: agt doctor
- Where can I get agent-governance-toolkit?
- The source code and installation instructions are on GitHub: https://github.com/microsoft/agent-governance-toolkit
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Zero-trust sandboxed runtime on Kubernetes that maps many stateful AI agents onto a small pool of workers by snapshotting idle actors.
Open-source governance layer for AI coding and other agents: declarative policies, a deterministic scheduler, and offline-verifiable run receipts.
Runtime firewall for AI agents that intercepts, classifies and blocks tool calls before they execute, with approvals and a tamper-evident audit trail.
A secure Python sandbox written in Rust for running code generated by AI, without containers.
Kernel-enforced sandbox and security layer for AI agents, controlling their tools, credentials, network access, and file changes.