Getting Started
Integrate AgentWallex in under 5 minutes
Overview
AgentWallex provides MPC-secured wallets for AI agents, enabling them to transact on-chain without exposing private keys. This guide walks you through setting up your first agent wallet.
Prerequisites
- Node.js 18+ or Python 3.9+
- An AgentWallex API key (
awx_...) (sign up for early access) - Basic understanding of blockchain transactions
Installation
Install the TypeScript SDK:
npm install @agentwallex/sdkOr for Python:
pip install agentwallexQuick Start
1. Initialize the Client
import { AgentWallex } from "@agentwallex/sdk";
const aw = new AgentWallex({
apiKey: process.env.AGENTWALLEX_API_KEY!,
environment: "sandbox", // use "production" for mainnet
});2. Create an Agent Wallet
const agent = await aw.agents.create({
name: "my-trading-agent",
chain: "eip155:84532",
policies: {
maxTransactionAmount: "100", // USDC
dailyLimit: "1000",
allowedAddresses: ["0x..."],
},
});
console.log(`Agent ID: ${agent.id}`);
console.log(`Wallet: ${agent.wallet.address}`);3. Execute a Payment
const tx = await aw.payments.send({
agentId: agent.id,
to: "0xRecipientAddress",
amount: "10.00",
token: "USDC",
});
console.log(`Transaction hash: ${tx.hash}`);
console.log(`Status: ${tx.status}`); // "confirmed"What Happens Under the Hood
- Policy Check — The policy engine validates the transaction against your agent's rules
- MPC Signing — The transaction is signed using 2-of-3 threshold MPC (no single party ever holds the full key)
- Broadcast — The signed transaction is submitted to the network
- Confirmation — AgentWallex monitors and confirms the transaction
Using an AI Agent Platform?
If you're using an agent platform like OpenClaw, OpenFang, or AutoGPT, you can skip the SDK setup entirely. Install the plugin and set up through conversation:
openclaw plugins install @agentwallex/openclawThen tell your agent: "Set up AgentWallex" — no config files needed.
See OpenClaw Plugin & Skill for the full guide.
Next Steps
- OpenClaw Plugin & Skill — Zero-config plugin for AI agent platforms
- TypeScript SDK Reference — Full API documentation
- REST API Reference — HTTP endpoints for custom integrations
- x402 Micropayment Integration — Enable pay-per-API-call
- Security Architecture — How MPC signing protects your agents
- Policy Configuration — Fine-tune spending controls