Class SingleTurnExecutor
- Namespace
- JD.AI.Core.Agents.Orchestration
- Assembly
- JD.AI.Core.dll
Single-turn subagent executor — sends one prompt and returns the response. Equivalent to the original SubagentRunner.RunAsync behavior.
public sealed class SingleTurnExecutor : ISubagentExecutor
- Inheritance
-
SingleTurnExecutor
- 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
configSubagentConfigAgent configuration (type, prompt, tools, etc.)
parentSessionAgentSessionParent agent session for kernel/service access.
teamContextTeamContextOptional team context for shared state. Null for standalone agents.
onProgressAction<SubagentProgress>Optional callback for real-time progress updates.
ctCancellationTokenCancellation token.
Returns
- Task<AgentResult>
The agent's execution result.