Share via


ChatForwardingExecutor Class

Definition

A ChatProtocol executor that forwards all messages it receives. Useful for splitting inputs into parallel processing paths.

public sealed class ChatForwardingExecutor : Microsoft.Agents.AI.Workflows.Executor, Microsoft.Agents.AI.Workflows.IResettableExecutor
type ChatForwardingExecutor = class
    inherit Executor
    interface IResettableExecutor
Public NotInheritable Class ChatForwardingExecutor
Inherits Executor
Implements IResettableExecutor
Inheritance
ChatForwardingExecutor
Implements

Remarks

This executor is designed to be cross-run shareable and can be reset to its initial state. It handles multiple chat-related types, enabling flexible message forwarding scenarios. Thread safety and reusability are ensured by its design.

Constructors

Name Description
ChatForwardingExecutor(String, ChatForwardingExecutorOptions)

A ChatProtocol executor that forwards all messages it receives. Useful for splitting inputs into parallel processing paths.

Properties

Name Description
Id

A unique identifier for the executor.

(Inherited from Executor)
InputTypes

A set of Types, representing the messages this executor can handle.

(Inherited from Executor)
Options

Gets the configuration options for the executor.

(Inherited from Executor)
OutputTypes

A set of Types, representing the messages this executor can produce as output.

(Inherited from Executor)

Methods

Name Description
CanHandle(Type)

Checks if the executor can handle a specific message type.

(Inherited from Executor)
ConfigureRoutes(RouteBuilder)

Override this method to register handlers for the executor.

(Inherited from Executor)
ConfigureSentTypes()

Override this method to declare the types of messages this executor can send.

(Inherited from Executor)
ConfigureYieldTypes()

Override this method to declare the types of messages this executor can yield as workflow outputs.

(Inherited from Executor)
DescribeProtocol()

Describes the protocol for communication with this Executor.

(Inherited from Executor)
ExecuteAsync(Object, TypeId, IWorkflowContext, CancellationToken)

Process an incoming message using the registered handlers.

(Inherited from Executor)
InitializeAsync(IWorkflowContext, CancellationToken)

Perform any asynchronous initialization required by the executor. This method is called once per executor instance,

(Inherited from Executor)
OnCheckpointingAsync(IWorkflowContext, CancellationToken)

Invoked before a checkpoint is saved, allowing custom pre-save logic in derived classes.

(Inherited from Executor)
OnCheckpointRestoredAsync(IWorkflowContext, CancellationToken)

Invoked after a checkpoint is loaded, allowing custom post-load logic in derived classes.

(Inherited from Executor)
ResetAsync()

Reset the executor

Extension Methods

Name Description
BindExecutor(Executor)

Configures an Executor instance for use in a workflow.

Applies to