Agent Payment for Openclaw

An autonomous agent payment skill enabling EVM wallet generation, x402 protocol credit funding, and cryptographic request signing for marketplace transactions.

agentpmt
v1.0.2
Jun 10, 2026
0
545
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-payment

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-payment using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Agent Payment?

The Agent Payment skill provides a unified mechanism for autonomous AI agents to manage financial transactions independently on the AgentPMT marketplace. By integrating this skill, software agents gain the capability to generate dedicated EVM-compatible wallets via AgentAddress, securely fund accounts with USDC-denominated credits through the x402 protocol, and authenticate transaction endpoints using cryptographic signatures.

Operating autonomously requires an efficient and secure billing layer. This skill removes friction by handling session nonces and EIP-191 compliant message signing natively. This guarantees that external AI agents can discover, procure, and invoke third-party tools or workflows within Openclaw Skills environments while maintaining complete economic and cryptographic sovereignty.

Agent Payment Use Cases

  • Autonomous Tool Procurement: Enabling independent AI agents to buy credits and pay for APIs, compute, or workflow microservices on the fly.
  • Decentralized Agent Identity: Provisioning secure, unique EVM addresses for agents to establish financial footprints and execute smart contracts.
  • Secured Machine-to-Machine Payments: Utilizing the x402 protocol to handle programmatic 402 Payment Required challenges without human intervention.
  • Cryptographic Request Authentication: Signing data payloads to call path-bound marketplace tools securely using specialized session keys.

How Agent Payment Works

  1. Wallet Generation: The agent sends a secure POST request to the AgentAddress endpoint to automatically initialize an EVM-compatible wallet containing a public address, private key, and mnemonic phrase.
  2. Credit Acquisition via x402: The agent attempts to purchase USDC credits; if challenged by an HTTP 402 response, it parses the required authorization, signs it, and resubmits the transaction with a validated payload.
  3. Session Establishment: To guarantee message freshness, the agent initializes an authenticated session to receive a unique cryptographic session nonce.
  4. EIP-191 Message Composition: The agent constructs a canonical, lowercased text block matching the specific schema required for either balance checks or tool invocations.
  5. Cryptographic Signing and Execution: The payload hash is computed via SHA-256 and signed with the private key, permitting the agent to run paid balance checks or invoke marketplace tools.

Agent Payment Setup

Prerequisites

Install the required Python cryptographic and HTTP networking dependencies directly through your CLI:

pip install requests eth-account

Core Installation

Ensure this component is pulled directly into your workflow directory or initialized through your main skill manager file.

⚠️ Security Notice

Private keys and mnemonics returned during initialization must be offloaded to an encrypted environment or secret manager. Never expose credentials inside application prompt texts, system logs, or unencrypted storage.

Agent Payment Data Schema & Taxonomy

The Agent Payment mechanism strictly validates data shapes based on specific operational goals. Use the following structures to formulate valid requests:

Balance Verification Schema

Message Field Description / Format
agentpmt-external Static protocol header indicator
wallet: Lowercased EVM wallet address matching the signer
session: The active session nonce retrieved from auth endpoints
request: A unique, single-use request identifier
action: Explicitly defined as balance
product: Marked with a placeholder dash -
payload: Kept entirely empty

Tool Invocation Schema

Message Field Description / Format
agentpmt-external Static protocol header indicator
wallet: Lowercased EVM wallet address
session: Active cryptographic session nonce
request: Fresh, unique request ID to protect against replay attacks
method: HTTP Verb utilized (e.g., POST)
path: Bounded canonical target resource path (e.g., /external/tools/{productSlug}/actions/{actionSlug}/invoke)
payload: Lowercase SHA-256 hash of key-sorted canonical parameters JSON without whitespace

Agent Payment Advanced Features

  • x402 Protocol Runtime Interception: Automated handling of HTTP 402 states to perform base64 signed auth credit updates smoothly mid-workflow.
  • EIP-191 Path-Bound Signatures: High-security, context-specific payload signing bounded directly to individual marketplace product and action slugs.
  • Error Self-Correction Routine: Native handling for mismatch errors (EXTERNAL_SIGNATURE_WALLET_MISMATCH or EXTERNAL_SIGNATURE_MALFORMED) that uses feedback payload parameters like expected message structures to realign formatting dynamically before issuing retries.
  • Automatic Replay Attack Mitigation: Intelligent generation of nonces combined with standard tracking of individual request identifiers to handle EXTERNAL_SIGNATURE_REQUEST_REPLAY exceptions automatically.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*