Table of Contents

Class MultiTurnExecutor

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

Multi-turn subagent executor — runs its own conversation loop with tool calling, continuing until the agent signals completion or hits the turn limit.

public sealed class MultiTurnExecutor : ISubagentExecutor
Inheritance
MultiTurnExecutor
Implements
Inherited Members

Methods

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

Execute a subagent with the given configuration and optional team context.

public Task<AgentResult> ExecuteAsync(SubagentConfig config, AgentSession parentSession, TeamContext? teamContext = null, Action<SubagentProgress>? onProgress = null, CancellationToken ct = default)

Parameters

config SubagentConfig

Agent configuration (type, prompt, tools, etc.)

parentSession AgentSession

Parent agent session for kernel/service access.

teamContext TeamContext

Optional team context for shared state. Null for standalone agents.

onProgress Action<SubagentProgress>

Optional callback for real-time progress updates.

ct CancellationToken

Cancellation token.

Returns

Task<AgentResult>

The agent's execution result.