langchain.js
    Preparing search index...
    • Create a tool that can handoff control to the requested agent.

      Parameters

      • params: { agentName: string; description?: string }

        Parameters for the handoff tool.

        • agentName: string

          The name of the agent to handoff control to, i.e. the name of the agent node in the multi-agent graph.

          Agent names should be simple, clear and unique, preferably in snake_case, although you are only limited to the names accepted by LangGraph nodes as well as the tool names accepted by LLM providers (the tool name will look like this: transfer_to_<agent_name>).

        • Optionaldescription?: string

          Optional description for the handoff tool.

      Returns DynamicStructuredTool<ZodObject<{}, "strip", ZodTypeAny, {}, {}>, {}, {}, any>