What is the GOAT SDK plugin?
The@mandate.md/goat-plugin package wraps Mandate’s policy engine as a GOAT SDK plugin. It exposes two tools: mandate_transfer for ERC20 transfers and mandate_x402_pay for x402 payment flows. Every tool call validates against your Mandate spending policies before signing or broadcasting.
The plugin extends PluginBase<EVMWalletClient> and works with any EVM chain supported by GOAT.
Installation
@goat-sdk/core is a peer dependency (>=0.3.0). Install it alongside the plugin.
Usage
mandate_transfer and mandate_x402_pay as tools.
Tools
Both tools create a
MandateWallet internally, validate the transaction against the Mandate API, sign locally, and broadcast. Your private key never leaves the process.
Configuration
Error handling
The plugin throws plainError objects with descriptive messages. This matches GOAT SDK conventions where tool errors surface as strings to the LLM.
@mandate.md/sdk directly. The SDK throws typed errors: PolicyBlockedError, ApprovalRequiredError, and CircuitBreakerError.
Next Steps
Integrations Overview
Compare all supported agent frameworks and choose the right one.
MandateWallet
Use MandateWallet directly for full control over the validate-sign-broadcast flow.
Handle Errors
Learn how to catch and respond to every Mandate error type.