// Copyright (c) Microsoft. All rights reserved. using System.Collections.Generic; using Microsoft.Shared.Diagnostics; namespace Microsoft.Agents.AI.Workflows; /// /// Represents an event triggered when an agent produces a response. /// public sealed class AgentResponseEvent : WorkflowOutputEvent { /// /// Initializes a new instance of the class. /// /// The identifier of the executor that generated this event. /// The agent response. public AgentResponseEvent(string executorId, AgentResponse response) : base(response, executorId) { this.Response = Throw.IfNull(response); } /// /// Initializes a new instance of the class with the given output tag. /// /// The identifier of the executor that generated this event. /// The agent response. /// The output tag to associate with this event. public AgentResponseEvent(string executorId, AgentResponse response, OutputTag tag) : base(response, executorId, tag) { this.Response = Throw.IfNull(response); } /// /// Initializes a new instance of the class with the given output tags. /// /// The identifier of the executor that generated this event. /// The agent response. /// The output tags to associate with this event. May be or empty. public AgentResponseEvent(string executorId, AgentResponse response, IEnumerable? tags) : base(response, executorId, tags) { this.Response = Throw.IfNull(response); } /// /// Gets the agent response. /// public AgentResponse Response { get; } }