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
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.