diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/MagenticWorkflowBuilder.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/MagenticWorkflowBuilder.cs index ad620f6fc1..4470c4ee9a 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/MagenticWorkflowBuilder.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/MagenticWorkflowBuilder.cs @@ -145,7 +145,7 @@ public class MagenticWorkflowBuilder(AIAgent managerAgent) { if (this._team.Count == 0) { - throw new InvalidOperationException("At least one participant must be added before building a Magentic workflow."); + throw new InvalidOperationException("At least one participant must be added via AddParticipants() before building the workflow."); } return this.ReduceToWorkflowBuilder().Build(); diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/MagenticOrchestrator.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/MagenticOrchestrator.cs index f18106b4d4..30a93c6850 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/MagenticOrchestrator.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/MagenticOrchestrator.cs @@ -147,7 +147,7 @@ internal class MagenticOrchestrator(AIAgent managerAgent, List team, Ta if (this._taskContext.IsTerminated) { - throw new InvalidOperationException("Magentic Orchestration has already been terminated and cannot process new messages. Please start a new session."); + throw new InvalidOperationException("This Magentic orchestration has already terminated. To process new messages, create a new workflow instance."); } if (response.IsApproved) @@ -190,7 +190,7 @@ internal class MagenticOrchestrator(AIAgent managerAgent, List team, Ta { if (this._taskContext?.IsTerminated == true) { - throw new InvalidOperationException("Magentic Orchestration has already been terminated and cannot process new messages. Please start a new session."); + throw new InvalidOperationException("This Magentic orchestration has already terminated. To process new messages, create a new workflow instance."); } if (this._taskContext == null)