Skip to content

.NET: release: Mark Handoff Orchestrations Experimental#5065

Merged
lokitoth merged 4 commits into
mainfrom
dev/af_workflow/mark_handoffs_experimental
Apr 2, 2026
Merged

.NET: release: Mark Handoff Orchestrations Experimental#5065
lokitoth merged 4 commits into
mainfrom
dev/af_workflow/mark_handoffs_experimental

Conversation

@lokitoth

@lokitoth lokitoth commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Handoff Orchestrations are still under development, and should be marked Experimental so consumers can be ready for potential breaking changes and behaviour fixes.

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.

Copilot AI review requested due to automatic review settings April 2, 2026 15:17
@markwallace-microsoft markwallace-microsoft added .NET workflows Related to Workflows in agent-framework labels Apr 2, 2026
@github-actions github-actions Bot changed the title release: Mark Handoff Orchestrations Experimental .NET: release: Mark Handoff Orchestrations Experimental Apr 2, 2026
@lokitoth lokitoth enabled auto-merge April 2, 2026 15:21
Comment thread dotnet/src/Microsoft.Agents.AI.Workflows/HandoffWorkflowBuilder.cs

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

Marks the Workflows “handoff orchestration” surface as experimental so downstream consumers get explicit warnings about potential breaking changes while the feature is still in development.

Changes:

  • Annotates handoff-related builders/executors with System.Diagnostics.CodeAnalysis.Experimental.
  • Introduces a new experimental diagnostic ID (MAAIW001) and suppresses it in the workflows unit tests and one workflows sample.
  • Enables legacy-framework support for ExperimentalAttribute via InjectExperimentalAttributeOnLegacy.

Reviewed changes

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

Show a summary per file
File Description
dotnet/src/Microsoft.Agents.AI.Workflows/HandoffWorkflowBuilder.cs Adds experimental annotations and introduces MAAIW001 via a new DiagnosticConstants.
dotnet/src/Microsoft.Agents.AI.Workflows/AgentWorkflowBuilder.cs Marks CreateHandoffBuilderWith as experimental.
dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/HandoffAgentExecutor.cs Marks handoff executor/filter internals as experimental.
dotnet/src/Microsoft.Agents.AI.Workflows/Microsoft.Agents.AI.Workflows.csproj Injects ExperimentalAttribute for non-net8 targets.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Microsoft.Agents.AI.Workflows.UnitTests.csproj Suppresses MAAIW001 warnings for the test project.
dotnet/samples/03-workflows/_StartHere/03_AgentWorkflowPatterns/03_AgentWorkflowPatterns.csproj Suppresses MAAIW001 warnings for the sample project.
Comments suppressed due to low confidence (2)

dotnet/src/Microsoft.Agents.AI.Workflows/HandoffWorkflowBuilder.cs:16

  • The repo already centralizes experimental diagnostic IDs in Microsoft.Shared.DiagnosticIds.DiagnosticIds (e.g., it states MAAI001 is used for all experimental features). Introducing a new local ID (MAAIW001) here forces new suppressions in tests/samples and for downstream consumers. Consider reusing DiagnosticIds.Experiments.AgentsAIExperiments (or adding the ID to the shared DiagnosticIds list if a separate ID is required) instead of defining a new local DiagnosticConstants class in this file.
    dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/HandoffAgentExecutor.cs:49
  • The method-level [Experimental] attribute is redundant because the containing type (HandoffMessagesFilter) is already marked [Experimental]. Keeping it duplicated increases annotation noise and can make future edits harder; consider removing the member-level attribute unless you specifically need a different diagnostic ID/message for the method.
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
internal sealed class HandoffMessagesFilter
{
    private readonly HandoffToolCallFilteringBehavior _filteringBehavior;

    public HandoffMessagesFilter(HandoffToolCallFilteringBehavior filteringBehavior)
    {
        this._filteringBehavior = filteringBehavior;
    }

    [Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
    internal static bool IsHandoffFunctionName(string name)
    {
        return name.StartsWith(HandoffWorkflowBuilder.FunctionPrefix, StringComparison.Ordinal);
    }

@lokitoth lokitoth added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit c798cb7 Apr 2, 2026
21 checks passed
alliscode pushed a commit to alliscode/agent-framework that referenced this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET workflows Related to Workflows in agent-framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants