custom-metrics icon indicating copy to clipboard operation
custom-metrics copied to clipboard

Update agent-card.json for A2A Protocol

Open tsunoyu opened this issue 3 months ago • 8 comments

Description

This PR adds support for tracking and analyzing a critical file related to AI Agent discovery and communication:

  1. Agent Card: /.well-known/agent-card.json

This file is central to the Agent2Agent (A2A) Protocol and serves as the agent's digital business card. It's used by clients to discover the agent's identity, capabilities, service endpoints, and security requirements. The changes ensure this file is fetched, parsed, and included in the HTTP Archive's custom metrics for analysis of emerging AI agent standards adoption.

Changes

  1. Added a new parseResponse call for /.well-known/agent-card.json to track its presence, structure, and key metadata (e.g., agent name, version, and declared skills).

Example Output

Agent Card (/.well-known/agent-card.json)

{
  "/.well-known/agent-card.json": {
    "found": true,
    "data": {
      "url": "https://agent.example.com/a2a",
      "preferredTransport": "http",
      "protocolVersion": "0.3.0",
      "name": "Example Service Agent",
      "description": "An agent that provides example services via A2A."
    }
  }
}

Test websites:

  • https://agent.ai-agent-bakeoff.com/
  • https://www.mozilla.org/

tsunoyu avatar Sep 18 '25 14:09 tsunoyu

None of the example sites are detecting this. Is this cause they don't publish an agent-card.json or cause the check is wrong? Do we have an example of a site that DOES publish this to test the detection works?

tunetheweb avatar Sep 18 '25 14:09 tunetheweb

So far I could not find a live site yet as the A2A protocol is still new. Let me check further and get back to you.

tsunoyu avatar Sep 18 '25 15:09 tsunoyu

It's probably OK to merge as follows same structure as rest. But would be nice to have a real-life example to check just in case you or I are missing some typo or something.

tunetheweb avatar Sep 18 '25 18:09 tunetheweb

https://agent.ai-agent-bakeoff.com/.well-known/agent-card.json is publicly accessible. Adding to the test URL.

tsunoyu avatar Sep 18 '25 20:09 tsunoyu

Thanks. You need to do a dummy commit (or a force push?) to retrigger the CI. Unfortunately rerunning doesn’t work as it picks up the original list.

tunetheweb avatar Sep 18 '25 20:09 tunetheweb

Urgh. Looks like because the site doesn’t return a 200 response we don’t bother running custom metrics on it 😔

tunetheweb avatar Sep 18 '25 20:09 tunetheweb

I will try to find a different one with status 200. Let me check further. Thank you for your support.

tsunoyu avatar Sep 18 '25 21:09 tsunoyu

https://almanac.httparchive.org/en/2022/

WPT result details

Changed custom metrics values:

{
  "_well-known": {
    "/.well-known/assetlinks.json": {
      "found": false
    },
    "/.well-known/apple-app-site-association": {
      "found": false
    },
    "/.well-known/related-website-set.json": {
      "found": false
    },
    "/.well-known/privacy-sandbox-attestations.json": {
      "found": false
    },
    "/.well-known/gpc.json": {
      "found": false
    },
    "/.well-known/web-identity": {
      "found": false
    },
    "/.well-known/passkey-endpoints": {
      "found": false
    },
    "/.well-known/webauthn": {
      "found": false
    },
    "/robots.txt": {
      "found": true,
      "data": {
        "matched_disallows": {}
      }
    },
    "/.well-known/security.txt": {
      "found": false,
      "data": {
        "status": 404,
        "redirected": true,
        "url": "https://almanac.httparchive.org/.well-known/security.txt/",
        "content_type": "text/html; charset=utf-8"
      }
    },
    "/.well-known/change-password": {
      "found": false,
      "data": {
        "status": 404,
        "redirected": true,
        "url": "https://almanac.httparchive.org/.well-known/change-password/"
      }
    },
    "/.well-known/agent-card.json": {
      "found": false
    },
    "/.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200/": {
      "found": false,
      "data": {
        "status": 404,
        "redirected": false,
        "url": "https://almanac.httparchive.org/.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200/"
      }
    }
  }
}
https://agent.ai-agent-bakeoff.com

WPT result details

Changed custom metrics values:

{
  "_well-known": null
}
https://www.mozilla.org

WPT result details

Changed custom metrics values:

{
  "_well-known": {
    "/.well-known/assetlinks.json": {
      "found": false
    },
    "/.well-known/apple-app-site-association": {
      "found": true,
      "data": {
        "app_links": true,
        "web_credentials": false
      }
    },
    "/.well-known/related-website-set.json": {
      "found": false
    },
    "/.well-known/privacy-sandbox-attestations.json": {
      "found": false
    },
    "/.well-known/gpc.json": {
      "found": true,
      "data": {
        "gpc": true
      }
    },
    "/.well-known/web-identity": {
      "found": false
    },
    "/.well-known/passkey-endpoints": {
      "found": false
    },
    "/.well-known/webauthn": {
      "found": false
    },
    "/robots.txt": {
      "found": true,
      "data": {
        "matched_disallows": {}
      }
    },
    "/.well-known/security.txt": {
      "found": true,
      "data": {
        "status": 200,
        "redirected": false,
        "url": "https://www.mozilla.org/.well-known/security.txt",
        "content_type": "text/plain",
        "signed": false,
        "other": [
          [
            "Email",
            "[email protected]"
          ],
          [
            "Main info",
            "https://www.mozilla.org/en-US/security/"
          ],
          [
            "Bounty program",
            "https://www.mozilla.org/en-US/security/bug-bounty/"
          ]
        ],
        "all_required_exist": false,
        "only_one_requirement_broken": false,
        "valid": false
      }
    },
    "/.well-known/change-password": {
      "found": false,
      "data": {
        "status": 404,
        "redirected": false,
        "url": "https://www.mozilla.org/.well-known/change-password"
      }
    },
    "/.well-known/agent-card.json": {
      "found": false
    },
    "/.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200/": {
      "found": false,
      "data": {
        "status": 404,
        "redirected": false,
        "url": "https://www.mozilla.org/.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200/"
      }
    }
  }
}

github-actions[bot] avatar Nov 20 '25 17:11 github-actions[bot]