Skip to content

Conversation

@dmytrostruk
Copy link
Member

Motivation and Context

Resolves: #1571

  1. Added **kwargs to create_agent() method on AzureAIProjectAgentProvider to pass additional parameters to PromptAgentDefinition when creating an agent.
  2. Added sample demonstrating content filtering (RaiConfig) usage.

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.

@dmytrostruk dmytrostruk self-assigned this Jan 17, 2026
Copilot AI review requested due to automatic review settings January 17, 2026 05:40
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Jan 17, 2026
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 17, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/azure-ai/agent_framework_azure_ai
   _project_provider.py931386%128–129, 207, 214, 282, 326, 359, 408–410, 414–416
TOTAL17430266984% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3149 213 💤 0 ❌ 0 🔥 1m 6s ⏱️

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 PR adds flexibility to the create_agent() method by accepting arbitrary keyword arguments that are passed through to PromptAgentDefinition, enabling users to specify additional parameters like RAI (Responsible AI) policies for content filtering.

Changes:

  • Added **kwargs parameter to AzureAIProjectAgentProvider.create_agent() method with corresponding documentation
  • Added a new sample demonstrating content filtering using RaiConfig with Azure AI agents
  • Updated the samples README to document the new content filtering example

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py Added **kwargs parameter to create_agent() method and merges kwargs into the args dict passed to PromptAgentDefinition
python/samples/getting_started/agents/azure_ai/azure_ai_with_content_filtering.py New sample demonstrating how to use RaiConfig for content filtering with Azure AI agents
python/samples/getting_started/agents/azure_ai/README.md Added documentation entry for the new content filtering sample

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 python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Content Filtering not triggering as expected

2 participants