Skip to content

.NET: Would it be possible to support using the Foundry agent name as the executor ID in .NET workflow events #1743

Closed

Description

@huimiu

When an Azure AI Foundry agent is used as an executor without being declared, the workflow event shows the agent ID (like asst_xxx) as executor ID, whereas Python uses the agent name instead.

Since the agent ID isn’t readable and can’t be set manually, when there are many agents in a workflow, it becomes hard for users to tell them apart in the events. Would it be possible to support using the Foundry agent name as the executor ID in .NET events?

.NET workflow events example:

Activity.TraceId:            087259975a442c146e6da8bfaf98aabe
Activity.SpanId:             947ac221290835ec
Activity.TraceFlags:         Recorded
Activity.DisplayName:        workflow.build
Activity.Kind:               Internal
Activity.StartTime:          2025-10-28T10:04:54.3627375Z
Activity.Duration:           00:00:00.0348017
Activity.Tags:
    workflow.id: asst_4L2sK7wXhSOTVdXMQG6MO3W3
    workflow.definition: {"executors":{"**asst_4L2sK7wXhSOTVdXMQG6MO3W3**":{"executorType":{"assemblyName":"Microsoft.Agents.AI.Workflows, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3","typeName":"Microsoft.Agents.AI.Workflows.Specialized.AIAgentHostExecutor"},"executorId":"asst_4L2sK7wXhSOTVdXMQG6MO3W3"},"**asst_QM21zxqGySqOFt3B1GTgZuJx**":{"executorType":{"assemblyName":"Microsoft.Agents.AI.Workflows, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3","typeName":"Microsoft.Agents.AI.Workflows.Specialized.AIAgentHostExecutor"},"executorId":"asst_QM21zxqGySqOFt3B1GTgZuJx"}},"edges":{"asst_4L2sK7wXhSOTVdXMQG6MO3W3":[{"$type":0,"hasCondition":false,"kind":0,"connection":{"sourceIds":["asst_4L2sK7wXhSOTVdXMQG6MO3W3"],"sinkIds":["asst_QM21zxqGySqOFt3B1GTgZuJx"]}}]},"requestPorts":[],"startExecutorId":"asst_4L2sK7wXhSOTVdXMQG6MO3W3","outputExecutorIds":["asst_QM21zxqGySqOFt3B1GTgZuJx"]}
Activity.Events:
    build.started [10/28/2025 10:04:54 AM +00:00]
    build.validation_completed [10/28/2025 10:04:54 AM +00:00]
    build.completed [10/28/2025 10:04:54 AM +00:00]
Instrumentation scope (ActivitySource):
    Name: Microsoft.Agents.AI.Workflows
Resource associated with Activity:
    service.name: WorkflowSample
    service.instance.id: 6e78d367-263f-4c66-8c48-bab3f9566cc1
    telemetry.sdk.name: opentelemetry
    telemetry.sdk.language: dotnet
    telemetry.sdk.version: 1.12.0

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 28, 2025
  2. changed the title [-].NET: Would it be possible to support using the Foundry agent name as the executor ID in .NET workflow events[/-] [+]Python: .NET: Would it be possible to support using the Foundry agent name as the executor ID in .NET workflow events[/+] on Oct 28, 2025
  3. added
    workflowsUsage: [Issues, PRs], Target: Workflows
    and removed
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 28, 2025
  4. lokitoth commented on Oct 28, 2025

    @lokitoth
    Contributor

    The Python way seems like what we should be doing by default.

    Since Name can be null in .NET, I am going to still have it fall back to Id.

  5. changed the title [-]Python: .NET: Would it be possible to support using the Foundry agent name as the executor ID in .NET workflow events[/-] [+].NET: Would it be possible to support using the Foundry agent name as the executor ID in .NET workflow events[/+] on Oct 28, 2025
  6. stephentoub commented on Oct 28, 2025

    @stephentoub
    Member

    Since Name can be null in .NET, I am going to still have it fall back to Id.

    For reference, DisplayName does that

  7. TaoChenOSU commented on Dec 5, 2025

    @TaoChenOSU
    Contributor

    Closed by #1840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions