langchain.js
    Preparing search index...
    • Calculates the depth of a subagent based on its namespace. Counts the number of "tools:" segments in the namespace.

      Parameters

      • namespace: undefined | string[]

        The namespace array

      Returns number

      The depth (0 for main agent, 1+ for subagents)