← AgentEconomy
npm install agentwallet-sdk · MIT · v4.0.5

agentwallet-sdk

Non-custodial AI agent wallet. Your agent holds its own keys.

The complete wallet SDK for autonomous AI agents. 17-chain CCTP, x402 native payments, ERC-6551 token-bound identity, and on-chain SpendingPolicy guardrails that let agents operate freely without custodial risk.

$npm install agentwallet-sdk

Key Features

17-Chain CCTP

Circle's Cross-Chain Transfer Protocol enables USDC transfers across 17 networks. Base, Ethereum, Arbitrum, Optimism, Polygon, Avalanche, and more. Your agent follows the yield.

x402 Payments

HTTP 402 Payment Required — native support for the x402 protocol. Agents pay for APIs, compute, and data per-request without human sign-off. The internet of agent payments.

ERC-6551 Identity

Token-bound accounts give every agent a persistent on-chain identity. The NFT IS the wallet — transfer the NFT, transfer ownership. Flash-loan resistant with epoch invalidation.

SpendingPolicy Guardrails

Set per-tx limits ($25 max), period budgets ($500/day), and over-limit queues. Agents operate freely within bounds — no human bottleneck. Audited, battle-tested smart contracts.

Usage Example

import { AgentWallet } from 'agentwallet-sdk';

// Initialize your agent's non-custodial wallet
const wallet = new AgentWallet({
  rpcUrl: 'https://mainnet.base.org',
  chain: 'base',
});

// Deploy a token-bound agent wallet (ERC-6551)
const agentAccount = await wallet.deploy({
  ownerAddress: '0xYourAddress',
});

// Set SpendingPolicy guardrails
await agentAccount.setPolicy({
  token: 'USDC',
  perTxLimit:    '25',    // $25 max per transaction
  dailyLimit:    '500',   // $500 max per day
});

// x402 payment — agent pays per API request
await agentAccount.payX402({
  endpoint: 'https://api.example.com/data',
  maxAmount: '0.10',
});

// Cross-chain USDC transfer via CCTP (17 chains)
await agentAccount.bridgeUSDC({
  toChain:   'ethereum',
  toAddress: '0xRecipient',
  amount:    '100',
});

Deployed Contracts

Base Mainnet

AgentAccountFactoryV2

0x700e9Af71731d707F919fa2B4455F27806D248A1
Base Sepolia

AgentAccountFactoryV2

0x337099749c516B7Db19991625ed12a6c420453Be
✅ Source verified on BaseScan✅ 2 security audits completed✅ 33 tests passing✅ Non-custodial, fully open-source

Works With Your Agent Framework

agentwallet-sdk integrates with all major agent frameworks. Pick your runtime and get started.

MA
Mastra

elizaos-plugin-agentwallet on npm

npm install elizaos-plugin-agentwallet
EL
ElizaOS

PR #285 + #286 open at elizaos-plugins/registry

github.com/elizaos-plugins/registry
A0
Agent Zero (a0)

Integrate via agentwallet-sdk npm directly

npm install agentwallet-sdk
LC
LangChain

Use as a tool via npm install

npm install agentwallet-sdk
CA
CrewAI

Python wrapper coming — track progress on GitHub

View GitHub Issues

Community Plugins

Third-party adapters built on agentwallet-sdk. Want to add yours? Open a PR.

agentwallet-polymarket
Polymarket prediction market trading adapter
Community · Open Source
agentwallet-uniswap
Uniswap v3 DEX swap integration
Community · Open Source
agentwallet-1inch
1inch aggregator for best swap routes
Community · Open Source