Remove clickable hyperlink from agent endpoint and redirect to invocation docs#6695
Remove clickable hyperlink from agent endpoint and redirect to invocation docs#6695
Conversation
…note - Update artifact.go to only use hyperlinks for endpoints with LocationKind=Remote - Add support for 'note' metadata field in artifact rendering - Set agent endpoint LocationKind to UNSPECIFIED to make it non-clickable - Add note pointing to aka.ms/azd-agents-invoke for agent invocation docs Fixes #6659
3ad59d3 to
1e88cc7
Compare
There was a problem hiding this comment.
Pull request overview
This PR attempts to address user confusion when clicking on agent endpoints after deployment, which results in 401 errors. The goal is to remove the clickable hyperlink from agent endpoints and add a documentation reference to guide users on proper agent invocation.
Changes:
- Modified endpoint artifact display logic to conditionally make endpoints clickable based on LocationKind
- Added support for displaying note metadata beneath endpoint artifacts
- Changed agent endpoint LocationKind from REMOTE to UNSPECIFIED to prevent hyperlinking
- Added documentation URL as note metadata for agent endpoints
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| cli/azd/pkg/project/artifact.go | Added conditional hyperlinking based on LocationKind and note metadata display support |
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go | Changed agent endpoint LocationKind to UNSPECIFIED and added documentation URL in note metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go
Outdated
Show resolved
Hide resolved
| "agentName": agentName, | ||
| "agentVersion": agentVersion, | ||
| "label": "Agent endpoint", | ||
| "note": "For consuming agent endpoint, refer to https://aka.ms/azd-agents-invoke", |
There was a problem hiding this comment.
The PR description references the full Microsoft Learn documentation URL (https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/hosted-agents?view=foundry#invoke-hosted-agents), but the implementation uses a short URL (https://aka.ms/azd-agents-invoke). While using a short URL may be intentional for better user experience, it's unclear whether this aka.ms link is configured to redirect to the correct destination specified in the issue.
There was a problem hiding this comment.
@rajeshkamal5050 this aka.ms link doesn't exist - is this the right link?
There was a problem hiding this comment.
@tinaem can you help with create an aka.ms like for this - https://aka.ms/azd-agents-invoke pointing to https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/hosted-agents?view=foundry#invoke-hosted-agents so we can use it?
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
LGTM thanks @JeffreyCA |

Users were clicking the agent endpoint URL after deployment and receiving 401 errors. The endpoint requires proper authentication via SDK/API calls, not direct browser access.
Changes
Modified artifact display for agent endpoints (
pkg/project/artifact.go)"Agent endpoint"Added unit tests (
pkg/project/artifact_test.go)Output
Before:
After:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.