Skip to content
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: Update AgentDefinition to match the latest schema changes #10735

Conversation

markwallace-microsoft
Copy link
Member

Motivation and Context

Update AgentDefinition to match the latest schema changes from the declarative agent work group

Description

Contribution Checklist

@markwallace-microsoft markwallace-microsoft requested a review from a team as a code owner February 28, 2025 14:34
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Feb 28, 2025
@github-actions github-actions bot changed the title Update AgentDefinition to match the latest schema changes .Net: Update AgentDefinition to match the latest schema changes Feb 28, 2025
@markwallace-microsoft markwallace-microsoft requested review from Copilot and removed request for a team February 28, 2025 14:35

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request updates the AgentDefinition to align with the latest schema changes defined by the declarative agent work group. Key changes include:

  • Replacing the Metadata property type in AgentDefinition from IDictionary to a new AgentMetadata type.
  • Introducing and updating YAML type converters (AgentMetadataTypeConverter) to correctly deserialize agent metadata.
  • Updating agent type identifiers from "azureai_agent" to "foundry_agent" across relevant files and tests.

Reviewed Changes

File Description
dotnet/src/Agents/UnitTests/Yaml/AgentDefinitionYamlTests.cs Adds new tests to validate YAML deserialization using the updated AgentMetadata.
dotnet/src/Agents/Abstractions/Definition/AgentMetadata.cs Introduces a new type to capture agent metadata properties with extension data support.
dotnet/src/Agents/Yaml/AgentMetadataTypeConverter.cs Provides custom YAML deserialization for AgentMetadata with updated property handling.
dotnet/src/Agents/AzureAI/Definition/AzureAIAgentFactory.cs Updates agent type constant to "foundry_agent" to reflect schema changes.
dotnet/src/Agents/UnitTests/Yaml/AzureAIKernelAgentYamlTests.cs Adjusts YAML content in tests to use the new "foundry_agent" value.
dotnet/src/Agents/Yaml/AgentDefinitionYaml.cs Adds the AgentMetadataTypeConverter to the YAML deserialization pipeline.
dotnet/src/Agents/Abstractions/Definition/AgentDefinition.cs Changes the Metadata property type to use AgentMetadata instead of a generic dictionary.
dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs Updates YAML tests to align with the new agent type identifier.

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

@markwallace-microsoft markwallace-microsoft merged commit 904d8f3 into microsoft:feature-declarative-agents Mar 5, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants