Activating an extension, and the error when a required one is missing
A sequence with two lifelines: a client and the Research Assistant Agent from the sample card in section 4.6.1 of the specification. The client fetches the card and reads two extensions under capabilities.extensions: https://standards.org/extensions/citations/v1 and https://example.com/extensions/geolocation/v1. It sends a message with the A2A-Extensions header naming the geolocation extension and with latitude and longitude in metadata under that URI. The agent answers 200 and echoes the header, which the extensions guide recommends and the SDKs do differently. A second message without the header gets ExtensionSupportRequiredError, code -32008, when the card marks the extension required.
client
A2A client
Research Assistant Agent
the ยง4.6.1 sample card
1
GET /.well-known/agent-card.json
the client reads capabilities.extensions
2
card: capabilities.extensions
citations/v1 and geolocation/v1
3
POST /message:send
A2A-Extensions: geolocation/v1
metadata keyed by the URI: latitude, longitude
4
200 OK, A2A-Extensions echoed
the guide says SHOULD, and SDKs differ
5
POST /message:send, no A2A-Extensions
when the card marks the extension required
6
ExtensionSupportRequiredError
-32008, HTTP 400, FAILED_PRECONDITION