Table of Contents

Class RoundRobinOrchestrator

Namespace
AutoGen.Core
Assembly
AutoGen.Core.dll

Return the next agent in a round-robin fashion.

If the last message is from one of the candidates, the next agent will be the next candidate in the list.

Otherwise, the first agent in Candidates will be returned.

public class RoundRobinOrchestrator : IOrchestrator
Inheritance
RoundRobinOrchestrator
Implements
Inherited Members

Methods

GetNextSpeakerAsync(OrchestrationContext, CancellationToken)

Return the next agent as the next speaker. return null if no agent is selected.

public Task<IAgent?> GetNextSpeakerAsync(OrchestrationContext context, CancellationToken cancellationToken = default)

Parameters

context OrchestrationContext

orchestration context, such as candidate agents and chat history.

cancellationToken CancellationToken

cancellation token

Returns

Task<IAgent>