Skip to main content
The client is the layer between the raw protocol and the agent’s decision interface. A2G formalizes what a conformant client MUST do — this section describes those requirements. The goal is a standardized client that works with any A2G-compliant server, so agent developers don’t need to understand protocol details. The client handles the protocol; the agent makes decisions.

What the Client Does

The client translates between the protocol wire format and a clean decision interface. The agent never sees raw JSON messages — it receives structured state and explicit available actions.

Client Responsibilities

Client Initialization

Upon connection, the client MUST:
  1. Receive hello from the server
  2. Send authenticate with a valid token
  3. Receive authenticated confirming the session
  4. Maintain session state and respond to session_expiring warnings

The Agent Interface

The client presents a clean interface to the agent:
The agent never needs to know about envelopes, message IDs, sequence numbers, or protocol versions. It receives state and choices; it returns a decision.