← 返回
AI智能 Key 中文

AgentWallex Payment

Create and manage AI agents, send USDC/USDT payments, check balances across Ethereum, BSC, and Tron
创建管理AI代理,发送USDC/USDT支付,检查以太坊、BSC、波场余额
hexcupe
AI智能 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 548
下载
💾 8
安装
1
版本
#latest

概述

AgentWallex Payment Skill

What It Does

The AgentWallex Payment skill gives AI agents core capabilities for managing agents and crypto payments:

  • Zero-config setup — Set up AgentWallex through conversation. No config files or environment variables needed.
  • Create and manage agents — Create, update, suspend, and delete AI agents with dedicated wallets.
  • Multi-chain support — Operate across Ethereum, BSC, and Tron networks.
  • Check token balances — Query available, locked, and pending balances for any agent wallet on supported chains.
  • Send outbound transfers — Create and submit on-chain USDC/USDT transfers to any recipient address.
  • Query transaction status — Track payment lifecycle from pending through confirmed or failed, with full tx hash details.

Supported Chains & Tokens

Mainnet

ChainTokensAddress Format
-------------------------------
EthereumUSDC, USDT0x... (42 chars)
BSCUSDC, USDT0x... (42 chars)
TronUSDTT... (34 chars)

Sandbox (Testnet)

ChainNetworkTokens
------------------------
EthereumSepoliaUSDC, USDT
BSCBSC TestnetUSDC, USDT
TronNile TestnetUSDT

Start with sandbox for development and testing. Sandbox transactions use testnet tokens and don't cost real money.

Requirements

RequirementDetails
------
System binariescurl, jq

No API key or environment variable is needed upfront — credentials are configured through conversation and stored locally.

Setup

Install via ClawHub:

clawhub install agentwallex-openclaw

Then tell your AI agent:

"Set up AgentWallex"

The agent will use the agentwallex_setup tool and guide you through:

  1. Opening the AgentWallex Dashboard (sandbox) or Production Dashboard
  2. Signing in with Google
  3. Creating an API key (starts with awx_)
  4. Copying your Agent ID
  5. Pasting the credentials back — they're validated and saved automatically

Credentials are stored locally at ~/.openclaw/agentwallex/config.json with owner-only permissions (0600). No environment variables needed.

Reconfiguring

To change credentials or switch agents, just say:

"Reconfigure AgentWallex with my new API key awx_xxx and agent ID agent-123"

The agent will validate the new credentials and update the local config.

Upgrade

Update to the latest version:

openclaw plugins update @agentwallex/agentwallex-openclaw

Or update all plugins at once:

openclaw plugins update --all

Uninstall

openclaw plugins uninstall @agentwallex/agentwallex-openclaw

To keep plugin files on disk:

openclaw plugins uninstall @agentwallex/agentwallex-openclaw --keep-files

To also remove locally stored credentials:

rm -rf ~/.openclaw/agentwallex

Available Tools

ToolRequires ConfigDescription
---------
agentwallex_setupNoCheck configuration status and get setup instructions
agentwallex_configureNoValidate and save API credentials
agentwallex_create_agentYesCreate a new AI agent with its own wallet
agentwallex_list_agentsYesList all agents and their status
agentwallex_update_agentYesUpdate an agent's name or description
agentwallex_delete_agentYesDelete an agent
agentwallex_agent_statusYesUpdate agent status (active / suspended)
agentwallex_create_walletYesGet or create a deposit address for the agent
agentwallex_check_balanceYesCheck the agent's token balances (per chain)
agentwallex_payYesSend a payment to a recipient address
agentwallex_tx_statusYesQuery the status of a transaction
agentwallex_list_transactionsYesList transactions with filtering

API Reference

Environments

EnvironmentBase URLDescription
---------
Sandboxhttps://api-sandbox.agentwallex.com/api/v1Testing and development. Use sandbox API keys (awx_sk_test_*).
Production$AGENTWALLEX_BASE_URLLive environment. Use production API keys (awx_sk_live_*).

Start with sandbox for development and testing. Switch to production when ready to go live.

# Set the base URL (default: sandbox)
export AGENTWALLEX_BASE_URL="https://api-sandbox.agentwallex.com/api/v1"

All requests require the API key header:

X-API-Key: <your-api-key>

Response Format

Success (single object): Returns the object directly, no envelope.

{
  "agent_id": "agent-a1b2c3",
  "agent_name": "payment-bot",
  "chain": "ethereum",
  "status": "active"
}

Success (paginated list):

