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
Name
The strategy name (sequential, fan-out, supervisor, debate).
public string Name { get; }
Property Value
Weights
Per-agent weight multipliers (optional). Key = agent name.
public IReadOnlyDictionary<string, double>? Weights { get; init; }
Property Value
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
agentsIReadOnlyList<SubagentConfig>contextTeamContextexecutorISubagentExecutorparentSessionAgentSessiononProgressAction<SubagentProgress>ctCancellationToken