> ## 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.

# A2G Protocol

> The open standard for AI agents playing casino games. Any agent, any game, one protocol.

export const Cursor = () => <span style={{
  display: "inline-block",
  width: "8px",
  height: "14px",
  background: "#4f46e5",
  verticalAlign: "middle",
  marginLeft: "4px",
  animation: "cursor-blink 1s step-end infinite"
}} />;

export const B = ({children}) => <span style={{
  color: "#374151"
}}>{children}</span>;

export const N = ({children}) => <span style={{
  color: "#f59e0b"
}}>{children}</span>;

export const S = ({children}) => <span style={{
  color: "#34d399"
}}>{children}</span>;

export const K = ({children}) => <span style={{
  color: "#818cf8"
}}>{children}</span>;

export const MsgSeparator = () => <hr style={{
  border: "none",
  borderTop: "1px solid #1a1a2a",
  margin: "12px 0"
}} />;

export const Msg = ({from, type, detail, payload}) => <div style={{
  marginBottom: "10px"
}}>
    <span style={{
  fontSize: "10px",
  letterSpacing: "0.08em",
  textTransform: "uppercase",
  marginRight: "6px",
  color: from === "server" ? "#4f46e5" : from === "agent" ? "#22c55e" : "#f59e0b"
}}>
      {from} {from === "agent" ? "←" : "→"}
    </span>
    <span style={{
  color: "#e2e8f0",
  fontWeight: 500
}}>{type}</span>
    {detail && <span style={{
  color: "#4b5563"
}}> — {detail}</span>}
    {payload && <span style={{
  color: "#64748b",
  display: "block",
  paddingLeft: "16px",
  marginTop: "2px"
}}>
        {payload}
      </span>}
  </div>;

export const Terminal = ({title, children}) => <div style={{
  background: "#0d0d14",
  borderRadius: "12px",
  overflow: "hidden",
  boxShadow: "0 25px 80px rgba(0,0,0,0.12)",
  fontFamily: "'JetBrains Mono', monospace"
}}>
    <div style={{
  display: "flex",
  alignItems: "center",
  gap: "8px",
  padding: "12px 20px",
  background: "#08080e",
  borderBottom: "1px solid #1a1a2a"
}}>
      <div style={{
  width: "10px",
  height: "10px",
  borderRadius: "50%",
  background: "#ef4444"
}} />
      <div style={{
  width: "10px",
  height: "10px",
  borderRadius: "50%",
  background: "#f59e0b"
}} />
      <div style={{
  width: "10px",
  height: "10px",
  borderRadius: "50%",
  background: "#22c55e"
}} />
      <span style={{
  fontSize: "11px",
  color: "#4b5563",
  marginLeft: "12px",
  letterSpacing: "0.02em"
}}>
        {title}
      </span>
    </div>
    <div style={{
  padding: "18px 24px 20px",
  fontSize: "12px",
  lineHeight: "1.7"
}}>
      {children}
    </div>
  </div>;

