Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Motivation and Context

The MS Agent Framework A2A Agent needs to pass additional properties, represented by the MEAI.AdditionalPropertiesDictionary type, as A2A metadata, represented by a Dictionary<string, JsonElement>, to an A2A agent via the A2A SDK. Similarly, on the way back, metadata from the A2A agent response (task or message) returned by the A2A SDK needs to be converted back to the additional properties.

The A2A .NET SDK already has several extension methods to convert between MEAI and A2A entities, which can be found here: https://github.com/a2aproject/a2a-dotnet/tree/main/src/A2A/Extensions. This PR adds one more extension method and exposes another one that was previously private as a public one.

Copilot AI changed the title [WIP] Move AIContentExtensions method and add ToA2AMetadata Add AdditionalPropertiesExtensions with ToAdditionalProperties and ToA2AMetadata methods Jan 8, 2026
Copilot AI requested a review from SergeyMenshykh January 8, 2026 10:32
@SergeyMenshykh
Copy link
Collaborator

@copilot Move the new extension class to the Microsoft.Extensions.AI namespace.

Copy link
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot Move the new extension class to the Microsoft.Extensions.AI namespace.

Done in 08d8214. Moved AdditionalPropertiesExtensions class from A2A namespace to Microsoft.Extensions.AI namespace.

@SergeyMenshykh SergeyMenshykh changed the title Add AdditionalPropertiesExtensions with ToAdditionalProperties and ToA2AMetadata methods feat: Add AdditionalPropertiesExtensions with ToAdditionalProperties and ToA2AMetadata methods Jan 8, 2026
@SergeyMenshykh SergeyMenshykh marked this pull request as ready for review January 8, 2026 11:06
Copy link
Collaborator

@rokonec rokonec left a comment

Choose a reason for hiding this comment

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

LGTM, but I would like to understand the motivation better.

@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit 45556dc Jan 8, 2026
6 of 8 checks passed
@SergeyMenshykh SergeyMenshykh deleted the copilot/move-to-additional-properties-extensions branch January 8, 2026 18:54
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.

4 participants