-
Couldn't load subscription status.
- Fork 608
.NET: Add support for getting and creating Assistant and Foundry agents with ChatClientAgentOptions #1304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET: Add support for getting and creating Assistant and Foundry agents with ChatClientAgentOptions #1304
Conversation
There was a problem hiding this 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 support for getting and creating Assistant and Foundry agents using ChatClientAgentOptions, addressing the missing extension methods that prevented consistent use of chat message store factories and AI context provider factories.
- Add new overloads for GetAIAgent methods that accept ChatClientAgentOptions parameters
- Add new overloads for CreateAIAgent methods that accept ChatClientAgentOptions parameters
- Update existing CreateAIAgent methods to properly copy all ChatClientAgentOptions properties
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.OpenAI/Extensions/OpenAIAssistantClientExtensions.cs | Added GetAIAgent and CreateAIAgent overloads with ChatClientAgentOptions support |
| dotnet/src/Microsoft.Agents.AI.AzureAI/PersistentAgentsClientExtensions.cs | Added GetAIAgent and CreateAIAgent overloads with ChatClientAgentOptions support |
| dotnet/tests/Microsoft.Agents.AI.OpenAI.UnitTests/Extensions/OpenAIAssistantClientExtensionsTests.cs | Added comprehensive unit tests for new GetAIAgent overloads |
| dotnet/tests/Microsoft.Agents.AI.AzureAI.UnitTests/Extensions/PersistentAgentsClientExtensionsTests.cs | Added comprehensive unit tests for new GetAIAgent and CreateAIAgent overloads |
| dotnet/.vscode/settings.json | Updated VS Code settings to enable chat agent functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dotnet/src/Microsoft.Agents.AI.OpenAI/Extensions/OpenAIAssistantClientExtensions.cs
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.AzureAI/PersistentAgentsClientExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.AzureAI/PersistentAgentsClientExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.OpenAI/Extensions/OpenAIAssistantClientExtensions.cs
Show resolved
Hide resolved
…rted yet, or requires a lot of code duplication.
Motivation and Context
#1226
We don't have extensions to consistently get and create Foundry Agents and Assistants using ChatClientAgentOptions, which means that adding chat message store factories or ai context provider factories is not always possible.
Description
Contribution Checklist