AGT enforces governance at the application middleware layer using deterministic interception: every agent action is evaluated against policy before execution, at sub-millisecond latency (under 0.1 ms). This is not a probabilistic filter or a model-layer safety prompt — it is code that runs in the same process as your agent framework and either allows the action, denies it, or routes it to a human approver before the intent ever reaches the wire. For high-security environments, AGT composes with container or VM isolation for defense-in-depth, but application-layer interception alone covers the vast majority of production risk surfaces.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.
Full System Architecture
The following diagram shows the complete AGT component topology, from the policy check at the top to the framework adapters at the bottom:Component Deep Dive
Agent OS Engine
The Policy Engine at the core of AGT. Evaluates every agent action against YAML, OPA/Rego, or Cedar rules before execution. Includes the Capability Model (what an agent is allowed to do), the Governance Gate (the hard stop in the execution path), the GovernanceEventSink (structured event emission), and the Decision Bill of Materials (tamper-evident record of every allow/deny decision).
AgentMesh
The zero-trust identity and routing layer. Issues each agent a cryptographic credential (Ed25519 key pair, SPIFFE certificate, or DID document), maintains a 0–1000 trust score per agent, and manages delegation chains for multi-agent systems. Wire protocol supports A2A, MCP, and IATP. When something goes wrong in a multi-agent system, AgentMesh tells you exactly which agent acted.
Agent Runtime
Execution sandboxing using four privilege rings (0–3), modeled after OS privilege levels. Ring 0 is the most privileged (system operations); Ring 3 is the least (untrusted plugins). Each ring has configurable resource limits, and actions that violate ring permissions raise a
GovernanceDenied before execution. Includes saga orchestration for multi-step workflows and termination control.Agent SRE
Site reliability engineering for agents. Tracks SLOs (error rate, latency, compliance rate) and error budgets, provides deterministic replay for incident debugging, supports chaos engineering to validate governance holds under fault injection, and implements circuit breakers to stop runaway agents automatically.
Agent Hypervisor
Execution audit and commitment anchoring. Records every state transition using a delta engine (only the diff is stored), anchors commitments to a Merkle chain for tamper-evidence, and enforces a command denylist at the kernel level. The Merkle chain logs give auditors a cryptographic proof of the complete agent execution history.
Agent Lightning
Governance for reinforcement learning training. Applies violation penalties to the reward signal when an agent proposes a policy-violating action during training — shaping the agent’s learned behavior away from harmful strategies before it ever sees production. Includes training checkpoint governance and reward shaping primitives.
MCP Security Gateway
Tool-call-level security for the Model Context Protocol. Scans MCP tool definitions for tool poisoning, typosquatting, hidden instructions (invisible Unicode, homoglyphs), and rug-pull patterns. Applies policy checks and rate limiting to every tool invocation routed through an MCP server. Operates as a transparent proxy — no changes to your MCP server implementation required.
Agent Marketplace
Plugin governance and trust scoring. Manages the discovery, signing, verification, and trust rating of third-party agent plugins. Every plugin installed from the marketplace has a verified signature and a trust score. Plugins from unverified publishers are blocked by default.
The Execution Flow in Detail
When an agent calls a tool, the request travels through the following layers in order:- Policy Engine evaluates the action context (tool name, parameters, calling agent ID, timestamp) against all active rules. The first matching rule’s effect applies. If no rule matches, the
default_actionapplies. The entire evaluation completes in under 0.1 ms. - Identity check verifies the calling agent’s cryptographic credential and current trust score. Actions from agents below the required trust tier for a given rule are denied.
- Audit Log writes a structured decision record — allowed or denied, which rule matched, the full action context, and the policy document version — to an append-only log. The log is Merkle-chained for tamper-evidence.
- Tool executes (if allowed) or
GovernanceDeniedis raised (if denied). The exception propagates up to the agent framework’s error handler.
Trust Score Algorithm
AgentMesh assigns every agent a trust score on a 0–1000 scale. The score governs which privilege tiers an agent can access and which policy rules apply based on trust level.| Score Range | Tier | Meaning |
|---|---|---|
| 900–1000 | Verified Partner | Cryptographically verified, long-term trusted |
| 700–899 | Trusted | Established track record, elevated privileges |
| 500–699 | Standard | Default for new agents with valid identity |
| 300–499 | Probationary | Limited privileges, under observation |
| 0–299 | Untrusted | Restricted to read-only or blocked entirely |
- Policy compliance history — consistent rule adherence increases score
- Successful task completions — verified, non-violating completions add positive weight
- Trust boundary violations — any governance denial decreases score and may trigger probationary status
agent-governance-python/agent-mesh/docs/TRUST-SCORING.md.
Security Model
AGT enforces governance at the application middleware layer, not at the OS kernel level. The policy engine and the agent share the same process boundary — which is the same trust boundary used by every Python-based agent framework (LangChain, AutoGen, CrewAI, OpenAI Agents SDK). This is a deliberate design choice: it means AGT works without any special OS privileges, can be added to any existing agent in two lines, and integrates natively with all framework lifecycle hooks. The security model is honest about what this boundary provides and what it does not:| Enforcement Capability | Defense-in-Depth Composition |
|---|---|
| Intercepts and evaluates every agent action before execution | Add container isolation (Docker, gVisor, Kata) for OS-level separation |
| Enforces capability-based least-privilege policies | Add network policies for cross-agent communication control |
| Provides cryptographic agent identity (Ed25519) | Add external PKI for certificate lifecycle management |
| Maintains append-only audit logs with Merkle chains | Add external append-only sink (Azure Monitor, write-once storage) for tamper-evidence |
| Terminates non-compliant agents via signal system | Add OS-level process.kill() for isolated agent processes |
| Governance gate blocks actions before execution (fail-closed) | Add MCP Security Gateway for tool-call-level interception |
Production recommendation: For high-security deployments, run each agent in a separate container with the AGT governance middleware inside. This gives you both application-level policy enforcement and OS-level isolation. See the Architecture: Security Boundaries documentation for detailed guidance.
Formal Specifications
Every major AGT component is backed by an RFC 2119 formal specification with conformance tests. The current suite covers 992 conformance tests across 9 specifications:| Specification | Scope | Tests |
|---|---|---|
| Agent OS Policy Engine | Policy evaluation, rule merging, fail-closed semantics | 68 |
| AgentMesh Identity and Trust | Credentials, trust scoring, delegation chains | 135 |
| Agent Hypervisor Execution Control | Privilege rings, saga orchestration, kill switch | 80 |
| AgentMesh Trust and Coordination | Peer trust negotiation, mesh-wide policy | 62 |
| Agent SRE Governance | SLOs, error budgets, chaos, circuit breakers | 111 |
| MCP Security Gateway | Tool poisoning, drift detection, hidden instructions | 127 |
| Agent Lightning Fast-Path | RL training governance, violation penalties | 100 |
| Framework Adapter Contract | 10 adapter integrations, interceptor chain | 152 |
| Audit and Compliance | Merkle audit, compliance mapping, Decision BOM | 157 |
Next Steps
Quickstart
Govern your first tool call in under 5 minutes.
Installation
Install AGT for Python, TypeScript, .NET, Rust, or Go.