← Develop AI Apps and Agents o… Latent Shelf · Ch.15

Module Study Guide · Path 2 · AI agents

Discover Azure AI Agents with A2A

Publish an Agent Card and any client can discover your agent's skills — A2A is the open standard for agents that talk across vendors.

— the module's premise

The capstone of the agents path. This module covers the A2A protocol and how an agent advertises itself with an Agent Card and skills, the agent executor and server that answer requests, and how a client connects to consume a remote agent.

A2A protocolAgent Card & skillsexecutor + server14 quiz questions
01The protocol

Agents that discover each other

The Agent-to-Agent (A2A) protocol is a standardized framework letting AI agents collaborate, share context, and invoke capabilities securely across different vendors and platforms. Its advantages: cross-vendor collaboration, flexible model selection (each agent independently chooses its LLM — unlike MCP's single-LLM connection), and integrated authentication.

Key concept · Agent Skills and the Agent Card

An agent skill is a specific capability the agent performs — with an id, name, description, tags, examples, and input/output modes. The Agent Card is the agent's "digital business card": a structured document giving its identity (name, description, version), endpoint URL, capabilities (streaming, push notifications), default input/output modes, its list of skills, and authentication requirements. Publishing the card is what lets other agents/clients discover the agent and interact appropriately.

The discovery flow: an agent defines skills and publishes its card → others discover it automatically → requests route to the right skill → responses return in supported formats. A routing agent can retrieve several cards and orchestrate a multi-agent workflow (e.g. one agent's title feeds another's outline).

02Executor & server

Serving an A2A agent

The Agent Executor bridges the A2A protocol and the agent's business logic — it processes incoming requests, generates responses, and (optionally) handles cancellation. An A2A server hosts it and routes events back to callers.

Key concept · Execute, cancel, and the event queue

The executor exposes two operations: Execute (reads request details from the RequestContext, runs the logic, and places results on the EventQueue) and Cancel (task cancellation, which simple agents may not support). A routing mechanism delivers the queued events back to the requester — a standardized contract every client and agent can rely on.

03Connecting

Consuming a remote agent

An A2A client connects through a structured flow: get the server's base URL → fetch the Agent Card from its well-known endpoint → initialize the client with the card → send messages. Each request carries a unique id (idempotency).

Request and response models.
KindBehavior
Non-streaming requestSend a message, wait for the complete response — simple, single-response interactions.
Streaming requestReceive incremental partial results asynchronously — long-running tasks, live updates.
Direct message responseImmediate text or structured content.
Task object responseAn ongoing task; follow-up calls fetch status/results.

Design for a dual response model — be ready for both immediate messages and task-based returns — and handle streaming asynchronously.

★Test yourself

Chapter 15 quiz

Fourteen questions on the A2A protocol, the executor and server, and connecting a client. Answer first, then expand Show answer.

Part A · Multiple choice

Q1

What is the A2A protocol for?

  • A Connecting an agent to tools
  • B Standardized agent-to-agent collaboration across vendors and platforms
  • C Fine-tuning models
  • D Content filtering
Show answer

B. A2A connects agents to each other; MCP connects an agent to tools.

Q2

What is the Agent Card?

  • A A billing statement
  • B A structured discovery document describing identity, endpoint, capabilities, and skills
  • C A fine-tuning dataset
  • D A content filter
Show answer

B. The agent's "digital business card" for discovery.

Q3

How does A2A's model selection differ from MCP?

  • A Each A2A agent independently chooses its own LLM
  • B A2A forces one shared LLM
  • C A2A uses no models
  • D They're identical
Show answer

A. MCP scenarios rely on a single LLM connection; A2A agents each pick their own.

Q4

What bridges the A2A protocol to an agent's business logic?

  • A The Agent Executor
  • B The Agent Card
  • C A content filter
  • D A vector index
Show answer

A — the Agent Executor. It processes requests and returns responses.

Q5

Where does the executor place results for return to the client?

  • A The EventQueue
  • B A database
  • C The Agent Card
  • D The system prompt
Show answer

A — the EventQueue. A routing mechanism delivers events to the requester.

Q6

What must a client fetch before sending messages to an A2A agent?

  • A The Agent Card from the server's well-known endpoint
  • B A fine-tuned model
  • C An API key only
  • D Nothing
Show answer

A. Base URL → fetch Agent Card → initialize client → send messages.

Part B · True or false

Q7

An agent skill includes an id, name, description, tags, examples, and input/output modes.

Show answer

True. Skills are the building blocks the card advertises.

Q8

A2A responses can be either direct messages or task objects.

Show answer

True. Design for a dual response model — immediate or task-based.

Q9

All A2A agents must support task cancellation.

Show answer

False. Cancel may not be supported for simple agents.

Q10

Streaming requests deliver incremental results asynchronously.

Show answer

True. Useful for long-running tasks and real-time updates.

Q11

A routing agent can retrieve multiple Agent Cards and orchestrate a workflow across agents.

Show answer

True. e.g. one agent's title feeds another agent's outline.

Part C · Short answer

Q12

Name three of A2A's key advantages.

Show answer

Cross-vendor collaboration, flexible per-agent model selection, and integrated authentication.

Q13

Name the two operations the Agent Executor exposes.

Show answer

Execute (process the request via RequestContext, place results on the EventQueue) and Cancel.

Q14

Give the four connection steps for an A2A client.

Show answer

Get the base URL → fetch the Agent Card → initialize the client → send messages.