Skip to content

Conversation

@eoindoherty1
Copy link

Motivation and Context

Description

Adds dotnet Purview middleware similar to 1142. This will enforce Purview data security policies for prompts and responses sent to/from an agent.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 5, 2025 23:22
@github-actions github-actions bot changed the title Implement Purview middleware in dotnet .NET: Implement Purview middleware in dotnet Nov 5, 2025
@eoindoherty1
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds Microsoft Purview integration capabilities to the Agent Framework, enabling AI agents to leverage Purview's data governance and compliance features. The implementation includes client libraries for interacting with Purview APIs, middleware for wrapping agents and chat clients, and comprehensive unit tests.

Key changes:

  • New Microsoft.Agents.AI.Purview library for Purview integration
  • Extension methods to add Purview capabilities to agents and chat clients
  • Background job processing for asynchronous content activities
  • Comprehensive unit tests for all major components
  • Sample application demonstrating Purview integration

Reviewed Changes

Copilot reviewed 79 out of 79 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Microsoft.Agents.AI.Purview.csproj Project configuration for the Purview library
PurviewClient.cs HTTP client implementation for Purview API calls
ScopedContentProcessor.cs Orchestrates protection scope, content processing, and activity tracking
PurviewWrapper.cs Middleware wrapper for agent/chat client integration
PurviewExtensions.cs Extension methods for adding Purview to agents and chat clients
PurviewSettings.cs Configuration settings for Purview integration
Various model classes Request/response models for Purview API interactions
Unit test files Comprehensive test coverage for all components
AgentWithPurview sample Sample application demonstrating usage

@@ -0,0 +1,43 @@
// Copyright (c) Microsoft. All rights reserved.

// This sample shows how to create and use a simple AI agent with Azure OpenAI Responses as the backend.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure there should be a Purview sample in the "Getting Started" section, since ostensibly the samples in there should target core/basic scenarios involved in building agents (admittedly there's probably other stuff in there that can be cleaned up).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit niche compared to the other examples in that directory. I added a new folder for Purview and moved this there, please let me know if there's a better spot for it.

@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants