Table of Contents

Class RelayStrategy

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

Relay strategy — agents process sequentially, each refining the previous output. Like a relay race where each runner adds their specialized perspective. Good for: document writing, iterative improvement, multi-perspective analysis.

public sealed class RelayStrategy : IOrchestrationStrategy
Inheritance
RelayStrategy
Implements
Inherited Members

Properties

Name

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

public string Name { get; }

Property Value

string

PassPromptTemplate

Template for prompts passed to each relay agent. Supports {previous_output} and {focus_area} placeholders.

public string PassPromptTemplate { get; init; }

Property Value

string

StopEarly

When true, stop early if an agent reports no changes needed.

public bool StopEarly { get; init; }

Property Value

bool

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>