Skip to content

Commit c798cb7

Browse files
authored
release: Mark Handoff Orchestrations Experimental (#5065)
1 parent 3446eb8 commit c798cb7

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

dotnet/samples/03-workflows/_StartHere/03_AgentWorkflowPatterns/03_AgentWorkflowPatterns.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<Nullable>enable</Nullable>
88
<ImplicitUsings>enable</ImplicitUsings>
9+
<NoWarn>$(NoWarn);MAAIW001</NoWarn> <!-- Handoff Orchestrations are Experimental -->
910
</PropertyGroup>
1011

1112
<ItemGroup>

dotnet/src/Microsoft.Agents.AI.Workflows/AgentWorkflowBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using System;
44
using System.Collections.Generic;
5+
using System.Diagnostics.CodeAnalysis;
56
using System.Linq;
67
using System.Threading.Tasks;
78
using Microsoft.Agents.AI.Workflows.Specialized;
@@ -154,6 +155,7 @@ private static Workflow BuildConcurrentCore(
154155
/// The <see cref="AIAgent"/> must be capable of understanding those <see cref="AgentRunOptions"/> provided. If the agent
155156
/// ignores the tools or is otherwise unable to advertize them to the underlying provider, handoffs will not occur.
156157
/// </remarks>
158+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
157159
public static HandoffWorkflowBuilder CreateHandoffBuilderWith(AIAgent initialAgent)
158160
{
159161
Throw.IfNull(initialAgent);

dotnet/src/Microsoft.Agents.AI.Workflows/HandoffsWorkflowBuilder.cs renamed to dotnet/src/Microsoft.Agents.AI.Workflows/HandoffWorkflowBuilder.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,37 @@
22

33
using System;
44
using System.Collections.Generic;
5+
using System.Diagnostics.CodeAnalysis;
56
using System.Linq;
67
using Microsoft.Agents.AI.Workflows.Specialized;
78
using Microsoft.Extensions.AI;
89
using Microsoft.Shared.Diagnostics;
910

1011
namespace Microsoft.Agents.AI.Workflows;
1112

13+
internal static class DiagnosticConstants
14+
{
15+
public const string ExperimentalFeatureDiagnostic = "MAAIW001";
16+
}
17+
1218
/// <inheritdoc/>
1319
[Obsolete("Prefer HandoffWorkflowBuilder (no 's') instead, which has the same API but the preferred name. This will be removed in a future release before GA.")]
20+
#pragma warning disable MAAIW001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
1421
public sealed class HandoffsWorkflowBuilder(AIAgent initialAgent) : HandoffWorkflowBuilderCore<HandoffsWorkflowBuilder>(initialAgent)
22+
#pragma warning restore MAAIW001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
1523
{
1624
}
1725

1826
/// <inheritdoc/>
27+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
1928
public sealed class HandoffWorkflowBuilder(AIAgent initialAgent) : HandoffWorkflowBuilderCore<HandoffWorkflowBuilder>(initialAgent)
2029
{
2130
}
2231

2332
/// <summary>
2433
/// Provides a builder for specifying the handoff relationships between agents and building the resulting workflow.
2534
/// </summary>
35+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
2636
public class HandoffWorkflowBuilderCore<TBuilder> where TBuilder : HandoffWorkflowBuilderCore<TBuilder>
2737
{
2838
/// <summary>

dotnet/src/Microsoft.Agents.AI.Workflows/Microsoft.Agents.AI.Workflows.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<IsReleased>true</IsReleased>
@@ -8,6 +8,7 @@
88
<PropertyGroup>
99
<InjectSharedThrow>true</InjectSharedThrow>
1010
<InjectIsExternalInitOnLegacy>true</InjectIsExternalInitOnLegacy>
11+
<InjectExperimentalAttributeOnLegacy>true</InjectExperimentalAttributeOnLegacy>
1112
<InjectTrimAttributesOnLegacy>true</InjectTrimAttributesOnLegacy>
1213
</PropertyGroup>
1314

dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/HandoffAgentExecutor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Generic;
55
using System.ComponentModel;
66
using System.Diagnostics;
7+
using System.Diagnostics.CodeAnalysis;
78
using System.Linq;
89
using System.Text.Json;
910
using System.Threading;
@@ -31,6 +32,7 @@ public HandoffAgentExecutorOptions(string? handoffInstructions, bool emitAgentRe
3132
public HandoffToolCallFilteringBehavior ToolCallFilteringBehavior { get; set; } = HandoffToolCallFilteringBehavior.HandoffOnly;
3233
}
3334

35+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
3436
internal sealed class HandoffMessagesFilter
3537
{
3638
private readonly HandoffToolCallFilteringBehavior _filteringBehavior;
@@ -40,6 +42,7 @@ public HandoffMessagesFilter(HandoffToolCallFilteringBehavior filteringBehavior)
4042
this._filteringBehavior = filteringBehavior;
4143
}
4244

45+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
4346
internal static bool IsHandoffFunctionName(string name)
4447
{
4548
return name.StartsWith(HandoffWorkflowBuilder.FunctionPrefix, StringComparison.Ordinal);
@@ -164,6 +167,7 @@ private class FilterCandidateState(string callId)
164167
}
165168

166169
/// <summary>Executor used to represent an agent in a handoffs workflow, responding to <see cref="HandoffState"/> events.</summary>
170+
[Experimental(DiagnosticConstants.ExperimentalFeatureDiagnostic)]
167171
internal sealed class HandoffAgentExecutor(
168172
AIAgent agent,
169173
HandoffAgentExecutorOptions options) : Executor<HandoffState, HandoffState>(agent.GetDescriptiveId(), declareCrossRunShareable: true), IResettableExecutor

dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Microsoft.Agents.AI.Workflows.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<NoWarn>$(NoWarn);MEAI001</NoWarn>
4+
<NoWarn>$(NoWarn);MEAI001;MAAIW001</NoWarn>
55
</PropertyGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)