liveBook · Manning

Agent card

As explained in Context Engineering

An agent card is a standardized capability manifest that describes an agent’s identity, capabilities, skills, interfaces, and security requirements.

An agent card is a standardized JSON capability manifest for an agent in the Agent-to-Agent (A2A) protocol. It shares operational context with potential collaborators so a client agent can evaluate a server agent and select an interface before delegating work. section 7.8.1

A card can describe:

  • Identity, including the agent’s name, provider, version, documentation URL, and optional digital signatures. section 7.8.1
  • Capabilities and skills, such as streaming support and the tasks the agent can perform. section 7.8.1
  • Supported interfaces and input and output modes, giving a client information for communicating with the agent. section 7.8.1
  • Security requirements relevant to accessing the agent. section 7.9.6

Weather-agent discovery

A weather server exposes an agent-card.json file describing its capabilities and interface. A client fetches the card, selects a supported interface, and sends a weather request to its message endpoint. The server returns a completed task-shaped response containing an artifact. section 7.9.6

Listing 7.1 Simplified illustrative agent card for a weather forecasting AI agent
{
  "name": "Nimbus Weather Bot",
  "description": "An AI agent specialized in weather forecasts",
  "provider": {
    "organization": "Nimbus Weather Services",
    "url": "https://www.nimbusweather.example"
  },
  "version": "1.0.0",
  "supportedInterfaces": [
    {
      "url": "https://api.nimbusweather.example/message:send",
      "protocolBinding": "HTTP+JSON",
      "protocolVersion": "1.0.0"
    }
  ],
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "stateTransitionHistory": true
  },
  "defaultInputModes": ["application/json", "text/plain"],
  "defaultOutputModes": ["application/json", "text/plain"],
  "skills": [
    {
      "id": "current-weather",
      "name": "Current Weather",
      "description": "Retrieves current weather conditions for a location",
      "tags": ["weather", "forecast"],
      "examples": ["Current weather in San Francisco, CA"],
      "inputModes": ["application/json", "text/plain"],
      "outputModes": ["application/json", "text/plain"]
    }
  ]
}

Inspect an illustrative weather-agent card with identity, interfaces, capability flags, modes, and a skill. section 7.8.1

Listing 7.8 A2A client logic for discovering a server agent and sending a message
agent_card_url = f"{SERVER_BASE_URL}/agent-card.json" #1
response = requests.get(agent_card_url)
response.raise_for_status()
agent_card = response.json()

interfaces = agent_card.get("supportedInterfaces", []) #2
if not interfaces:
    raise ValueError("Agent card does not declare a supported interface.")
message_endpoint = interfaces[0]["url"]

message_payload = { #3
    "message": {
        "messageId": str(uuid.uuid4()),
        "role": "ROLE_USER",
        "parts": [{"text": "Current weather. location: San Francisco, CA"}]
    },
    "configuration": {"acceptedOutputModes": ["text/plain"]}
}
headers = {"Content-Type": "application/a2a+json"}
message_response = requests.post(message_endpoint, json=message_payload,
headers=headers)
message_response.raise_for_status()
result_payload = message_response.json()

artifact = result_payload["task"]["artifacts"][0] #4
final_message = artifact["parts"][0]["text"]
print(f"Result: {final_message}")

Inspect the client’s card fetch, interface selection, and message submission. section 7.9.6

The example is a teaching scaffold, not a conformant A2A implementation. Production systems should use the selected protocol binding, validate declared capabilities, apply authentication, handle task and context identifiers correctly, and support the interaction mechanism required by the task. A2A continues to evolve; consult the current specification before deployment. section 7.9.6 section 7.8.1

How Context Engineering covers it

How deep it goes
Defines the manifest and illustrates discovery and message submission, while deferring full protocol conformance and capability validation.
Examples
Uses a weather-agent JSON card and a client-server exchange that returns a forecast artifact.
What you can do after
Evaluate a simplified agent-discovery flow and identify production requirements for using a declared interface.
How it connects
Connects capability discovery with A2A interfaces, authentication, task lifecycle management, and artifact exchange.

Also explained in

Compare how 2 books explain agent card →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.