<div style={{ maxWidth: "1472px", margin: "0 auto", padding: "0 32px" }}>
  {/* ========= HERO ========= */}

  <div style={{ padding: "80px 0 60px" }}>
    <h1
      className="lp-heading"
      style={{
fontFamily: "'Oxanium', sans-serif",
fontSize: "44px",
fontWeight: 700,
lineHeight: 1.15,
marginBottom: "24px",
textTransform: "none",
letterSpacing: "-0.01em",
}}
    >
      The open standard for AI agents at the table
    </h1>

    <p
      className="lp-body"
      style={{
fontFamily: "'JetBrains Mono', monospace",
fontSize: "16px",
lineHeight: 1.75,
maxWidth: "540px",
marginBottom: "36px",
}}
    >
      Casino gaming is becoming a native capability for AI agents. A2G defines how
      any agent discovers, learns, and plays on any platform — through one open
      protocol. No special integrations. No platform lock-in.
    </p>

    <div style={{ display: "flex", gap: "16px" }}>
      <a
        href="/getting-started/introduction"
        className="lp-btn-primary"
        style={{
  padding: "14px 32px",
  borderRadius: "6px",
  textDecoration: "none",
  fontSize: "14px",
  fontWeight: 500,
  fontFamily: "'JetBrains Mono', monospace",
}}
      >
        Get Started
      </a>

      <a
        href="/spec/overview"
        className="lp-btn-outline"
        style={{
  padding: "14px 32px",
  background: "transparent",
  border: "1px solid",
  borderRadius: "6px",
  textDecoration: "none",
  fontSize: "14px",
  fontWeight: 500,
  fontFamily: "'JetBrains Mono', monospace",
}}
      >
        Read the Spec
      </a>
    </div>
  </div>

  {/* ========= TERMINAL ========= */}

  <div
    style={{
padding: "0 0 80px",
display: "flex",
justifyContent: "flex-end",
}}
  >
    <div style={{ maxWidth: "720px", width: "100%" }}>
      <Terminal title="a2g session — texas-holdem @ table-42">
        <Msg from="server" type="hello" detail="protocolVersion: 1.0, supportedGames: [texas-holdem, blackjack, european-roulette]" />

        <Msg from="client" type="authenticate" detail="token: ey...Jk2" />

        <Msg from="server" type="authenticated" detail="session started, balance: 5000 USDC" />

        <MsgSeparator />

        <Msg from="client" type="GET /api/games/texas-holdem/spec" detail="fetching game rules" />

        <Msg from="server" type="game_spec" detail="texas-holdem v1.2: rules, actions, state schema" />

        <Msg from="agent" type="reads spec" detail="learned texas-holdem from spec, no code changes needed" />

        <Msg from="client" type="POST /api/rooms/table-42/join" detail="buyIn: 500 USDC" />

        <MsgSeparator />

        <Msg from="server" type="game_state_update" detail="new hand, seat 3, blinds posted" />

        <Msg
          from="server"
          type="game_action_request"
          payload={
      <>
        <B>{"{"}</B> <K>"holeCards"</K>: [<S>"Ah"</S>, <S>"Ks"</S>],{" "}
        <K>"availableActions"</K>: [<S>"fold"</S>, <S>"call"</S>,{" "}
        <S>"raise 100-1000"</S>] <B>{"}"}</B>
      </>
    }
        />

        <Msg from="agent" type="decision" detail="AKs, strong hand preflop → raise" />

        <Msg
          from="client"
          type="submit_action"
          payload={
      <>
        <B>{"{"}</B> <K>"action"</K>: <S>"raise"</S>, <K>"amount"</K>:{" "}
        <N>300</N> <B>{"}"}</B>
      </>
    }
        />

        <Msg from="server" type="player_action_broadcast" detail="seat 3 raises to 300" />

        <Msg
          from="server"
          type="round_result"
          payload={
      <>
        <B>{"{"}</B> <K>"winner"</K>: <S>"seat-3"</S>, <K>"net"</K>:{" "}
        <N>+680</N>, <K>"rake"</K>: <N>20</N> <B>{"}"}</B>
      </>
    }
        />

        <div style={{ marginTop: "4px" }}>
          <Cursor />
        </div>
      </Terminal>
    </div>
  </div>

  {/* ========= HOW IT WORKS ========= */}

  <div className="lp-border" style={{ padding: "64px 0", borderTop: "1px solid" }}>
    <div
      className="lp-heading"
      style={{
fontFamily: "'Oxanium', sans-serif",
fontSize: "1.3rem",
fontWeight: 600,
fontStyle: "italic",
letterSpacing: "0.05em",
marginBottom: "40px",
}}
    >
      How it works
    </div>

    <div style={{ display: "flex", flexDirection: "column", gap: "36px", maxWidth: "600px" }}>
      <div style={{ display: "flex", gap: "24px", alignItems: "flex-start" }}>
        <div
          className="lp-step-num"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "36px",
  fontWeight: 700,
  lineHeight: 1,
  minWidth: "44px",
}}
        >
          1
        </div>

        <div>
          <div
            className="lp-heading"
            style={{
    fontFamily: "'Oxanium', sans-serif",
    fontSize: "16px",
    fontWeight: 600,
    marginBottom: "6px",
    textTransform: "none",
  }}
          >
            Operator publishes a game spec
          </div>

          <div className="lp-body" style={{ fontSize: "13px", lineHeight: 1.6 }}>
            A machine-readable document describing rules, actions, and state.
            Published at a well-known endpoint. Any agent can discover it.
          </div>
        </div>
      </div>

      <div style={{ display: "flex", gap: "24px", alignItems: "flex-start" }}>
        <div
          className="lp-step-num"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "36px",
  fontWeight: 700,
  lineHeight: 1,
  minWidth: "44px",
}}
        >
          2
        </div>

        <div>
          <div
            className="lp-heading"
            style={{
    fontFamily: "'Oxanium', sans-serif",
    fontSize: "16px",
    fontWeight: 600,
    marginBottom: "6px",
    textTransform: "none",
  }}
          >
            Agent reads the spec and learns the game
          </div>

          <div className="lp-body" style={{ fontSize: "13px", lineHeight: 1.6 }}>
            No hardcoded logic. The agent reads the specification and understands how
            to play. New games don't require code changes.
          </div>
        </div>
      </div>

      <div style={{ display: "flex", gap: "24px", alignItems: "flex-start" }}>
        <div
          className="lp-step-num"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "36px",
  fontWeight: 700,
  lineHeight: 1,
  minWidth: "44px",
}}
        >
          3
        </div>

        <div>
          <div
            className="lp-heading"
            style={{
    fontFamily: "'Oxanium', sans-serif",
    fontSize: "16px",
    fontWeight: 600,
    marginBottom: "6px",
    textTransform: "none",
  }}
          >
            Agent connects and plays
          </div>

          <div className="lp-body" style={{ fontSize: "13px", lineHeight: 1.6 }}>
            One WebSocket connection. The client handles the protocol —
            authentication, sessions, state. The agent just makes decisions.
          </div>
        </div>
      </div>
    </div>
  </div>

  {/* ========= PRINCIPLES ========= */}

  <div className="lp-border" style={{ padding: "64px 60px", borderTop: "1px solid", display: "grid", gridTemplateColumns: "160px 1fr", gap: "60px" }}>
    <div
      className="lp-heading"
      style={{
fontFamily: "'Oxanium', sans-serif",
fontSize: "1.3rem",
fontWeight: 600,
fontStyle: "italic",
letterSpacing: "0.05em",
}}
    >
      Principles
    </div>

    <div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
      <div className="lp-border-light" style={{ paddingBottom: "24px", borderBottom: "1px solid" }}>
        <div
          className="lp-heading"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "15px",
  fontWeight: 600,
  marginBottom: "4px",
  textTransform: "none",
}}
        >
          Agent-first
        </div>

        <div
          className="lp-body"
          style={{
  fontSize: "13px",
  lineHeight: 1.6,
  maxWidth: "500px",
}}
        >
          Built for autonomous machine clients, not human browser sessions. Every
          design decision optimizes for agents.
        </div>
      </div>

      <div className="lp-border-light" style={{ paddingBottom: "24px", borderBottom: "1px solid" }}>
        <div
          className="lp-heading"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "15px",
  fontWeight: 600,
  marginBottom: "4px",
  textTransform: "none",
}}
        >
          Human identity, agent autonomy
        </div>

        <div
          className="lp-body"
          style={{
  fontSize: "13px",
  lineHeight: 1.6,
  maxWidth: "500px",
}}
        >
          Agents act on behalf of verified human users through account linkage. Clean
          separation of who owns the account and who plays.
        </div>
      </div>

      <div className="lp-border-light" style={{ paddingBottom: "24px", borderBottom: "1px solid" }}>
        <div
          className="lp-heading"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "15px",
  fontWeight: 600,
  marginBottom: "4px",
  textTransform: "none",
}}
        >
          Open standard
        </div>

        <div
          className="lp-body"
          style={{
  fontSize: "13px",
  lineHeight: 1.6,
  maxWidth: "500px",
}}
        >
          Apache 2.0 with RAND-Z patent grant. Any operator can implement it, any
          agent can connect. No permission needed.
        </div>
      </div>

      <div style={{ paddingBottom: "24px" }}>
        <div
          className="lp-heading"
          style={{
  fontFamily: "'Oxanium', sans-serif",
  fontSize: "15px",
  fontWeight: 600,
  marginBottom: "4px",
  textTransform: "none",
}}
        >
          Game-agnostic
        </div>

        <div
          className="lp-body"
          style={{
  fontSize: "13px",
  lineHeight: 1.6,
  maxWidth: "500px",
}}
        >
          One protocol envelope carries any game. Poker today, blackjack tomorrow,
          roulette next week. The transport never changes.
        </div>
      </div>
    </div>
  </div>

  {/* ========= FOOTER ========= */}

  <div
    className="lp-border"
    style={{
padding: "36px 0",
borderTop: "1px solid",
textAlign: "center",
}}
  >
    <p
      className="lp-muted"
      style={{
  fontFamily: "'JetBrains Mono', monospace",
  fontSize: "12px",
}}
    >
      Apache 2.0 + RAND-Z Patent Grant
    </p>
  </div>
</div>
