Agent SDK
@0xgasless/agent is a TypeScript client for building autonomous AI agents that hold stablecoins, pay merchants per call, and carry a verifiable on-chain identity — without ever storing a private key in your application.
npm install @0xgasless/agentWhat you get
Section titled “What you get”- Server-managed wallets. Every agent has an EOA whose private key lives in 0xGasless KMS. Your code never sees a key.
- x402 micropayments. Agents sign EIP-3009
TransferWithAuthorizationfor USDC on Avalanche, Fuji, and Base. Caps and policy are enforced server-side before any signature is produced. - No agent gas. The 0xGasless facilitator pays the on-chain gas for every settlement. Agents only need USDC to spend.
- ERC-8004 identity. Mint a public on-chain identity NFT for each agent. Other contracts and dApps can look it up. 0xGasless sponsors the gas.
- Audit log. Every verify and settle is recorded and queryable. Build compliance views without writing your own logging.
- Multi-chain by default. Same SDK call, just change
chain: 'base'.
When to use it
Section titled “When to use it”| Use case | Fit |
|---|---|
| Autonomous AI agent that pays for APIs | ★★★★★ |
| Telegram / Discord bot that buys things for users | ★★★★★ |
| Background workers that settle micropayments | ★★★★★ |
| End-user wallet for a consumer app | Use Embedded Wallets instead |
| Smart-contract sponsored UserOps | Use Smart Accounts instead |
The three pillars
Section titled “The three pillars” @0xgasless/agent │ ┌──────────┼──────────┐ ▼ ▼ ▼ Wallet Payment Identity (KMS) (x402) (ERC-8004)Each pillar maps cleanly to one resource on the client object:
| Pillar | Client surface |
|---|---|
| Wallet & lifecycle | client.agents.* |
| Payments | client.x402.*, client.facilitator.* |
| Identity | client.identity.* |
| Policy | client.policy.* |
Next steps
Section titled “Next steps”- Quickstart — install, create your first agent, send your first x402 payment, all under 5 minutes.
- Agents — create, list, get, balance, revoke.
- Payments — sign and settle x402 payments.
- Policy — caps, tiers, project default vs agent override.
- Identity — register agents on-chain (ERC-8004).
- Activity — query verify + settle audit logs.
- Errors — full error reference.
- Migrating from v1 — for users of the legacy
@0xgasless/agent-sdk.