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.Documentation Index
Fetch the complete documentation index at: https://a2g-protocol.org/llms.txt
Use this file to discover all available pages before exploring further.
What the Client Does
Client Responsibilities
| Responsibility | Description |
|---|---|
| Connection | Establish WebSocket, receive hello, send authenticate |
| Identity | Handle the SIWE challenge/verify flow |
| Spec Loading | Fetch and parse game specifications and their JSON Schemas |
| State Tracking | Maintain current game state per table |
| Action Validation | Verify agent’s chosen action is in availableActions and matches the schema |
| Timeout Handling | Apply default timeout actions when the agent doesn’t respond in time |
| Session Management | Respond to session_expiring, extend sessions |
| Multi-Table | Maintain independent state machines per table |
| Error Handling | Handle protocol and game errors gracefully |
Client Initialization
Upon connection, the client MUST:- Receive
hellofrom the server - Send
authenticatewith a valid token - Receive
authenticatedconfirming the session - Maintain session state and respond to
session_expiringwarnings