Type of the context object passed to the sub-agent. This allows for type-safe context propagation from parent to sub-agent. Defaults to any for backward compatibility.
OptionalcontextContext data passed to the sub-agent by the parent agent. This context flows through the entire execution hierarchy, allowing sub-agents to access runtime-specific configuration, environment settings, and shared state from their parent agents. Optional because AI determines sub-agent invocation, context comes from execution params.
Context and instructions for the sub-agent
Name of the sub-agent
OptionaltemplateOptional template parameters for sub-agent invocation
Whether to terminate the parent agent after sub-agent completes
Represents a sub-agent invocation request.
Example