.NET: Bump Azure.AI.Projects to 2.0.0 GA (#5060)

* Bump Azure.AI.Projects to 2.0.0 GA

- Update Azure.AI.Projects from 2.0.0-beta.2 to 2.0.0 in CPM
- Update Azure.Identity from 1.19.0 to 1.20.0 (transitive dep)
- Update System.ClientModel from 1.9.0 to 1.10.0 (transitive dep)
- Rename types per Azure.AI.Projects.Agents 2.0.0 breaking changes:
  - AgentVersion -> ProjectsAgentVersion
  - AgentRecord -> ProjectsAgentRecord
  - AgentDefinition -> ProjectsAgentDefinition
  - AgentVersionCreationOptions -> ProjectsAgentVersionCreationOptions
  - PromptAgentDefinition -> DeclarativeAgentDefinition
  - AgentTool -> ProjectsAgentTool
  - AgentsClient -> AgentAdministrationClient
  - .Agents property -> .AgentAdministrationClient
- Add using Azure.AI.Projects.Memory namespace (types moved)
- Update AGENTS.md with BOM and output capture conventions

* Address PR review feedback

- Rename AIProjectClient parameter to aiProjectClient in AsChatClientAgent overloads
- Fix XML doc: ProjectsAgentTool namespace from Azure.AI.Projects.OpenAI to Azure.AI.Projects.Agents
- Rename test method to reflect DeclarativeAgentDefinition terminology
This commit is contained in:
Roger Barreto
2026-04-02 14:02:29 +00:00
committed by GitHub
parent 79b38040e8
commit b0613a8ceb
39 changed files with 326 additions and 321 deletions
@@ -46,7 +46,7 @@ internal sealed class Program
await CreateAgentsAsync(aiProjectClient, configuration);
// Ensure workflow agent exists in Foundry.
AgentVersion agentVersion = await CreateWorkflowAsync(aiProjectClient, configuration);
ProjectsAgentVersion agentVersion = await CreateWorkflowAsync(aiProjectClient, configuration);
string workflowInput = GetWorkflowInput(args);
@@ -86,7 +86,7 @@ internal sealed class Program
}
}
private static async Task<AgentVersion> CreateWorkflowAsync(AIProjectClient agentClient, IConfiguration configuration)
private static async Task<ProjectsAgentVersion> CreateWorkflowAsync(AIProjectClient agentClient, IConfiguration configuration)
{
string workflowYaml = File.ReadAllText("MathChat.yaml");
@@ -114,7 +114,7 @@ internal sealed class Program
agentDescription: "Teacher agent for MathChat workflow");
}
private static PromptAgentDefinition DefineStudentAgent(IConfiguration configuration) =>
private static DeclarativeAgentDefinition DefineStudentAgent(IConfiguration configuration) =>
new(configuration.GetValue(Application.Settings.FoundryModel))
{
Instructions =
@@ -127,7 +127,7 @@ internal sealed class Program
"""
};
private static PromptAgentDefinition DefineTeacherAgent(IConfiguration configuration) =>
private static DeclarativeAgentDefinition DefineTeacherAgent(IConfiguration configuration) =>
new(configuration.GetValue(Application.Settings.FoundryModel))
{
Instructions =