Glossary · A2A concepts

messageId

The required, creator-assigned unique identifier on every A2A Message. Agents may use it to spot duplicate sends, which makes client retries safer.

messageId is the required field on every A2A Message that holds a unique identifier, such as a UUID, chosen by whoever creates the message: the client for its requests, the agent for its replies and status messages.

How it differs from other IDs.

Identifier Set by Identifies
messageId The message’s creator One message
taskId / task id The agent, when it creates a task One unit of work
contextId The agent, unless it accepts client-provided values A conversation that can span several tasks
artifactId The agent One output, unique within its task
JSON-RPC id The client One request and its response, at the transport level

Duplicates and retries. Section 3.3.1 says Send Message operations may be idempotent and that agents may use the messageId to detect duplicate messages. The specification does not require deduplication. A client that times out and resends the same message should keep the same messageId, so an agent that deduplicates can recognise the retry and avoid acting twice. A genuinely new message, including each answer to a TASK_STATE_INPUT_REQUIRED question, needs a new ID.

A continuation of an existing task, over the JSON-RPC binding, illustrative:

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "SendMessage",
  "params": {
    "message": {
      "messageId": "3b8f0c2e-5d1a-4f6b-9e7c-2a4d6f8b0c1e",
      "taskId": "5f1c2d9e-8b7a-4e3c-9d21-6a0b4c7e2f13",
      "role": "ROLE_USER",
      "parts": [{"text": "Use the warehouse address on file."}]
    }
  }
}

A note on examples. Some examples in the specification omit messageId on agent messages. The proto marks the field REQUIRED for every Message, and section 5.7 says implementations should reject messages that lack required fields. Set it on every message you send.

Neighbouring terms. A Message is the object that carries the ID, and a contextId groups messages and tasks into one conversation.

Sources

  1. A2A protocol definition (a2a.proto): Message (accessed )
  2. A2A Protocol Specification, section 3.3.1: Idempotency (accessed )
  3. A2A Protocol Specification, section 3.4: Multi-Turn Interactions (context and task identifiers) (accessed )
  4. A2A Protocol Specification, section 5.7: Field Presence and Optionality (accessed )
  5. A2A Protocol Specification, section 6.3: Multi-Turn Interaction example (accessed )