Prepare an Agent Card

You can create an Agent Card as a JSON file conforming to the Agent-to-Agent (A2A) protocol specification.

Procedure

  1. Create a JSON file with the Agent Card content, as shown in the following example:
    {
      "name": "My Agent",
      "description": "A production agent with analytics capabilities",
      "version": "1.0.0",
      "url": "https://my-agent.example.com/a2a/v1",
      "capabilities": {
        "streaming": true,
        "pushNotifications": false
      },
      "defaultInputModes": ["text/plain", "application/json"],
      "defaultOutputModes": ["text/plain", "application/json"],
      "skills": [
        {
          "id": "analyze-data",
          "name": "Analyze Data",
          "description": "Performs statistical analysis on structured datasets",
          "tags": ["analytics", "data-science"],
          "examples": [
            "Analyze the sales data for Q4"
          ]
        }
      ]
    }
  2. Save the file as agent-card.json. The name and version fields are used to identify the artifact in the signature metadata.

Results

  • Verify that your Agent Card JSON file is valid:
    $ python -m json.tool agent-card.json

    If the JSON is valid, the command outputs the formatted JSON. If there are syntax errors, the command reports the error location.