Skip to content

fix: recommend AIProjectClient instead of PersistentAgentsClient#1209

Merged
XiaofuHuang merged 1 commit intomicrosoft:mainfrom
XiaofuHuang:xiaofhua/use-ai-project-client
Nov 19, 2025
Merged

fix: recommend AIProjectClient instead of PersistentAgentsClient#1209
XiaofuHuang merged 1 commit intomicrosoft:mainfrom
XiaofuHuang:xiaofhua/use-ai-project-client

Conversation

@XiaofuHuang
Copy link
Copy Markdown
Contributor

@XiaofuHuang XiaofuHuang commented Nov 18, 2025

What does this PR do?

In the latest release of Microsoft Agent Framework, agent hosted in Azure AI Foundry use AIProjectClient instead of PersistentAgentsClient.

Detail: https://github.com/microsoft/agent-framework/releases/tag/dotnet-1.0.0-preview.251114.1

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copilot AI review requested due to automatic review settings November 18, 2025 10:22
@XiaofuHuang XiaofuHuang requested a review from a team as a code owner November 18, 2025 10:22
@XiaofuHuang
Copy link
Copy Markdown
Contributor Author

/azp run mcp - pullrequest - live

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
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 updates the Azure AI Best Practices documentation to recommend AIProjectClient instead of the legacy PersistentAgentsClient for creating agents in Azure AI Foundry. This aligns with the latest Microsoft Agent Framework release (dotnet-1.0.0-preview.251114.1).

Key changes:

  • Updated agent type recommendations from PersistentAgentsClient to AIProjectClient across all documentation files
  • Added new code examples demonstrating AIProjectClient usage patterns
  • Marked PersistentAgentsClient as legacy with migration guidance
  • Updated package installation instructions to clarify that Azure.AI.Projects is included transitively

Reviewed Changes

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

File Description
tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-error-patterns.txt Replaced PersistentAgentsClient examples with AIProjectClient patterns, including comprehensive code samples for creating agents with tools and structured output
tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-best-practices-core.txt Updated SDK selection guidance and installation instructions to recommend AIProjectClient, changed quickstart reference to GitHub sample
tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-background-knowledge.txt Updated agent types documentation to list AIProjectClient as recommended and PersistentAgentsClient as legacy

Comment thread tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-error-patterns.txt Outdated
Comment thread tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-error-patterns.txt Outdated
Comment thread tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-error-patterns.txt Outdated
Comment thread tools/Azure.Mcp.Tools.AzureAIBestPractices/src/Resources/ai-error-patterns.txt Outdated
@XiaofuHuang XiaofuHuang force-pushed the xiaofhua/use-ai-project-client branch from cd97c11 to ad524ef Compare November 18, 2025 10:57
@XiaofuHuang XiaofuHuang force-pushed the xiaofhua/use-ai-project-client branch from f6596d2 to e1aae00 Compare November 19, 2025 02:38
@XiaofuHuang XiaofuHuang enabled auto-merge (squash) November 19, 2025 16:18
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Nov 19, 2025
@XiaofuHuang XiaofuHuang merged commit 17c350f into microsoft:main Nov 19, 2025
23 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Nov 19, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants