Skip to content

Conversation

@DeagleGross
Copy link
Contributor

In the previous fix (#2047) I've incorrectly pointed agentCard's URL to agent card instead of the agent endpoint.
This PR fixes the AgentCard URL to correct value.

Fixes #2386

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copy link
Contributor

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 corrects a bug in the AgentCard URL assignment. The previous implementation incorrectly pointed the agentCard's URL to the card endpoint (/v1/card), when it should point to the agent endpoint itself.

Changes:

  • Simplified URL assignment logic in AIAgentExtensions.cs to set the agentCard URL to the agent endpoint
  • Updated test assertion to verify the URL points to the agent endpoint instead of the card endpoint

Reviewed changes

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

File Description
dotnet/src/Microsoft.Agents.AI.Hosting.A2A/AIAgentExtensions.cs Removed conditional logic that was incorrectly appending "/v1/card" to the agentCard URL, now correctly assigns the agent endpoint URL
dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AIntegrationTests.cs Updated test assertion to verify agentCard URL points to agent endpoint ("/a2a/test-agent") instead of card endpoint ("/a2a/test-agent/v1/card")

@DeagleGross DeagleGross added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 5faa285 Jan 13, 2026
14 checks passed
@DeagleGross DeagleGross deleted the dmkorolev/agentcardurl2 branch January 13, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A2A Agent Card URL Configuration Issue

5 participants