This guide takes you from zero to a governed AI agent in under 5 minutes. You will install the toolkit, write a policy file, wrap a tool function, and verify that destructive actions are blocked deterministically — not probabilistically filtered, but structurally prevented by the governance gate.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/microsoft/agent-governance-toolkit/llms.txt
Use this file to discover all available pages before exploring further.
Install AGT
The fastest path is the Python meta-package, which installs the full governance stack in a single command.Verify the installation with the AGT CLI health check:
The
agt CLI is included with agent-governance-toolkit-cli and with the [full] extra. It requires Python 3.10+.Write a Policy
Create a The
policy.yaml file in your project root. The policy below blocks destructive operations outright and routes email sends through a human approval gate.policy.yaml
default_action: allow means anything not matched by a rule is permitted. Flip it to deny for a strict allowlist model. Rules are evaluated in priority order; the first match wins.Wrap a Tool
Import For framework-specific adapters that integrate more deeply into your execution graph, use the
govern from agentmesh.governance and wrap any callable in two lines. Every call to safe_tool is now evaluated against your policy, logged to an append-only audit trail, and blocked with a GovernanceDenied exception if a deny rule matches.LangChainKernel or equivalent for your framework:Test It
Run the following in a Python REPL or script to see both outcomes — a passing call and a blocked one:Expected output:The
GovernanceDenied exception is raised before delete_file is ever invoked. The destructive action never reaches execution.Programmatic Policy Control
For teams that need fine-grained control beyond YAML files, thePolicyEvaluator API lets you construct and evaluate policies programmatically:
PolicyEvaluator is the same engine that powers govern() — you get the same deterministic enforcement, just with programmatic rule construction instead of YAML.
Same Pattern in Other Languages
Next Steps
| What | Where |
|---|---|
| Learn policy writing in depth | Policy Engine Basics |
| Add zero-trust identity & trust scoring | Trust & Identity |
| Integrate your agent framework | Framework Integrations |
| Govern MCP servers | MCP Security Gateway |
| Add SLOs and reliability monitoring | Agent Reliability |