Language

RoundRobinGroupChatManager Class

Definition

Provides a GroupChatManager that selects agents in a round-robin fashion.

public class RoundRobinGroupChatManager : Microsoft.Agents.AI.Workflows.GroupChatManager
type RoundRobinGroupChatManager = class
    inherit GroupChatManager
Public Class RoundRobinGroupChatManager
Inherits GroupChatManager
Inheritance
RoundRobinGroupChatManager

Constructors

Name Description
RoundRobinGroupChatManager(IReadOnlyList<AIAgent>, Func<RoundRobinGroupChatManager,IEnumerable<ChatMessage>,CancellationToken,ValueTask<Boolean>>)

Initializes a new instance of the RoundRobinGroupChatManager class.

Properties

Name Description
IterationCount

Gets the number of iterations in the group chat so far.

(Inherited from GroupChatManager)
MaximumIterationCount

Gets or sets the maximum number of iterations allowed.

(Inherited from GroupChatManager)

Methods

Name Description
OnCheckpointingAsync(IWorkflowContext, CancellationToken)

Invoked when the hosting group chat workflow is checkpointing, giving subclasses a chance to persist any additional state they maintain (e.g., a round-robin cursor or an LLM session).

OnCheckpointRestoredAsync(IWorkflowContext, CancellationToken)

Invoked when the hosting group chat workflow is being restored from a checkpoint, giving subclasses a chance to hydrate any additional state they persisted in OnCheckpointingAsync(IWorkflowContext, CancellationToken).

Reset()

Resets the state of the manager for a new group chat session.

SelectNextAgentAsync(IReadOnlyList<ChatMessage>, CancellationToken)

Selects the next agent to participate in the group chat based on the provided chat history and team.

ShouldTerminateAsync(IReadOnlyList<ChatMessage>, CancellationToken)

Determines whether the group chat should be terminated based on the provided chat history and iteration count.

UpdateHistoryAsync(IReadOnlyList<ChatMessage>, CancellationToken)

Filters the messages broadcast to participants for the current turn.

(Inherited from GroupChatManager)

Applies to