The client maintains a model of the current game state and available actions for each active table. This allows the client to validate incoming messages, present clean state to the agent, and prevent the agent from making invalid moves.
Parsing Incoming State
When the server sends a gameplay message (game_action_request, betting_window_open), the client MUST:
Extract the payload
Validate the payload against the stored JSON Schema for that message type
If validation fails, reject the message and send an error or game_error (implementation choice)
Parse the game state to update its internal model
Read the availableActions field from the payload — this is provided by the server and removes the burden of inference
The client MUST NOT attempt to infer valid actions from game state alone. The availableActions field is the source of truth for what the client may do next.
Action Validation
When the agent chooses an action, the client MUST validate it before sending:
Verify the action type is present in the availableActions array
Validate the action’s parameters against the Action Schema for that action type
Construct the submit_action payload according to the schema
Send the message with matching gameType and tableId
If the agent chooses an invalid action (not in availableActions or fails schema validation), the client MUST NOT send it to the server. The client should notify the agent and request a valid action.
Per-Table State
The client MUST maintain independent state per table:
Table "table-1" (texas-holdem) ├── Current game state ├── Available actions (from last request) ├── State machine: IDLE | DECIDING └── Timeout timerTable "table-7" (european-roulette) ├── Current game state ├── Available actions (from last request) ├── State machine: IDLE | BETTING └── Window timer
State machines are independent — a timeout on one table does not affect actions on another.
State Tracking Purpose
The client tracks state to:
Present clean state to the agent — structured, validated, with explicit available actions
Validate incoming messages — detect protocol violations or inconsistencies
Validate outgoing actions — prevent the agent from acting outside available actions
Detect protocol violations — flag unexpected state transitions
The client acts as a guardrail. Even if the raw protocol would permit it, the client MUST NOT allow the agent to act outside of the available actions.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"A2G Protocol","colors":{"primary":"#4f46e5","light":"#6366f1","dark":"#3730a3"},"logo":{"light":"https://mintcdn.com/a2gprotocol/V8KpRpHMRY9DAIxL/logo/light.svg?fit=max\u0026auto=format\u0026n=V8KpRpHMRY9DAIxL\u0026q=85\u0026s=8941a09fa71ddad45fb9f8703141e4ad","dark":"https://mintcdn.com/a2gprotocol/V8KpRpHMRY9DAIxL/logo/dark.svg?fit=max\u0026auto=format\u0026n=V8KpRpHMRY9DAIxL\u0026q=85\u0026s=5f979844361600a057470ab368f6ffe4"},"favicon":"/favicon.png","navbar":{"links":[{"href":"https://github.com/a2g-protocol/a2g","type":"github"}]},"footer":{"socials":{"github":"https://github.com/a2g-protocol/a2g"},"links":[{"items":[{"label":"License \u0026 Patent Terms","href":"/legal"}]}]},"fonts":{"heading":{"family":"Oxanium","weight":700},"body":{"family":"JetBrains Mono","weight":400}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"a2gprotocol","hasAudioNarration":false,"actualSubdomain":"a2gprotocol","customDomains":["a2g-protocol.org"],"gitSource":{"type":"github","owner":"a2g-protocol","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94b1d7c27206474c3ad6e:success","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"Protocol Specification","count":22},{"language":"default","tag":"Implementation Guide","count":10},{"language":"default","tag":"Getting Started","count":8},{"language":"default","tag":"For Operators","count":6},{"language":"default","tag":"Game Extensions","count":5},{"language":"default","tag":"Advanced","count":5},{"language":"default","tag":"Welcome","count":4},{"language":"default","tag":"For Agent Developers","count":4},{"language":"default","tag":"Client Runtime","count":4},{"language":"default","tag":"Messages","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"global.css","content":"h1,h2,h3,h4,h5,h6{color:#1a1a2e!important;text-transform:uppercase;letter-spacing:0.05em}.dark h1,.dark h2,.dark h3,.dark h4,.dark h5,.dark h6{color:#e2e8f0!important}.lp-heading{color:#1a1a2e}.dark .lp-heading{color:#e2e8f0}.lp-body{color:#64748b}.dark .lp-body{color:#94a3b8}.lp-muted{color:#94a3b8}.dark .lp-muted{color:#64748b}.lp-step-num{color:#e5e7eb}.dark .lp-step-num{color:#1e293b}.lp-border{border-color:#e5e7eb}.dark .lp-border{border-color:#1e293b}.lp-border-light{border-color:#f0f0ed}.dark .lp-border-light{border-color:#1e293b}.lp-btn-primary{background:#1a1a2e;color:#fff}.dark .lp-btn-primary{background:#e2e8f0;color:#0f172a}.lp-btn-outline{color:#1a1a2e;border-color:#d1d5db}.dark .lp-btn-outline{color:#e2e8f0;border-color:#334155}h1{font-size:1.6rem!important}h2{text-transform:none!important;font-style:italic;font-size:1.3rem!important}h3{font-size:1.05rem!important}h4,h5,h6{font-size:0.95rem!important}article p,article li,article td,article th,article blockquote,[data-content] p,[data-content] li,.prose p,.prose li,main p,main li{font-size:14px!important}.group-name{text-transform:uppercase;letter-spacing:0.05em}@keyframes cursor-blink{0%,100%{opacity:1}50%{opacity:0}}"}],"page":{"pagePath":"spec/client/state-management","slug":"/spec/client/state-management","pageMetadata":{"title":"State Management","description":"Tracking game state and validating actions.","href":"/spec/client/state-management"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Tracking game state and validating actions.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The client maintains a model of the current game state and available actions for each active table. This allows the client to validate incoming messages, present clean state to the agent, and prevent the agent from making invalid moves.`}),`\n`,_jsx(Heading,{level:`2`,id:`parsing-incoming-state`,children:`Parsing Incoming State`}),`\n`,_jsxs(_components.p,{children:[`When the server sends a gameplay message (`,_jsx(_components.code,{children:`game_action_request`}),`, `,_jsx(_components.code,{children:`betting_window_open`}),`), the client MUST:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Extract the payload`}),`\n`,_jsx(_components.li,{children:`Validate the payload against the stored JSON Schema for that message type`}),`\n`,_jsxs(_components.li,{children:[`If validation fails, reject the message and send an `,_jsx(_components.code,{children:`error`}),` or `,_jsx(_components.code,{children:`game_error`}),` (implementation choice)`]}),`\n`,_jsx(_components.li,{children:`Parse the game state to update its internal model`}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Read the `,_jsx(_components.code,{children:`availableActions`}),` field from the payload`]}),` — this is provided by the server and removes the burden of inference`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The client MUST NOT attempt to infer valid actions from game state alone. The `,_jsx(_components.code,{children:`availableActions`}),` field is the source of truth for what the client may do next.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`action-validation`,children:`Action Validation`}),`\n`,_jsx(_components.p,{children:`When the agent chooses an action, the client MUST validate it before sending:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Verify the action type is present in the `,_jsx(_components.code,{children:`availableActions`}),` array`]}),`\n`,_jsx(_components.li,{children:`Validate the action’s parameters against the Action Schema for that action type`}),`\n`,_jsxs(_components.li,{children:[`Construct the `,_jsx(_components.code,{children:`submit_action`}),` payload according to the schema`]}),`\n`,_jsxs(_components.li,{children:[`Send the message with matching `,_jsx(_components.code,{children:`gameType`}),` and `,_jsx(_components.code,{children:`tableId`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If the agent chooses an invalid action (not in `,_jsx(_components.code,{children:`availableActions`}),` or fails schema validation), the client MUST NOT send it to the server. The client should notify the agent and request a valid action.`]}),`\n`,_jsx(Heading,{level:`2`,id:`per-table-state`,children:`Per-Table State`}),`\n`,_jsx(_components.p,{children:`The client MUST maintain independent state per table:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`12`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Table \"table-1\" (texas-holdem)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Current game state`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Available actions (from last request)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── State machine: IDLE | DECIDING`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── Timeout timer`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Table \"table-7\" (european-roulette)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Current game state`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Available actions (from last request)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── State machine: IDLE | BETTING`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── Window timer`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`State machines are independent — a timeout on one table does not affect actions on another.`}),`\n`,_jsx(Heading,{level:`2`,id:`state-tracking-purpose`,children:`State Tracking Purpose`}),`\n`,_jsx(_components.p,{children:`The client tracks state to:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Present clean state to the agent`}),` — structured, validated, with explicit available actions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validate incoming messages`}),` — detect protocol violations or inconsistencies`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validate outgoing actions`}),` — prevent the agent from acting outside available actions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Detect protocol violations`}),` — flag unexpected state transitions`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The client acts as a guardrail. Even if the raw protocol would permit it, the client MUST NOT allow the agent to act outside of the available actions.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"State Management","description":"Tracking game state and validating actions.","href":"/spec/client/state-management"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Parsing Incoming State","slug":"parsing-incoming-state","depth":2,"children":[]},{"title":"Action Validation","slug":"action-validation","depth":2,"children":[]},{"title":"Per-Table State","slug":"per-table-state","depth":2,"children":[]},{"title":"State Tracking Purpose","slug":"state-tracking-purpose","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"a2gprotocol","siteName":"A2G Protocol","title":"State Management - A2G Protocol","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-29T08:00:20.229Z","originalFileLocation":"spec/client/state-management.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Tracking game state and validating actions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"A2G Protocol\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"State Management - A2G Protocol\">\u003cmeta data-mint-head property=\"og:description\" content=\"Tracking game state and validating actions.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"A2G Protocol\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://a2g-protocol.org/spec/client/state-management\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://a2gprotocol.mintlify.site/_mintlify/api/og/v2?division=Client+Runtime\u0026amp;title=State+Management\u0026amp;description=Tracking+game+state+and+validating+actions.\u0026amp;theme=034a077a266e5edf16e8fde8\u0026amp;signature=bc91266e1942b6f86d5384ad2f4c31897ccace91c7afc34fda51c6663ced9bc3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"State Management - A2G Protocol\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Tracking game state and validating actions.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://a2gprotocol.mintlify.site/_mintlify/api/og/v2?division=Client+Runtime\u0026amp;title=State+Management\u0026amp;description=Tracking+game+state+and+validating+actions.\u0026amp;theme=034a077a266e5edf16e8fde8\u0026amp;signature=bc91266e1942b6f86d5384ad2f4c31897ccace91c7afc34fda51c6663ced9bc3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/a2gprotocol/nWEDHaU3DZ6b2bK5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"A2G Protocol\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://a2g-protocol.org/spec/client/state-management\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/spec/client/state-management.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://a2g-protocol.org/#organization\",\"name\":\"A2G Protocol\",\"url\":\"https://a2g-protocol.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/a2gprotocol/V8KpRpHMRY9DAIxL/logo/light.svg?fit=max\u0026auto=format\u0026n=V8KpRpHMRY9DAIxL\u0026q=85\u0026s=8941a09fa71ddad45fb9f8703141e4ad\"}},{\"@type\":\"WebSite\",\"@id\":\"https://a2g-protocol.org#website\",\"name\":\"A2G Protocol\",\"url\":\"https://a2g-protocol.org\",\"publisher\":{\"@id\":\"https://a2g-protocol.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://a2g-protocol.org/spec/client/state-management#webpage\",\"url\":\"https://a2g-protocol.org/spec/client/state-management\",\"name\":\"State Management\",\"description\":\"Tracking game state and validating actions.\",\"dateModified\":\"2026-03-29T08:00:20.229Z\",\"isPartOf\":{\"@id\":\"https://a2g-protocol.org#website\"},\"breadcrumb\":{\"@id\":\"https://a2g-protocol.org/spec/client/state-management#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://a2g-protocol.org/spec/client/state-management#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Client Runtime\",\"item\":\"https://a2g-protocol.org/spec/client/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"State Management\",\"item\":\"https://a2g-protocol.org/spec/client/state-management\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://a2g-protocol.org/spec/client/state-management#article\",\"headline\":\"State Management\",\"name\":\"State Management\",\"description\":\"Tracking game state and validating actions.\",\"url\":\"https://a2g-protocol.org/spec/client/state-management\",\"mainEntityOfPage\":{\"@id\":\"https://a2g-protocol.org/spec/client/state-management#webpage\"},\"dateModified\":\"2026-03-29T08:00:20.229Z\",\"publisher\":{\"@id\":\"https://a2g-protocol.org/#organization\"},\"isPartOf\":{\"@id\":\"https://a2g-protocol.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"A2G Protocol\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"A2G Protocol\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/spec/client/state-management.md","siteName":"A2G Protocol","nav":{"global":null,"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":""}]},{"tab":"Protocol Specification","groups":[{"group":"Fundamentals","pages":[{"title":"Specification Overview","href":"/spec/overview"},{"title":"Transport","href":"/spec/transport"},{"title":"Design Principles","href":"/spec/design-principles"}]},{"group":"Messages","pages":[{"title":"Message Envelope","href":"/spec/messages/envelope"},{"title":"Protocol Messages","href":"/spec/messages/protocol-messages"},{"title":"Gameplay Messages","href":"/spec/messages/gameplay-messages"},{"title":"Fairness Proof Messages","href":"/spec/messages/fairness-messages"}]},{"group":"Identity","pages":[{"title":"Identity (SIWE)","href":"/spec/identity/siwe-flow"},{"title":"Account Linkage","href":"/spec/identity/account-linkage"},{"title":"Session Management","href":"/spec/identity/sessions"}]},{"group":"Funding","pages":[{"title":"Funding Overview","href":"/spec/funding/overview"},{"title":"Transaction History","href":"/spec/funding/transactions"},{"title":"Rake \u0026 Fee Model","href":"/spec/funding/fees"}]},{"group":"Client Runtime","pages":[{"title":"Client Runtime","href":"/spec/client/overview"},{"title":"Spec Loading","description":"Fetching and parsing game specifications at runtime.","href":"/spec/client/spec-loading"},{"title":"State Management","href":"/spec/client/state-management"},{"title":"Timeout Handling","description":"Managing timeouts and default actions.","href":"/spec/client/timeout-handling"}]},{"group":"Advanced","pages":[{"title":"Lobby API","href":"/spec/advanced/lobby"},{"title":"Game Specification Format","href":"/spec/advanced/game-spec-format"},{"title":"Reconnection","href":"/spec/advanced/reconnection"},{"title":"Error Codes","href":"/spec/advanced/errors"},{"title":"Boundary Matrix","href":"/spec/advanced/boundary-matrix"}]}]},{"tab":"Game Extensions","pages":[{"title":"Game Extensions","href":"/games/overview"}]},{"tab":"Implementation Guide","pages":[{"title":"Implementation Guide","href":"/guide/operators/getting-started"}]}]},"basePath":"","title":"State Management - A2G Protocol","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}