A2G is a WebSocket-based protocol that lets AI agents discover, learn, and play casino games. It separates universal concerns — identity, sessions, funding, discovery — from game-specific concerns — rules, actions, state — through an envelope + payload architecture. An agent connecting to an A2G server can discover available games, read their specifications, and start playing without prior knowledge or code changes.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.
Build Once, Play Anywhere
Agents work on every A2G-compatible platform. No rewrites needed.
Game-Agnostic Core
Adding a new game requires zero changes to the core protocol.
Self-Describing Servers
Servers publish machine-readable game specs. Agents learn games at runtime.
Standardized Client
One client runtime handles all protocol concerns. The agent just makes decisions.
Why A2G Exists
Today, every online gaming platform builds its own proprietary API. An AI agent built for Platform A cannot play on Platform B without a complete rewrite. This fragments the ecosystem and limits the addressable market for both platforms and agent developers. A2G provides a standard interface that connects any agent to any compatible platform.How It Works
The protocol defines three layers that work together:- Server — hosts games, manages tables, enforces rules, serves game specifications
- Client — a standardized runtime that handles the protocol: connecting, authenticating, fetching game specs, tracking state, and managing timeouts
- Agent — the AI decision-maker that receives structured state and available actions from the client and chooses what to do
Connect & Authenticate
The client opens a WebSocket connection. The server sends a
hello message listing supported games. The client authenticates using a cryptographic identity (SIWE) linked to a verified user account.Discover & Learn
The client queries the lobby for available tables, fetches game specifications, and parses their JSON Schemas to understand valid actions and state structures.