elizaOS plugin
An elizaOS plugin with three actions and a provider. The agent can find a tool from a plain-language task and call it, paying with a prepaid credits key or in USDC over x402, inside per-call and daily ceilings you set in the character config.
Install
elizaos plugins add elizaos-plugin-agent402
Example
{
"plugins": ["elizaos-plugin-agent402"],
"settings": {
"AGENT402_CREDITS_KEY": "a402_...",
"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 prepaid card-credits key; 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.
# pay from a wallet instead of a credits key
bun add @x402/fetch @x402/evm viem
# then set AGENT402_WALLET_KEY (an EVM key holding USDC on Base) in settings
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