{
  "data": [ ... ],
  "total": 42,
  "has_more": true
}

Error:

{
  "code": "not_found",
  "type": "not_found_error",
  "message": "Agent not found"
}

Error types: validation_error (400), authentication_error (401), authorization_error (403), not_found_error (404), conflict_error (409), rate_limit_error (429), internal_error (500), service_unavailable (503).

Pagination Parameters

All list endpoints support:

ParameterTypeDefaultDescription
------------
page_numnumber1Page number
page_sizenumber20Items per page (max 100)
sortstringcreated_atField to sort by
orderstringdescSort order: asc or desc

Create Agent

Creates a new AI agent with its own wallet on the specified chain. Returns 201 Created.

curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "payment-bot",
    "chain": "ethereum",
    "agent_description": "Handles outbound payments"
  }' | jq

Request body:

FieldTypeRequiredDescription
------------
agent_namestringyesName for the new agent
chainstringyesBlockchain network: ethereum, bsc, tron (mainnet) or ethereum-sepolia, bsc-testnet, tron-nile (sandbox)
agent_descriptionstringnoOptional description of the agent's purpose
wallet_addressstringnoExisting wallet address to associate
metadatastringnoArbitrary metadata string

Response — An Agent object:

FieldTypeDescription
---------
agent_idstringUnique agent identifier
agent_namestringAgent name
chainstringBlockchain network
statusstringAgent status (active, inactive, suspended)
wallet_addressstringAssociated wallet address (if any)
created_atstringISO 8601 creation timestamp

List Agents

Lists all agents accessible to the current API key, with optional filtering.

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/agents?status=active&page_num=1&page_size=20" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq

Query parameters:

FieldTypeRequiredDescription
------------
statusstringnoFilter by status: active, inactive, suspended
chainstringnoFilter by blockchain network
page_numnumbernoPage number (default: 1)
page_sizenumbernoItems per page (default: 20)
sortstringnoSort field (default: created_at)
orderstringnoSort order: asc or desc (default: desc)

Response — A paginated list:

{
  "data": [
    {
      "agent_id": "agent-a1b2c3",
      "agent_name": "payment-bot",
      "chain": "ethereum",
      "status": "active",
      "wallet_address": "0x...",
      "created_at": "2025-03-01T12:00:00Z"
    }
  ],
  "total": 1,
  "has_more": false
}

Check Balance

Returns balances for a specific agent (one entry per chain/token).

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/agents/AGENT_ID/balance" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq

Response — An array of balance objects (one per chain/token):

FieldTypeDescription
---------
agent_idstringThe agent identifier
chainstringBlockchain network
tokenstringToken symbol (USDC or USDT)
availablestringAvailable balance for spending
lockedstringBalance locked in pending transactions
pending_incomestringIncoming funds not yet confirmed
total_depositedstringLifetime deposited amount
total_withdrawnstringLifetime withdrawn amount
total_paidstringLifetime outbound payments
total_earnedstringLifetime earned income

Get Deposit Address

Returns a deposit address for funding the agent wallet. EVM chains (Ethereum, BSC) share the same address.

curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents/AGENT_ID/deposit" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "ethereum"
  }' | jq

Request body:

FieldTypeRequiredDescription
------------
chainstringnoTarget chain: ethereum, bsc, tron (defaults to ethereum)

Response:

{
  "agent_id": "AGENT_ID",
  "chain": "ethereum",
  "address": "0x..."
}

Transfer

Initiates a transfer from an agent's wallet.

curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents/AGENT_ID/transfer" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "10.00",
    "to_address": "0xRecipientAddress",
    "chain": "ethereum",
    "token": "USDC"
  }' | jq

Request body:

FieldTypeRequiredDescription
------------
amountstringyesAmount to transfer
to_addressstringyesRecipient wallet address
chainstringnoTarget chain (defaults to ethereum)
tokenstringnoToken to transfer: USDC or USDT (defaults to USDC)

Response:

FieldTypeDescription
---------
transaction_idstringTransaction identifier
amountstringTransferred amount
to_addressstringRecipient address
chainstringBlockchain network
tx_hashstringOn-chain transaction hash (when available)
statusstringTransaction status

Get Transaction Status

Retrieves the current status and details of a transaction.

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/transactions/TRANSACTION_ID" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq

Response:

FieldTypeDescription
---------
transaction_idstringTransaction identifier
statusstringOne of: pending, completed, failed, cancelled
amountstringTransaction amount
from_addressstringSender wallet address
to_addressstringRecipient wallet address
tokenstringToken symbol (USDC or USDT)
chainstringBlockchain network
tx_hashstringOn-chain transaction hash (when available)
error_messagestringError details if status is failed
confirmed_atstringISO 8601 timestamp of confirmation

