langchain.js
    Preparing search index...
    • Extracts the parent tool call ID from a namespace.

      For nested subagents, the namespace looks like: ["tools:parent_id", "tools:child_id", ...]

      Parameters

      • namespace: undefined | string[]

        The namespace array

      Returns null | string

      The parent tool call ID, or null if this is a top-level subagent