AgentWallex logo
Docs

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/sdk

Or for Python:

pip install agentwallex

Quick 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

  1. Policy Check — The policy engine validates the transaction against your agent's rules
  2. MPC Signing — The transaction is signed using 2-of-3 threshold MPC (no single party ever holds the full key)
  3. Broadcast — The signed transaction is submitted to the network
  4. 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/openclaw

Then tell your agent: "Set up AgentWallex" — no config files needed.

See OpenClaw Plugin & Skill for the full guide.

Next Steps