skillfed

agent-framework-purview

Microsoft Purview (Graph dataSecurityAndGovernance) integration for Microsoft Agent Framework.

agent-framework-purview v1.0.0b260730 448.5K downloads/30d#6,599 on PyPI12,804
Permissive license Active released

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-purview

uv

uv add agent-framework-purview

poetry

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 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

Development Status :: 4 - BetaFramework :: Pydantic :: 2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

purview dlp policy enforcementagent framework governance middlewareazure data loss preventionprompt response content filteringmicrosoft purview integrationagent security policy middlewaredata governance for ai agents
governance-middlewaredlp-enforcementazure-integration

More Application Frameworks packages

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

textual

Textual is a Python framework for building…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

mcp

Build and connect to Model Context Protocol…

permissive · top 1,000 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

agent-framework-openai

Provides OpenAI and Azure OpenAI integration…

permissive · top 5,000 on PyPI

agent-framework-ollama

Integrates Ollama LLM provider support into…

permissive · top 15,000 on PyPI

agent_governance_toolkit

Unified installer that bundles policy…

permissive · top 15,000 on PyPI

agent-framework-copilotstudio

Integrates Microsoft Copilot Studio published…

permissive · top 15,000 on PyPI

agent-framework-claude

Integrates Claude with Microsoft Agent…

permissive · top 15,000 on PyPI

cpex

CPEX is a plugin framework that lets you…

permissive · top 15,000 on PyPI

agent-framework-foundry-local

Integrates Microsoft Agent Framework with…

permissive · top 15,000 on PyPI

agent-framework

Builds and orchestrates AI agents powered by…

permissive · top 5,000 on PyPI

agent-framework-durabletask

Integrates Microsoft Agent Framework agents…

permissive · top 15,000 on PyPI

pyapacheatlas

PyApacheAtlas provides a Python SDK and Excel…

permissive · top 15,000 on PyPI

Further reading