Glossary · A2A concepts

Message (A2A)

One turn of communication between an A2A client and a remote agent, with a sender role, a message id and one or more content parts.

In A2A, a message is one turn of communication between a client and a remote agent, carrying a sender role and one or more content parts. Clients use messages to start and steer work. Agents use them to ask questions and report status.

Fields. The Message definition in a2a.proto requires messageId, role and parts. Whoever creates the message generates the messageId, and agents may use it to detect duplicate sends (specification section 3.3.1). role is ROLE_USER for client-to-server messages and ROLE_AGENT for server-to-client messages. Optional fields are contextId, taskId, metadata, extensions (URIs of extensions that contributed to the message) and referenceTaskIds.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "SendMessage",
  "params": {
    "message": {
      "messageId": "9c0e5d1a-6f0b-4e7a-8d52-3b1f2a7c4e90",
      "role": "ROLE_USER",
      "parts": [{"text": "What is the status of shipment 4471?"}]
    }
  }
}

Linking rules. A message from the agent must carry a contextId, and a taskId only if a task was created. A client message may omit both. If it sends both, they must match; if it sends only taskId, the agent infers the context from the task.

Messages and artifacts. Section 3.7 lists four uses for messages: starting a task, clarification before a task exists, status updates, and further input to a running task. Task results should be returned as artifacts. Messages are also not a reliable delivery channel: a client that reconnects to a stream can miss status messages, and the agent decides which messages it keeps in task history. For a simple exchange, an agent may answer Send Message with a single Message and create no task at all.

v0.3. Messages carried "kind": "message" and lowercase roles, "user" and "agent". Version 1.0 dropped the kind field and uses the ROLE_* enum names.

Sources

  1. A2A protocol definition (a2a.proto): Message, Role (accessed )
  2. A2A Protocol Specification, section 3.7: Messages and Artifacts (accessed )
  3. A2A Protocol Specification, section 3.3.1: Idempotency (accessed )
  4. A2A Protocol Specification, section 9.4.1: SendMessage (JSON-RPC) (accessed )
  5. A2A v0.3.0 type definitions (types.ts): Message (accessed )