elizaOS plugin
An elizaOS plugin with three actions and a provider, installed from npm into the agent project and named in the character's plugins list. The agent can find a tool from a plain-language task and call it, paying in USDC over x402 or with a credits key bought earlier, inside per-call and daily ceilings you set in the character config.
Install
npm install elizaos-plugin-agent402
Example
{
"plugins": ["elizaos-plugin-agent402"],
"settings": {
"AGENT402_WALLET_KEY": "0x...",
"AGENT402_MAX_PER_CALL_USD": "1"
}
}
What it exposes
AGENT402_FIND(free): a task in, matching tools out with price and a ready example input.AGENT402_CALL: runs one tool and returns its complete JSON result in the action text the model reads next.AGENT402_ABOUT(free): what the service is and how it is paid.- An
AGENT402provider that tells the agent each turn which payment mode is configured. Keys never appear in results or provider text.
How payment works
AGENT402_CREDITS_KEY: a credits key bought earlier; wallet-only tools are debited only on a successful call.AGENT402_WALLET_KEY: an EVM key paying USDC over x402 (optional peers@x402/fetch @x402/evm viem).- Neither set: the proof-of-work free tier still works.
AGENT402_MAX_PER_CALL_USD(default 1) andAGENT402_DAILY_LIMIT_USDare enforced per runtime before any request is sent; every paid call carries anIdempotency-Key.
# AGENT402_WALLET_KEY is an EVM key holding USDC on Base; it needs these peers
bun add @x402/fetch @x402/evm viem
# a credits key bought earlier still works: set AGENT402_CREDITS_KEY instead
A call that fails is not charged: settlement runs after the tool and only on a successful response. Background: What x402 is · MPP (Machine Payments Protocol).
Tools to try first
Every tool, price and input schema: the catalog.
Links
elizaos-plugin-agent402 on npm · source on GitHub
Guides: Use Agent402 from Claude Code, Cursor, VS Code, Windsurf, Cline, Roo Code, Codex CLI, Gemini CLI, Muse Code, Continue, ElizaOS, AgentCore and any OpenAI SDK · x402 and MPP on the same paywall: one server, two payment protocols
All integrations