--- id: agent-framework-purview version: "1.0.0b260730" license: unclear license_treatment: permissive maintenance: active --- # agent-framework-purview — Microsoft Purview (Graph dataSecurityAndGovernance) integration for Microsoft Agent Framework. License: permissive · Maintenance: active · Downloads: 448.5K/mo ## What it is and what it does agent-framework-purview is a middleware layer that integrates Microsoft Purview's data governance engine into the Microsoft Agent Framework. It intercepts both user prompts and model responses, evaluating them against centrally managed Data Loss Prevention (DLP) and security policies before allowing them to proceed. When a violation is detected, the middleware blocks the content and substitutes a system message, preventing sensitive data from reaching the LLM or leaving your system. The package handles authentication via azure-identity credentials, includes built-in caching (4-hour default TTL, 200MB default size) to reduce API calls, and supports both synchronous and asynchronous credential flows. Configuration is done through PurviewSettings, which lets you customize blocked messages, set cache parameters, and scope policies by application location. It's designed to work with any Agent or orchestration using the standard Agent Framework middleware pipeline. Use it for: - Prevent sensitive customer data, PII, or trade secrets from being sent to an LLM by blocking prompts that violate DLP policies. - Audit and log all AI interactions in Purview for compliance, eDiscovery, and insider risk management without rewriting agent logic. - Block model responses containing regulated data (e.g., financial records, health information) before they leave your system. - Enforce centrally managed security policies across multiple agents without duplicating policy logic in each agent. - Test agent behavior under governance constraints using Purview's policy simulation and offline evaluation features. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds Microsoft Purview data governance and DLP policy enforcement to the Microsoft Agent Framework, blocking or allowing prompts and model responses based on centrally managed security policies. Yes, if you are building agents on the Microsoft Agent Framework and have Purview configured in your Azure tenant. The middleware integrates cleanly, adds low install friction, and solves a real compliance problem. However, the Beta status and recent release date mean you should expect API changes and test thoroughly before production use. Not applicable if you lack Purview infrastructure or are not using the Microsoft Agent Framework. ## Install pip install agent-framework-purview uv add agent-framework-purview poetry add agent-framework-purview ## Installing agent-framework-purview Before you install: Low install friction with a pure Python wheel and three runtime dependencies (agent-framework-core, azure-core, httpx). Package is in active development with recent releases; marked Beta status and released just 15 days ago, so expect ongoing changes. License in practice: MIT license (permissive); you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install agent-framework-purview from agent_framework.microsoft import PurviewPolicyMiddleware, PurviewSettings from azure.identity import InteractiveBrowserCredential middleware = PurviewPolicyMiddleware( credential=InteractiveBrowserCredential(), settings=PurviewSettings(app_name="My App") ) Requires Microsoft Azure subscription with Purview configured and Microsoft 365 E5 license; also requires Entra app registration with dataSecurityAndGovernance Graph permissions. Verify before relying: - Whether custom cache providers can integrate with external storage systems beyond the default in-memory provider. - Performance impact of policy evaluation on agent throughput under high-volume scenarios. - Exact behavior when both prompt and response violations occur in the same run. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 448.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags purview dlp policy enforcement, agent framework governance middleware, azure data loss prevention, prompt response content filtering, microsoft purview integration, agent security policy middleware, data governance for ai agents, governance-middleware, dlp-enforcement, azure-integration [View on SkillFed](https://skillfed.io/packages/agent-framework-purview) · [View on PyPI](https://pypi.org/project/agent-framework-purview/)