What an A2A client reads before its first message

L1ScreenConcept7 minScreenSystem design

RolesAgent Systems EngineeringCustomer AI DeploymentDeveloper Experience and Education

The question

Your planner agent must delegate a test run to a remote agent that it knows only by host and port. Describe what it fetches first, how it decides which endpoint to call, and what it checks before it asks that agent for a stream.

Answer it first, aloud or on paper. Then open the answer.

The answer

Show short answer

It fetches the agent card with a plain GET on /.well-known/agent-card.json. From supportedInterfaces it takes the first entry whose binding and version it speaks, and it calls that entry's URL. Before SendStreamingMessage it reads capabilities.streaming, because a server must refuse the call with UnsupportedOperationError when the flag is absent or false.

Show full answer

One GET, one document

The specification names three routes to a card: the well-known URI, a registry or catalog, and direct configuration. It standardizes only the first. A planner with hosts in its configuration fetches each card from the well-known path.

The proto gives AgentCard 14 fields, and eight are REQUIRED: name, description, supportedInterfaces, version, capabilities, defaultInputModes, defaultOutputModes and skills. Four of them are lists, and a required list must hold at least one element. Reject a card that lacks one.

The endpoint comes from the interface list

Each supportedInterfaces entry has a REQUIRED url, protocolBinding and protocolVersion. The list is ordered, and the client selects the first entry it supports. Supported means a binding and a version that the client implements. The client also copies that entry's tenant into every request, and omits the field when the entry has none.

Flags decide which operations exist

Flag in capabilitiesOperations it allowsError when absent or false
streamingSendStreamingMessage, SubscribeToTaskUnsupportedOperationError, -32004
pushNotificationsthe four push configuration operationsPushNotificationNotSupportedError, -32003
extendedAgentCardGetExtendedAgentCardUnsupportedOperationError, -32004

An absent flag counts as false. In the recorded error run, a push configuration sent to an agent without the flag got -32003 for a task id that did not even exist. The card had already answered.

Cache it like any document

A card changes rarely. The server should send Cache-Control with max-age and an ETag. The client honors them and revalidates with If-None-Match.

Follow-ups

  1. L1ScreenWhich field tells you what work the agent can do?

    Show expected answer

    skills, each with an id, a name, a description and at least one tag; pick the agent by skills and media modes.

  2. L2WorkingThe card lists a gRPC entry first and a JSON-RPC entry second, and your client speaks only JSON-RPC. Which URL do you call?

    Show expected answer

    the JSON-RPC one, because the rule is the first entry that you support.

  3. L2WorkingHow do media types reach the agent?

    Show expected answer

    the card's defaultInputModes and defaultOutputModes, a skill's own inputModes and outputModes, and a mediaType on each part the client sends.

  4. L3SeniorYou hold a bearer token and the card sets extendedAgentCard. What changes?

    Show expected answer

    call GetExtendedAgentCard with the declared credential and use the fuller card in place of the cached public one for that session, or until the card's version changes.

Wrong answers

Show the wrong answers that interviewers hear
  • “Read the top-level url field of the card.”

    The current version moved the endpoint into supportedInterfaces, and there is no top-level url.

  • “Try the stream and fall back when it fails.”

    The flag answers the question in advance. The failed call costs a round trip for nothing.

  • “Put the skill id in the message so the server runs that skill.”

    No field of SendMessageRequest or Message names a skill. The list describes the agent.

Taught in

The AgentCard fields section lists the fields, and the discovery section gives the interface rule and the flag table.