Table of Contents

Interface ISubagentExecutor

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

Abstraction over single-turn and multi-turn subagent execution.

public interface ISubagentExecutor

Methods

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

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

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.