What is the GAME SDK plugin?
The@mandate.md/game-plugin package adds Mandate policy enforcement to GAME SDK agents by Virtuals Protocol. It exposes GameWorker functions that validate every on-chain action against your Mandate spending policies before execution. Available in both TypeScript and Python.
Installation
@virtuals-protocol/game is a peer dependency (>=0.1.0).
Usage
MandateWallet from the SDK for local signing. The Python version calls the Mandate API directly via HTTP for validation, and returns the result to the GAME agent for further action.
Functions
Configuration
Error handling
The GAME SDK uses a status-based return model. Functions return aFunctionResult with one of three statuses.
TypeScript example:
getEnvironment() method on the worker returns { chainId, policyEnforcement: 'active' }, giving the GAME agent context about its operating constraints.
Next Steps
Integrations Overview
Compare all supported agent frameworks side by side.
SDK Overview
Use the TypeScript SDK directly for maximum control.
ACP Plugin
Add Mandate to ACP (Agent Commerce Protocol) for inter-agent payments.