{"id":5442,"date":"2026-05-14T11:36:20","date_gmt":"2026-05-14T18:36:20","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/agent-framework\/?p=5442"},"modified":"2026-05-14T11:36:20","modified_gmt":"2026-05-14T18:36:20","slug":"governance-at-the-speed-of-agents-microsoft-agent-framework-and-agent-governance-toolkit-better-together","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/agent-framework\/governance-at-the-speed-of-agents-microsoft-agent-framework-and-agent-governance-toolkit-better-together\/","title":{"rendered":"Governance at the Speed of Agents: Microsoft Agent Framework and Agent Governance Toolkit, Better Together"},"content":{"rendered":"<p><span data-teams=\"true\">Building powerful AI agents is only half the story, running them safely in production is the real challenge. As customers adopt Microsoft Agent Framework for agent orchestration, a clear need has emerged for robust, built-in governance. In this post, Imran Siddique from the AGT team walks through how Agent Governance Toolkit pairs with Agent Framework to enforce policy at runtime, govern agent actions, and provide end-to-end auditability. Turning agentic systems into production-ready platforms.<\/span><\/p>\n<h2>The Complete Stack for Production AI Agents<\/h2>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/agent-framework\/overview\/?pivots=programming-language-csharp\">Microsoft Agent Framework<\/a> 1.0 provides everything teams need to build, orchestrate, and deploy AI agents: multi-agent workflows, A2A protocol interoperability, middleware hooks, memory, and managed hosting via Foundry Agent Service. It is the foundation for enterprise-grade agentic applications.<\/p>\n<p><a href=\"https:\/\/microsoft.github.io\/agent-governance-toolkit\/\">Agent Governance Toolkit (AGT)<\/a> extends that foundation with runtime governance: deterministic policy enforcement, zero-trust identity, execution sandboxing, and SRE for autonomous agents. Together, the two open-source projects form a complete production stack: Agent Framework handles &#8216;build and orchestrate,&#8217; AGT handles &#8216;govern and audit.&#8217;<\/p>\n<p>This post shows how the two projects complement each other; with real code you can run today.<\/p>\n<h2>Why Governance Belongs at the Action Layer<\/h2>\n<p>Agent Framework provides a powerful middleware pipeline where teams can intercept, transform, and extend agent behavior at every stage of execution. Content safety filters, logging, compliance policies, and custom logic all plug in without modifying agent prompts.<\/p>\n<p>AGT takes advantage of this architecture by plugging deterministic governance directly into that pipeline. The result: every tool call, resource access, and inter-agent message is evaluated against policy before execution. Sub-millisecond overhead, no sidecars, no proxies.<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">Agent Action --&gt; Policy Check --&gt; Allow \/ Deny --&gt; Audit Log\u00a0\u00a0\u00a0 (&lt; 0.1 ms)<\/code><\/pre>\n<p>Agent Framework handles model input\/output safety (content filters, prompt shields). AGT governs agent actions and tool execution. Different layers, complete coverage, one middleware pipeline.<\/p>\n<h2>Native Integration: Middleware That Speaks Both Languages<\/h2>\n<h5>Python<\/h5>\n<p>AGT middleware plugs into Agent Framework&#8217;s middleware parameter, the same extensibility point used for logging, content safety, and custom interceptors:<\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from agent_framework import Agent, tool\r\nfrom agent_framework.openai import OpenAIChatClient\r\nfrom agent_os.integrations.maf_adapter import (\r\n\u00a0\u00a0\u00a0 GovernancePolicyMiddleware,\r\n\u00a0\u00a0\u00a0 CapabilityGuardMiddleware,\r\n\u00a0\u00a0\u00a0 RogueDetectionMiddleware,\r\n\u00a0\u00a0\u00a0 AuditTrailMiddleware,\r\n)\r\n\r\nagent = Agent(\r\n\u00a0\u00a0\u00a0 client=OpenAIChatClient(model=\"gpt-5.3\"),\r\n\u00a0\u00a0\u00a0 name=\"Contoso Loan Officer\",\r\n\u00a0\u00a0\u00a0 instructions=\"You are a governed loan assistant.\",\r\n\u00a0\u00a0\u00a0 tools=[check_credit_score, get_loan_rates, approve_small_loan],\r\n\u00a0\u00a0\u00a0 middleware=[\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AuditTrailMiddleware(audit_log=audit_log, agent_did=\"loan-agent\"),\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 GovernancePolicyMiddleware(evaluator=evaluator, audit_log=audit_log),\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CapabilityGuardMiddleware(allowed_tools=[\"check_credit_score\", \"get_loan_rates\"]),\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RogueDetectionMiddleware(detector=detector, agent_id=\"loan-agent\"),\r\n\u00a0\u00a0\u00a0 ],\r\n)<\/code><\/pre>\n<h5>.NET<\/h5>\n<p>The .NET extension uses Agent Framework&#8217;s native .Use() middleware surface:<\/p>\n<pre class=\"prettyprint language-cs language-csharp\"><code class=\"language-cs language-csharp\">var agent = builder.BuildAIAgent(model: \"gpt-5.3\")\r\n\u00a0\u00a0\u00a0 .Use(new GovernancePolicyMiddleware(evaluator))\r\n\u00a0\u00a0\u00a0 .Use(new CapabilityGuardMiddleware(allowedTools))\r\n\u00a0\u00a0\u00a0 .Use(new AuditTrailMiddleware(auditLog));<\/code><\/pre>\n<p>Same agent, same orchestration patterns, same tools. AGT adds governance, capability sandboxing, rogue detection, and Merkle-chained audit in the same process.<\/p>\n<h2>Five Scenarios Across Five Industries<\/h2>\n<p>The AGT repository ships five complete end-to-end scenarios that pair real Agent Framework agents with real AGT governance middleware. Each scenario demonstrates a different industry use case:<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"37\"><strong>#<\/strong><\/td>\n<td width=\"90\"><strong>Scenario<\/strong><\/td>\n<td width=\"114\"><strong>Industry<\/strong><\/td>\n<td width=\"335\"><strong>What Governance Demonstrates<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"37\">01<\/td>\n<td width=\"90\">Loan Processing<\/td>\n<td width=\"114\">Banking<\/td>\n<td width=\"335\">PII blocking, approval gating, tool sandboxing, rogue transfer detection<\/td>\n<\/tr>\n<tr>\n<td width=\"37\">02<\/td>\n<td width=\"90\">Customer Service<\/td>\n<td width=\"114\">Retail<\/td>\n<td width=\"335\">Refund fraud prevention, payment-data protection, escalation rules<\/td>\n<\/tr>\n<tr>\n<td width=\"37\">03<\/td>\n<td width=\"90\">Healthcare<\/td>\n<td width=\"114\">Healthcare<\/td>\n<td width=\"335\">HIPAA PHI blocking, prescription safety, cross-department isolation<\/td>\n<\/tr>\n<tr>\n<td width=\"37\">04<\/td>\n<td width=\"90\">IT Helpdesk<\/td>\n<td width=\"114\">Enterprise IT<\/td>\n<td width=\"335\">Privilege escalation prevention, credential isolation, infrastructure protection<\/td>\n<\/tr>\n<tr>\n<td width=\"37\">05<\/td>\n<td width=\"90\">DevOps Deploy<\/td>\n<td width=\"114\">DevOps<\/td>\n<td width=\"335\">Production deployment gates, destructive-operation blocking, deployment-storm detection<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Each demo runs deterministically without a live model credential (exercising the full governance pipeline in a terminal walkthrough) and also supports live Agent Framework agents with any configured backend (Azure OpenAI, OpenAI, GitHub Models).<\/p>\n<h2>Intent-Based Authorization for Multi-Agent Workflows<\/h2>\n<p>Agent Framework&#8217;s multi-agent orchestration (sequential, concurrent, handoff, group chat) enables powerful compositions. AGT&#8217;s intent-based authorization adds a governance layer purpose-built for these patterns. The lifecycle:<\/p>\n<ul>\n<li><strong>Declare: <\/strong>Agent states what actions it plans to take<\/li>\n<li><strong>Approve: <\/strong>System or human approves the declared plan<\/li>\n<li><strong>Execute: <\/strong>Agent runs under the approved scope; each action is checked at execution time<\/li>\n<li><strong>Verify: <\/strong>System confirms all executed actions matched the declared intent<\/li>\n<\/ul>\n<p>When an agent drifts from its declared intent (attempts an unplanned action), the governance layer can soft-block (action proceeds but trust score drops and an alert fires), hard-block (action is denied), or log-only, depending on the configured policy.<\/p>\n<p>For orchestrated workflows, the orchestrator declares top-level intent and child agents inherit narrowed scope. Sub-agents cannot exceed the permissions of their parent:<\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from agent_os.intent import IntentManager, IntentAction, DriftPolicy\r\n\r\nmanager = IntentManager(backend=backend)\r\n\r\n# Orchestrator declares top-level intent\r\nintent = await manager.declare_intent(\r\n\u00a0\u00a0\u00a0 agent_id=\"orchestrator\",\r\n\u00a0\u00a0\u00a0 planned_actions=[\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IntentAction(action=\"read_balance\"),\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IntentAction(action=\"transfer_funds\", params_schema={\"max_amount\": 1000}),\r\n\u00a0\u00a0\u00a0 ],\r\n\u00a0\u00a0\u00a0 drift_policy=DriftPolicy.SOFT_BLOCK,\r\n\u00a0\u00a0\u00a0 ttl_seconds=300,\r\n)\r\n\r\n# Sub-agent gets narrowed scope (cannot exceed parent)\r\nchild = await manager.declare_child_intent(\r\n\u00a0\u00a0\u00a0 parent_intent_id=intent.intent_id,\r\n\u00a0\u00a0\u00a0 agent_id=\"notification-agent\",\r\n\u00a0\u00a0\u00a0 planned_actions=[IntentAction(action=\"send_notification\")],\r\n)<\/code><\/pre>\n<h2>Multi-Agent Collective Policies<\/h2>\n<p>Individual agent policies are necessary but not sufficient for multi-agent systems. A customer-service workflow with 10 agents might have each agent within its own budget, but collectively they could exceed what any single workflow should cost.<\/p>\n<p>AGT&#8217;s collective policy engine evaluates constraints across all agents in an Agent Framework orchestration:<\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from agentmesh.governance.multi_agent_policy import (\r\n\u00a0\u00a0\u00a0 MultiAgentPolicyEngine,\r\n\u00a0\u00a0\u00a0 CollectiveConstraint,\r\n\u00a0\u00a0\u00a0 AggregateType,\r\n)\r\n\r\nengine = MultiAgentPolicyEngine()\r\nengine.add_constraint(CollectiveConstraint(\r\n\u00a0\u00a0\u00a0 name=\"global_api_calls\",\r\n\u00a0\u00a0\u00a0 metric=\"api_call_count\",\r\n\u00a0\u00a0\u00a0 aggregate=AggregateType.SUM,\r\n\u00a0\u00a0\u00a0 threshold=100,\r\n\u00a0\u00a0\u00a0 window_seconds=60,\r\n\u00a0\u00a0\u00a0 action=\"throttle\",\r\n))\r\n\r\n# All agents in the workflow report their metrics\r\nengine.record(\"agent-a\", \"api_call_count\", 40)\r\nengine.record(\"agent-b\", \"api_call_count\", 35)\r\nengine.record(\"agent-c\", \"api_call_count\", 30)\r\n\r\n# Collective evaluation: 105 &gt; 100, throttle triggered\r\nresult = engine.evaluate()<\/code><\/pre>\n<p>This works seamlessly with Agent Framework&#8217;s orchestration patterns. Whether you use SequentialBuilder, concurrent fan-out, or group chat, the collective policy engine observes all participants and enforces system-wide constraints.<\/p>\n<h2>Cost Governance: Budgets with Enforcement<\/h2>\n<p>Agents with access to paid APIs, compute resources, or external services can accumulate costs rapidly. AGT provides tiered budget enforcement that integrates with Agent Framework&#8217;s middleware pipeline:<\/p>\n<ul>\n<li><strong>Per-task limits:<\/strong> reject expensive operations before they execute<\/li>\n<li><strong>Per-agent daily budgets:<\/strong> prevent any single agent from overspending<\/li>\n<li><strong>Organization-wide monthly caps:<\/strong> global financial controls<\/li>\n<li><strong>Auto-throttle:<\/strong> reduce throughput as budgets approach limits<\/li>\n<li><strong>Kill switch:<\/strong> suspend all agent operations when thresholds are breached<\/li>\n<li><strong>Anomaly detection:<\/strong> alert when spending patterns deviate from baselines<\/li>\n<\/ul>\n<p>The cost governance module is designed to help protect against both gradual budget drift and sudden cost spikes, giving operators confidence to run agents autonomously.<\/p>\n<h2>Decision Bill of Materials: Complete Audit Lineage<\/h2>\n<p>Agent Framework&#8217;s observability integration (OpenTelemetry, Foundry dashboards) provides visibility into agent execution. AGT&#8217;s Decision BOM builds on that observability to reconstruct the complete decision lineage for any agent action:<\/p>\n<ul>\n<li><strong>Trust snapshot:<\/strong> what trust score did the agent have at decision time?<\/li>\n<li><strong>Policy evaluations:<\/strong> which policies were checked and what was the outcome?<\/li>\n<li><strong>Execution trace:<\/strong> what sequence of actions led to this decision?<\/li>\n<li><strong>Audit chain:<\/strong> tamper-evident Merkle-chained record of all governance events<\/li>\n<li><strong>Completeness score:<\/strong> how much evidence was available for reconstruction?<\/li>\n<\/ul>\n<p>The Decision BOM is designed to help satisfy regulatory audit requirements by providing reconstructible evidence of governance decisions. It is resilient by design: if one data source is temporarily unavailable, it returns a partial BOM with reduced completeness rather than failing.<\/p>\n<h2>A2A Protocol and Cross-Boundary Trust<\/h2>\n<p>Agent Framework&#8217;s A2A v1 support enables cross-platform agent communication using an open, production-ready standard backed by a technical steering committee with representatives from AWS, Cisco, Google, IBM Research, Microsoft, Salesforce, SAP, and ServiceNow.<\/p>\n<p>When agents communicate across organizational boundaries, AGT extends A2A with governance-aware trust:<\/p>\n<ul>\n<li>Trust bridges that translate between A2A, MCP, and IATP protocols<\/li>\n<li>Per-agent trust scores that decay or grow based on observed behavior<\/li>\n<li>Scope chains that enforce capability boundaries across delegation hops<\/li>\n<li>Merkle-chained audit logs that help make tampering detectable<\/li>\n<li>Agent identity verification using W3C DID documents<\/li>\n<\/ul>\n<p>A2A agents discovered via well-known URIs go through the same AGT governance pipeline as local agents. The combination of Agent Framework&#8217;s protocol support and AGT&#8217;s governance layer means you can collaborate with external agents without compromising your security posture.<\/p>\n<h2>Getting Started<\/h2>\n<p>Install both projects and run a governed scenario in under two minutes:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\"># Install Agent Governance Toolkit\r\npip install agent-governance-toolkit[full]\r\n\r\n# Run a governed MAF scenario\r\ncd examples\/maf-integration\/01-loan-processing\/python\r\npip install -r requirements.txt\r\npython main.py\r\n\r\n# Try intent-based authorization\r\npython examples\/intent-auth\/intent_auth_demo.py\r\n\r\n# Try cost governance\r\npython examples\/cost-governance\/cost_governance_demo.py\r\n\r\n# .NET\r\ncd examples\/maf-integration\/06-dotnet-extension-validation\/dotnet\r\ndotnet run<\/code><\/pre>\n<h2>Better Together<\/h2>\n<p>Microsoft Agent Framework and Agent Governance Toolkit represent two complementary layers of the same vision: making AI agents production-ready for the enterprise.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"192\"><strong>Capability<\/strong><\/td>\n<td width=\"192\"><strong>Agent Framework<\/strong><\/td>\n<td width=\"192\"><strong>Agent Governance Toolkit<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Agent creation and orchestration<\/td>\n<td width=\"192\">Core capability (single + multi-agent)<\/td>\n<td width=\"192\">Leverages via native middleware<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Model provider support<\/td>\n<td width=\"192\">10+ providers (Foundry, OpenAI, Anthropic, Bedrock, Gemini)<\/td>\n<td width=\"192\">Provider-agnostic governance<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">A2A\/MCP interop<\/td>\n<td width=\"192\">Protocol implementation and hosting<\/td>\n<td width=\"192\">Trust bridges and policy enforcement<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Runtime policy enforcement<\/td>\n<td width=\"192\">Middleware hooks extensibility<\/td>\n<td width=\"192\">Deterministic policy evaluator (&lt; 0.1 ms)<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Cost and budget controls<\/td>\n<td width=\"192\">Foundry managed hosting integration<\/td>\n<td width=\"192\">Tiered enforcement with kill switches<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Audit and compliance<\/td>\n<td width=\"192\">OpenTelemetry observability + Foundry dashboards<\/td>\n<td width=\"192\">Merkle-chained Decision BOM<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Together, they give teams the confidence to move AI agents from prototype to production: Agent Framework for building, orchestrating, and deploying; AGT for governing, auditing, and proving compliance.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/agent-framework\/overview\">Microsoft Agent Framework GitHub<\/a>\u00a0<\/strong><\/li>\n<li><strong><a href=\"https:\/\/github.com\/microsoft\/agent-governance-toolkit\">Agent Governance Toolkit GitHub<\/a><\/strong><\/li>\n<li><strong>PyPI (Agent Framework): <\/strong>pip install agent-framework<\/li>\n<li><strong>PyPI (AGT): <\/strong>pip install agent-governance-toolkit[full]<\/li>\n<li><strong>NuGet (Agent Framework): <\/strong>Agents.AI<\/li>\n<li><strong>NuGet (AGT): <\/strong>AgentGovernance.Extensions.Microsoft.Agents<\/li>\n<li><strong>OWASP Agentic Top 10 Coverage: <\/strong>10\/10 risks covered<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Legal Disclaimer: <\/strong>The policy files, workflow configurations, and code samples in this post are illustrative examples designed to demonstrate governance patterns. They are not intended as production-ready security configurations. Agent Governance Toolkit is designed to help implement governance controls but does not guarantee compliance with any specific regulatory framework, including but not limited to GDPR, HIPAA, EU AI Act, or Colorado AI Act. Consult legal counsel for your specific regulatory obligations. Microsoft, Microsoft Agent Framework, Azure, and other Microsoft product names are trademarks of Microsoft Corporation. All third-party trademarks referenced are the property of their respective owners and are used descriptively. No forward-looking statements or promises about future features are made in this post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building powerful AI agents is only half the story, running them safely in production is the real challenge. As customers adopt Microsoft Agent Framework for agent orchestration, a clear need has emerged for robust, built-in governance. In this post, Imran Siddique from the AGT team walks through how Agent Governance Toolkit pairs with Agent Framework [&hellip;]<\/p>\n","protected":false},"author":156599,"featured_media":5446,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[78,142,143,154],"tags":[],"class_list":["post-5442","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-a2a","category-agent-framework","category-agent-governance-toolkit"],"acf":[],"blog_post_summary":"<p>Building powerful AI agents is only half the story, running them safely in production is the real challenge. As customers adopt Microsoft Agent Framework for agent orchestration, a clear need has emerged for robust, built-in governance. In this post, Imran Siddique from the AGT team walks through how Agent Governance Toolkit pairs with Agent Framework [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/5442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/users\/156599"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/comments?post=5442"}],"version-history":[{"count":2,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/5442\/revisions"}],"predecessor-version":[{"id":5448,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/5442\/revisions\/5448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media\/5446"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media?parent=5442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/categories?post=5442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/tags?post=5442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}