# Securing AI Agents with the Agent Governance Toolkit

**URL:** <https://www.artofsm.art/t/securing-ai-agents-with-the-agent-governance-toolkit/21060>\
**Category:** Content Creators\
**Tags:** ed-andersen, agents, security, microsoft\
**Created:** [10 July 2026 10:38 UTC](https://www.artofsm.art/t/securing-ai-agents-with-the-agent-governance-toolkit/21060 "2026-07-10T10:38:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![artesia](https://www.artofsm.art/user_avatar/www.artofsm.art/artesia/32/36_2.png) [@artesia](https://www.artofsm.art/u/artesia)\
**Post date:** [10 July 2026 10:38 UTC](https://www.artofsm.art/t/securing-ai-agents-with-the-agent-governance-toolkit/21060/1 "2026-07-10T10:38:01Z")

</div>

[![](https://www.artofsm.art/uploads/default/original/3X/4/c/4c7bd9243728d943e71b45fb7f447f4065fe8649.jpeg "Securing AI Agents with the Agent Governance Toolkit") ](https://www.youtube.com/watch?v=hI2A5S3k0rY)

The video highlights the security vulnerabilities of AI agents, such as prompt injection attacks and unsafe tool calls, using the MVP Copilot as an example, and introduces Microsoft’s Agent Governance Toolkit to implement policies that block malicious actions and ensure safe deployment. It demonstrates technical solutions including policy-based filtering, prompt injection detection, and securing the MCP server, emphasizing the importance of robust governance to prevent misuse and protect AI agents in production.

---

<div class="post-metadata">

**Author:** ![artesia](https://www.artofsm.art/user_avatar/www.artofsm.art/artesia/32/36_2.png) [@artesia](https://www.artofsm.art/u/artesia)\
**Post date:** [10 July 2026 10:58 UTC](https://www.artofsm.art/t/securing-ai-agents-with-the-agent-governance-toolkit/21060/3 "2026-07-10T10:58:21Z")

</div>

The video discusses the challenges and solutions involved in securing AI agents, particularly focusing on an agent added to the website [mvplove.com](http://mvplove.com) called the MVP Copilot. The presenter highlights two main vulnerabilities: prompt injection attacks, where users can manipulate the agent to perform unintended actions like telling jokes despite restrictions, and unsafe tool calling, where the agent can retrieve information about undesired subjects such as certain YouTubers. These issues demonstrate the risks of deploying AI agents without proper safeguards, potentially leading to data leaks or misuse.

To address these problems, the presenter introduces Microsoft’s Agent Governance Toolkit, a framework designed to help developers ship AI agents to production securely. The toolkit supports code-based agents and integrates well with Python and .NET environments. By incorporating this toolkit, the presenter shows how to implement governance policies that filter out unsafe tool calls and block prompt injection attempts. For example, a YAML policy file is created to block tool calls referencing specific YouTubers, effectively preventing the agent from returning unwanted information.

The video then walks through the technical implementation of these security measures. It involves adding Microsoft Agent Governance Extensions packages, creating governance options with policy files, and wrapping the existing agent with a governance adapter. This setup enables logging of policy violations and blocks malicious or unauthorized requests. The presenter demonstrates how the agent successfully blocks queries for certain YouTubers while still allowing legitimate searches, showcasing the effectiveness of the governance policies in real-time.

Further, the presenter tackles prompt injection attacks by creating a wrapper agent that detects and prevents various forms of injection, including delimiter attacks, direct overrides, and role-play scenarios. This wrapper monitors incoming messages and blocks attempts to bypass system prompts, ensuring the agent adheres to its intended behavior. The code for this solution is made available on GitHub for others to use, emphasizing the importance of prompt injection prevention in production AI agents.

Finally, the video covers securing the MCP (Microsoft Conversational Platform) server to prevent circumvention of governance policies through external clients. By enabling governance on the MCP server, the same filtering and injection detection mechanisms apply to tool calls made via the server, closing potential security loopholes. The presenter concludes by encouraging viewers to adopt these governance practices when building AI agents, highlighting the growing prevalence of autonomous agents and the necessity of robust security to prevent errors or misuse in real-world applications.
