AgentResponseEvent Class

Definition

Represents an event triggered when an agent produces a response.

public sealed class AgentResponseEvent : Microsoft.Agents.AI.Workflows.WorkflowOutputEvent
type AgentResponseEvent = class
    inherit WorkflowOutputEvent
Public NotInheritable Class AgentResponseEvent
Inherits WorkflowOutputEvent
Inheritance

Constructors

Name Description
AgentResponseEvent(String, AgentResponse, IEnumerable<OutputTag>)

Initializes a new instance of the AgentResponseEvent class with the given output tags.

AgentResponseEvent(String, AgentResponse, OutputTag)

Initializes a new instance of the AgentResponseEvent class with the given output tag.

AgentResponseEvent(String, AgentResponse)

Initializes a new instance of the AgentResponseEvent class.

Properties

Name Description
Data

Optional payload

(Inherited from WorkflowEvent)
ExecutorId

The unique identifier of the executor that yielded this output.

(Inherited from WorkflowOutputEvent)
Response

Gets the agent response.

SourceId
Obsolete.

The unique identifier of the executor that yielded this output.

(Inherited from WorkflowOutputEvent)
Tags

The set of output tags associated with this event. Never null; empty for terminal/regular outputs. The presence of Intermediate marks this event as an intermediate output.

(Inherited from WorkflowOutputEvent)

Methods

Name Description
As<T>()

Attempts to retrieve the underlying data as the specified type.

(Inherited from WorkflowOutputEvent)
AsType(Type)

Attempts to retrieve the underlying data as the specified type.

(Inherited from WorkflowOutputEvent)
HasTag(OutputTag)

Returns true if this event carries the given tag.

(Inherited from WorkflowOutputEvent)
Is<T>()

Determines whether the underlying data is of the specified type or a derived type.

(Inherited from WorkflowOutputEvent)
Is<T>(T)

Determines whether the underlying data is of the specified type or a derived type, and returns it as that type if it is.

(Inherited from WorkflowOutputEvent)
IsType(Type)

Determines whether the underlying data is of the specified type or a derived type.

(Inherited from WorkflowOutputEvent)
ToString() (Inherited from WorkflowEvent)

Extension Methods

Name Description
IsIntermediate(WorkflowOutputEvent)

Returns true if the event carries Intermediate in its Tags.

Applies to