Skip to content

feat: add foundry skill user agent in azd ai agent - #9726

Merged
anchenyi merged 2 commits into
mainfrom
anchenyi/azd-ai-skill-user-agent
Aug 26, 2026
Merged

feat: add foundry skill user agent in azd ai agent#9726
anchenyi merged 2 commits into
mainfrom
anchenyi/azd-ai-skill-user-agent

Conversation

@anchenyi

@anchenyi anchenyi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Foundry Skill User-Agent to requests sent by the azure.ai.agents extension to Microsoft Foundry services.

When AZURE_DEV_USER_AGENT contains microsoft_foundry_skill, existing Foundry service request User-Agent values append microsoft-foundry-skill/1.0.

This enables Foundry service-side attribution.

Validation

  • Added unit tests for User-Agent construction
  • Verified the environment value is not forwarded
  • Ran affected Go tests
  • Ran go build ./...

Fixes: #9727

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
20 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Centralizes Azure AI Agents extension User-Agent construction and adds Foundry skill attribution when invoked with the designated environment marker.

Changes:

  • Adds shared User-Agent helpers and tests.
  • Applies Foundry skill attribution across API, ARM, connection, streaming, and doctor requests.
  • Preserves existing client-specific User-Agent values.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/pkg/useragent/user_agent.go Defines shared User-Agent generation.
internal/pkg/useragent/user_agent_test.go Tests skill attribution behavior.
internal/pkg/azure/foundry_toolsets_client.go Uses the shared default User-Agent.
internal/pkg/azure/foundry_projects_client.go Uses the shared default User-Agent.
internal/pkg/azure/foundry_memory_store_client.go Uses the shared default User-Agent.
internal/pkg/azure/client_options.go Applies the shared User-Agent to ARM clients.
internal/pkg/agents/optimize_api/client.go Tags optimization requests.
internal/pkg/agents/eval_api/operations.go Tags evaluation requests.
internal/pkg/agents/dataset_api/operations.go Tags dataset requests.
internal/pkg/agents/agent_api/operations.go Tags agent and log-stream requests.
internal/connections/pkg/connections/data_client.go Tags connection requests.
internal/cmd/doctor/checks_foundry_endpoint.go Tags doctor probe requests.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cli/azd/extensions/azure.ai.agents/internal/pkg/agents/optimize_api/client.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/pkg/agents/eval_api/operations.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/pkg/agents/dataset_api/operations.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations.go Outdated
Comment thread cli/azd/extensions/azure.ai.agents/internal/pkg/azure/client_options.go Outdated
@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag Rick Winter (@RickWinter) and Kristen Womack (@kristenwomack) to let us know.

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Aug 25, 2026
Copilot AI review requested due to automatic review settings August 25, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about the other extensions?

@anchenyi

anchenyi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

What about the other extensions?

Travis Angevine (@trangevi) right now, we just need to analyze hosted agent BI data, so azure.ai.agent extension is enough.

@anchenyi
anchenyi merged commit 41dd0ed into main Aug 26, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Foundry Skill attribution to azd ai agent service requests

4 participants