langchain.js
    Preparing search index...

    Interface SubagentToolCall<SubagentName>

    Represents a tool call that initiated a subagent.

    interface SubagentToolCall<SubagentName extends string = string> {
        args: {
            description?: string;
            subagent_type?: SubagentName;
            [key: string]: unknown;
        };
        id: string;
        name: string;
    }

    Type Parameters

    • SubagentName extends string = string

      The subagent name type. When inferred from a DeepAgent, this is a union of all subagent names (e.g. "researcher" | "writer"), making args.subagent_type a typed discriminant.

    Index

    Properties

    Properties

    args: {
        description?: string;
        subagent_type?: SubagentName;
        [key: string]: unknown;
    }

    The arguments passed to the tool

    Type Declaration

    • [key: string]: unknown

      Additional custom arguments

    • Optionaldescription?: string

      The task description for the subagent

    • Optionalsubagent_type?: SubagentName

      The type of subagent to use

    id: string

    The tool call ID

    name: string

    The name of the tool (typically "task")