Skip to content

Conversation

rogerbarreto
Copy link
Member

Motivation

This change is a step forward how we expect the caller to use agents without modifying much of the experience, extracting the specifics from the steps, while keeping the Providers folder with the full implementation.

  • This change adds the option for using AzureAIAgentsPersistent provider to the Samples.
  • Updates the Samples_01 to actually target the ChatClientAgent component, renamed to Step01_ChatClientAgent_Running.
  • Give another round of consistency across the different samples.

@rogerbarreto rogerbarreto self-assigned this Jun 25, 2025
@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 18:27
Copy link
Contributor

@Copilot 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 .NET agent samples to support the new AzureAIAgentsPersistent provider, modernizing asynchronous calls and ensuring consistency in naming and cleanup across samples and tests. Key changes include:

  • Removing unused and redundant using directives and updating namespaces.
  • Renaming sample classes and updating the asynchronous creation of chat clients.
  • Extending provider support and cleanup logic in the shared AgentSample class.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs Removed an unused using directive to reflect updated dependency management.
dotnet/src/Microsoft.Extensions.AI.AzureAIAgentsPersistent/PersistentAgentsClientExtensions.cs Updated the namespace from Microsoft.Extensions.AI.AzureAIAgentsPersistent to Microsoft.Extensions.AI.
dotnet/samples/GettingStarted/Steps/Step02_ChatClientAgent_UsingTools.cs Renamed the class for clarity and updated asynchronous chat client initialization.
dotnet/samples/GettingStarted/Steps/Step01_ChatClientAgent_Running.cs Renamed the class and incorporated asynchronous client retrieval and agent cleanup.
dotnet/samples/GettingStarted/Providers/* Minor punctuation updates in comments introduced for clarity.
dotnet/samples/GettingStarted/AgentSample.cs Updated async methods, expanded ChatClientProviders, and added cleanup logic for the AzureAIAgentsPersistent provider.
.gitattributes Added file encoding and line-ending configurations.
Comments suppressed due to low confidence (2)

dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs:12

  • The removed using directive indicates a cleanup of unused dependencies. Confirm that all required types are now correctly referenced elsewhere.
using Microsoft.Extensions.AI;

@rogerbarreto rogerbarreto added this pull request to the merge queue Jun 26, 2025
Merged via the queue into microsoft:main with commit b46ee00 Jun 26, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants