Skip to content

.NET: AgentHostExecutor should use agent DisplayName as Executor ID#1840

Merged
TaoChenOSU merged 6 commits into
microsoft:mainfrom
TaoChenOSU:taochen/dotnet-agent-executor-should-use-display-name-as-executor-id
Nov 5, 2025
Merged

.NET: AgentHostExecutor should use agent DisplayName as Executor ID#1840
TaoChenOSU merged 6 commits into
microsoft:mainfrom
TaoChenOSU:taochen/dotnet-agent-executor-should-use-display-name-as-executor-id

Conversation

@TaoChenOSU

@TaoChenOSU TaoChenOSU commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Motivation and Context

Addresses: #1743

Description

  1. Use agent DisplayName as Executor ID
  2. Add unit tests

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.

@TaoChenOSU TaoChenOSU self-assigned this Oct 31, 2025
Copilot AI review requested due to automatic review settings October 31, 2025 18:08
@TaoChenOSU TaoChenOSU added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Oct 31, 2025
@TaoChenOSU TaoChenOSU requested a review from lokitoth October 31, 2025 18:09
@github-actions github-actions Bot changed the title AgentHostExecutor should use agent DisplayName as Executor ID .NET: AgentHostExecutor should use agent DisplayName as Executor ID Oct 31, 2025

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

This PR updates the executor ID assignment for AI agents in workflows to use the agent's DisplayName instead of Id. This allows agent names to be used as executor IDs when provided, with automatic fallback to the agent ID when no name is specified.

Key changes:

  • Modified ExecutorIsh.Id property to return DisplayName for Agent type executors
  • Added unit tests to verify executor IDs use agent names when provided and fall back to agent IDs otherwise

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorIsh.cs Changed Agent type executor ID from agent.Id to agent.DisplayName
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/SpecializedExecutorSmokeTests.cs Added tests verifying executor IDs match agent names when provided, and agent IDs when not provided

Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorIsh.cs Outdated
Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/AIAgentHostExecutor.cs Outdated
Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/AIAgentHostExecutor.cs Outdated
@markwallace-microsoft markwallace-microsoft added the python Usage: [Issues, PRs], Target: Python label Nov 5, 2025
@github-actions github-actions Bot changed the title .NET: AgentHostExecutor should use agent DisplayName as Executor ID Python: .NET: AgentHostExecutor should use agent DisplayName as Executor ID Nov 5, 2025
@markwallace-microsoft

markwallace-microsoft commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL12840191185% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
1702 107 💤 0 ❌ 0 🔥 34.856s ⏱️

@TaoChenOSU TaoChenOSU changed the title Python: .NET: AgentHostExecutor should use agent DisplayName as Executor ID .NET: AgentHostExecutor should use agent DisplayName as Executor ID Nov 5, 2025
@TaoChenOSU TaoChenOSU removed the python Usage: [Issues, PRs], Target: Python label Nov 5, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Nov 5, 2025
Merged via the queue into microsoft:main with commit 3f835c8 Nov 5, 2025
14 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/dotnet-agent-executor-should-use-display-name-as-executor-id branch November 5, 2025 22:36
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…icrosoft#1840)

* AgentHostExecutor should use agent DisplayName as Executor ID

* Address comments

* Remove unintended changes

* Remove unintended changes

* Fix tests and address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants