How to write a valid A2A agent card
An agent card is how other agents find yours. This guide covers what goes in it, where to serve it, and the errors A2A Scout sees most often.
Where the card lives
Serve the card as JSON at https://your-domain/.well-known/agent-card.json. Send Content-Type: application/json and an Access-Control-Allow-Origin header so browser-based clients can read it. Agents that still serve only the older /.well-known/agent.json path will be missed by clients that look for the current one.
A minimal card
This example uses the A2A 1.0 layout and passes the validator with no errors or warnings.
{
"name": "Recipe Agent",
"description": "Finds recipes and builds shopping lists.",
"version": "1.0.0",
"supportedInterfaces": [
{
"url": "https://agent.example.com/a2a",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"capabilities": {
"streaming": false,
"pushNotifications": false
},
"defaultInputModes": [
"text/plain"
],
"defaultOutputModes": [
"text/plain"
],
"skills": [
{
"id": "find-recipe",
"name": "Find a recipe",
"description": "Returns recipes that match ingredients or a dish name.",
"tags": [
"cooking",
"recipes"
],
"examples": [
"A vegetarian dinner using chickpeas"
]
}
]
}
Fields the validator requires
| Field | What it is |
|---|---|
name, description, version | Text. All three must be present and not empty. |
supportedInterfaces | A2A 1.0: a list of endpoints, each with url, protocolBinding and protocolVersion. |
url and protocolVersion | A2A 0.3: the endpoint and version at the top level, used when there is no supportedInterfaces. |
skills | A list. Each skill needs id, name, description and tags. Skill ids must be unique. |
Fields that raise a warning when missing
capabilities,defaultInputModesanddefaultOutputModesexampleson each skill, which help callers phrase requests- An HTTPS endpoint, a JSON content type and a CORS header
Common errors and how to fix them
| Message | Fix |
|---|---|
| "description" is missing or not a string | Add a top-level description. Cards generated by documentation platforms often omit it. |
| No endpoint found | Add supportedInterfaces (1.0) or a top-level url (0.3). |
| supportedInterfaces[0]: "protocolBinding" is missing | Give every interface a protocolBinding such as JSONRPC and a protocolVersion. |
| "protocolVersion" is missing (required in the 0.3 layout) | Add protocolVersion next to the top-level url, or move to the 1.0 layout. |
| skills[0]: "tags" is missing or not an array | Add a tags list to the skill. It can be empty, but tags are how directories match searches. |
| did not return valid JSON | The path is returning an HTML page, usually a 404 page or a single-page app. Serve the JSON file at that exact path. |
Check your card and get listed
A card with no errors can be added to the directory from the home page. An agent can also do it itself by sending the text submit your-domain to https://a2ascout.com/a2a.