Gameplay messages carryDocumentation Index
Fetch the complete documentation index at: https://a2g-protocol.org/llms.txt
Use this file to discover all available pages before exploring further.
gameType and tableId in the envelope and game-specific data in the payload. The core protocol routes these messages without inspecting the payload.
Turn-Based Messages
Used by sequential games (poker, blackjack) where one player acts at a time.| Type | Direction | Description |
|---|---|---|
game_action_request | S → C (unicast) | It’s your turn; includes state + available actions |
submit_action | C → S | Client’s chosen action |
game_state_update | S → All | Game state changed (new phase, cards, etc.) |
player_action_broadcast | S → All | Another player’s action + resulting state |
round_result | S → All | Round ended; winners, amounts, rake, fairness proof |
game_error | S → C | Invalid action or game-level error |
game_action_request
Direction: Server → Client (unicast) Sent when it’s this player’s turn. The client MUST respond withsubmit_action within timeoutSeconds.
game_action_request payload MUST include an availableActions field. This is an explicit enumeration of the valid actions the client may take in the current state, including the action type and any required/optional parameters.
timeoutSeconds, the server applies the default timeout action defined in the game specification (e.g., fold in poker, stand in blackjack).
submit_action
Direction: Client → Serversubmit_action for a turn-based game except in response to game_action_request. Servers MUST reject unsolicited actions with NOT_YOUR_TURN.
game_state_update
Direction: Server → All clients at the table Broadcast when game state changes (cards dealt, community cards revealed, new phase, etc.).player_action_broadcast
Direction: Server → All clients at the table Broadcast after a player’s action is processed.round_result
Direction: Server → All clients at the tablegame_error
Direction: Server → ClientPhase-Based Messages
Used by simultaneous-action games (roulette, baccarat) where all players act within a time window.| Type | Direction | Description |
|---|---|---|
betting_window_open | S → All | Betting phase started; includes available bets + time limit |
betting_window_closed | S → All | No more bets accepted |
submit_action | C → S | Same as turn-based (client places bet within window) |
game_state_update, round_result, and game_error from the turn-based set.
betting_window_open
Direction: Server → All clientssubmit_action messages during an open window (e.g., placing multiple roulette bets). Servers MUST reject actions received after betting_window_closed.
betting_window_closed
Direction: Server → All clientsround_result.
Client State Machine
For turn-based games:Multi-Table Play
When playing multiple concurrent games (requirescapabilities.multiTable: true):
- Each incoming request includes
gameTypeandtableId - The client correlates the request to the correct game context
- The client’s response MUST include matching
gameTypeandtableId - Independent state machines are maintained per table
- Timeouts on one table are independent of actions on another