List Transactions

Lists transactions with optional filtering. Transactions are read-only.

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/transactions?agent_id=AGENT_ID&status=completed&page_num=1" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq

Query parameters:

FieldTypeRequiredDescription
------------
agent_idstringnoFilter by agent
statusstringnoFilter by status
directionstringnoFilter by direction: inbound, outbound
page_numnumbernoPage number (default: 1)
page_sizenumbernoItems per page (default: 20)

Workflow Examples

Flow 1: Check Balance, Send Payment, Verify Transaction

Step 1 — Check the agent's available balance:

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/agents/AGENT_ID/balance" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq '.[0].available'

Step 2 — Transfer funds (only if balance is sufficient):

TX=$(curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents/AGENT_ID/transfer" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "10.00",
    "to_address": "0xRecipientAddress",
    "chain": "ethereum",
    "token": "USDC"
  }')

TX_ID=$(echo "$TX" | jq -r '.transaction_id')
echo "Transaction ID: $TX_ID"

Step 3 — Check the transaction:

curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/transactions?agent_id=AGENT_ID&status=completed" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq '.data[0]'

Flow 2: Create Agent, Fund Wallet, Send Payment

Step 1 — Create a new agent:

AGENT=$(curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "payment-bot",
    "chain": "ethereum",
    "agent_description": "Handles outbound payments"
  }')

AGENT_ID=$(echo "$AGENT" | jq -r '.agent_id')
echo "Agent ID: $AGENT_ID"

Step 2 — Get a deposit address for the new agent:

DEPOSIT=$(curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents/$AGENT_ID/deposit" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chain": "ethereum"}')

echo "Deposit to: $(echo "$DEPOSIT" | jq -r '.address')"

Step 3 — After funding, check balance and transfer:

# Check balance
curl -s -X GET \
  "$AGENTWALLEX_BASE_URL/agents/$AGENT_ID/balance" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" | jq '.[0].available'

# Transfer USDC
curl -s -X POST \
  "$AGENTWALLEX_BASE_URL/agents/$AGENT_ID/transfer" \
  -H "X-API-Key: $AGENTWALLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "10.00",
    "to_address": "0xRecipientAddress",
    "chain": "ethereum",
    "token": "USDC"
  }' | jq

Guardrails & Safety

When using this skill, you MUST follow these rules:

  • Never send to zero or null addresses. Always validate that to_address is a non-empty, properly formatted address before creating a transaction.
  • Always check balance before sending. Query the agent's available balance and confirm it covers the intended amount plus potential fees.
  • Verify transaction amounts are reasonable. Before submitting, confirm the amount matches the intended payment. Reject or flag amounts that appear unusually large.
  • Confirm recipient address format. For EVM chains (Ethereum, BSC): address starts with 0x and is 42 characters. For Tron: address starts with T and is 34 characters.
  • Verify token support on chain. Ethereum and BSC support USDC and USDT. Tron only supports USDT.

Error Handling

HTTP StatusError TypeDescriptionAction
------------
400validation_errorInvalid request parametersCheck request body and fix validation errors
401authentication_errorInvalid or missing API keyRun agentwallex_setup to reconfigure credentials
403authorization_errorInsufficient permissionsCheck API key scope and agent ownership
404not_found_errorResource does not existVerify the ID is correct and exists
409conflict_errorResource conflictThe resource already exists or has a conflict
429rate_limit_errorToo many requestsBack off with exponential delay and retry
500internal_errorInternal server errorRetry after a short delay
503service_unavailableService temporarily unavailableRetry after a short delay

Troubleshooting

ProblemSolution
------
"AgentWallex is not configured yet"Run agentwallex_setup to start the setup flow, then use agentwallex_configure to save credentials.
"Invalid API key format"API keys must start with awx_. Get a valid key from the Dashboard.
Balance shows 0 but funds were depositedDeposits may take a few minutes to confirm on-chain. Wait and re-query. Also verify you are checking the correct chain.
Transaction stuck in pendingOn-chain confirmation times vary. Poll the transaction status endpoint periodically. If stuck for over 10 minutes, check the chain's block explorer using the tx_hash.
curl: command not foundInstall curl via your system package manager (apt install curl, brew install curl, etc.).
jq: command not foundInstall jq via your system package manager (apt install jq, brew install jq, etc.).

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-31 09:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,883
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,467
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,187