What is the ElizaOS plugin?
The@mandate.md/eliza-plugin package registers Mandate actions and providers with your ElizaOS agent runtime. It adds three actions (transfer, x402Pay, sendEth) and one provider (walletStateProvider) that gives the agent context about its wallet address and chain.
Installation
@elizaos/core is a peer dependency (>=0.1.0).
Usage
Environment variables
| Variable | Required | Description |
|---|---|---|
MANDATE_RUNTIME_KEY | Yes | Mandate runtime key (mndt_live_... or mndt_test_...) |
MANDATE_PRIVATE_KEY | Yes | Agent wallet private key (hex, 0x prefix) |
MANDATE_CHAIN_ID | No | EVM chain ID. Defaults to 84532 (Base Sepolia). |
runtime.getSetting().
Actions
| Action name | Description |
|---|---|
MANDATE_TRANSFER | Transfer ERC20 tokens with policy enforcement. Accepts to, amount, tokenAddress. Similes: TRANSFER_TOKENS, SEND_TOKENS, ERC20_TRANSFER. |
MANDATE_X402_PAY | Pay for an x402-gated resource. Accepts url. Similes: X402_PAY, PAY_API, PAY_FOR_CONTENT. |
MANDATE_SEND_ETH | Send native ETH with policy enforcement. Accepts to, valueWei. Similes: SEND_ETH, TRANSFER_ETH, SEND_NATIVE. |
Providers
| Provider | Description |
|---|---|
walletStateProvider | Returns the wallet address and chain ID as a string. Gives the agent context for conversations about its wallet state. |
"Mandate wallet: 0x1234...abcd on chain 84532. Policy enforcement: active."
Error handling
Actions use ElizaOS callbacks to report errors. The handler returnsfalse on policy blocks and approval requirements, with a descriptive message in the callback.
content object in the callback gives your agent structured data to decide what to do next: retry later, reduce the amount, or prompt the user to approve in the dashboard.
Next Steps
Integrations Overview
Compare all supported agent frameworks and pick the right one.
Validate Transactions
Understand the full validation flow from preflight to confirmation.
Handle Errors
Catch and respond to every Mandate error type.