liveBook · Manning

Agent card

As explained in Build an AI Agent (From Scratch)

An agent card is an A2A JSON document that describes an agent, identifies its endpoint, and advertises its capabilities to potential clients.

An agent card is an A2A JSON document that introduces an agent to potential clients. It identifies the agent, describes its role, specifies the request endpoint, and advertises capabilities such as streaming. section 9.6.1

Servers publish the card at /.well-known/agent.json. Clients read it to decide which agent fits a request, then send standardized task requests to the declared URL. section 9.6.1 section 9.6.2

A practical card commonly contains:

  • name: the agent identifier used by clients and routing logic. section 9.6.1
  • description: a capability summary used by LLMs when selecting an agent. section 9.6.1
  • url: the endpoint where clients submit task requests. section 9.6.1
  • capabilities: supported features such as streaming, alongside metadata such as version. section 9.6.1

Math expert card

A card can identify a math_expert agent, describe mathematical calculations and equation solving, publish http://localhost:9999/, declare version 1.0.0, and enable streaming. section 9.6.1 section 9.6.2

Figure 9.12 A2A client-server model: client queries agent card and sends task requests, server provides agent information and executes tasks.

Use the client-server flow to trace card discovery, request submission, server execution, and response delivery. section 9.6.1

How Build an AI Agent (From Scratch) covers it

How deep it goes
Defines card fields, publication, and request flow, then stops short of detailed authentication and advanced network features.
Examples
Uses a math_expert card, a localhost endpoint, streaming capability, and a client that loads card metadata before calling the agent.
What it assumes
Assumes an agent and basic HTTP interaction, while introducing A2A discovery and card-driven routing.
What you can do after
Operate/configure an A2A server card and let clients discover, route to, and compose its agent.
How it connects
Connects A2A, HTTP client-server communication, task request/response, AgentExecutor, and RemoteAgent.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build an AI Agent (From Scratch). The section links point to the parts of the book it draws on.