@adcp/client API Reference - v3.3.3
    Preparing search index...

    Function detectProtocol

    • Detect protocol for a given agent URL

      Uses a hybrid approach:

      1. Check URL patterns (fast heuristic)
      2. Try A2A discovery endpoint (authoritative)
      3. Default to MCP if A2A discovery fails

      Parameters

      • url: string

        Agent URL to check

      Returns Promise<"mcp" | "a2a">

      Promise resolving to 'a2a' or 'mcp'