agent-framework-purview
Microsoft Purview (Graph dataSecurityAndGovernance) integration for Microsoft Agent Framework.
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 on this page — 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
agent-framework-purview on PyPI
pip
pip install agent-framework-purviewuv
uv add agent-framework-purviewpoetry
poetry add agent-framework-purviewInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — agent-framework-core, azure-core, httpx |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 448,526/month — #6,599 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: agent_framework_purview-1.0.0b260730-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
agent-framework-openaiProvides OpenAI and Azure OpenAI integration…
permissive · top 5,000 on PyPI
agent-framework-ollamaIntegrates Ollama LLM provider support into…
permissive · top 15,000 on PyPI
agent_governance_toolkitUnified installer that bundles policy…
permissive · top 15,000 on PyPI
agent-framework-copilotstudioIntegrates Microsoft Copilot Studio published…
permissive · top 15,000 on PyPI
agent-framework-claudeIntegrates Claude with Microsoft Agent…
permissive · top 15,000 on PyPI
cpexCPEX is a plugin framework that lets you…
permissive · top 15,000 on PyPI
agent-framework-foundry-localIntegrates Microsoft Agent Framework with…
permissive · top 15,000 on PyPI
agent-frameworkBuilds and orchestrates AI agents powered by…
permissive · top 5,000 on PyPI
agent-framework-durabletaskIntegrates Microsoft Agent Framework agents…
permissive · top 15,000 on PyPI
pyapacheatlasPyApacheAtlas provides a Python SDK and Excel…
permissive · top 15,000 on PyPI