Skip to main content

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

For TypeScript, @virtuals-protocol/game is a peer dependency (>=0.1.0).

Usage

The TypeScript version uses 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 a FunctionResult with one of three statuses. TypeScript example:
The getEnvironment() method on the worker returns { chainId, policyEnforcement: 'active' }, giving the GAME agent context about its operating constraints.
The Python plugin uses urllib.request with no external HTTP dependencies. It validates the transaction with Mandate but does not sign or broadcast. Your GAME agent handles the actual on-chain execution after validation passes.

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.