Table of Contents

Class VotingStrategy

Namespace
JD.AI.Core.Agents.Orchestration.Strategies
Assembly
JD.AI.Core.dll

Voting strategy — N agents independently process the same input. Results are aggregated by configurable voting (majority, weighted confidence). Good for: code review consensus, classification, risk assessment.

public sealed class VotingStrategy : IOrchestrationStrategy
Inheritance
VotingStrategy
Implements
Inherited Members

Properties

Method

Voting method to determine the final result.

public VotingMethod Method { get; init; }

Property Value

VotingMethod

Name

The strategy name (sequential, fan-out, supervisor, debate).

public string Name { get; }

Property Value

string

Weights

Per-agent weight multipliers (optional). Key = agent name.

public IReadOnlyDictionary<string, double>? Weights { get; init; }

Property Value

IReadOnlyDictionary<string, double>

Methods

ExecuteAsync(IReadOnlyList<SubagentConfig>, TeamContext, ISubagentExecutor, AgentSession, Action<SubagentProgress>?, CancellationToken)

Execute the orchestration strategy with the given agents, context, and executor.

public Task<TeamResult> ExecuteAsync(IReadOnlyList<SubagentConfig> agents, TeamContext context, ISubagentExecutor executor, AgentSession parentSession, Action<SubagentProgress>? onProgress = null, CancellationToken ct = default)

Parameters

agents IReadOnlyList<SubagentConfig>
context TeamContext
executor ISubagentExecutor
parentSession AgentSession
onProgress Action<SubagentProgress>
ct CancellationToken

Returns

Task<TeamResult>