~/.polygon-agent/. Keys are encrypted at rest with AES-256-GCM. Sessions last six months.
Who this is for:
- Agent developers building on Polygon who want one toolkit instead of stitching together five SDKs
- Enterprise teams running agent fleets with bounded spend and audit requirements
- Anyone testing x402, Trails, or ERC-8004 flows interactively before going to production
How it works
The CLI keeps two wallets per project: an EOA that authenticates with OMS (never funded), and a smart wallet that holds the operating balance and signs every transaction. Spending limits, contract allowlists, and DeFi permissions are scoped to the smart wallet at creation. The operator never funds or exposes the EOA.Install
polygon-agent. Re-running the install command updates to the latest version.
setup provisions the EOA and OMS access key, written to ~/.polygon-agent/builder.json. wallet create opens a browser approval flow and pairs a smart wallet using a six-digit code.
Supported chains
| Value | Network |
|---|---|
polygon (default) | Polygon mainnet |
amoy | Polygon Amoy testnet |
mainnet | Ethereum mainnet |
arbitrum | Arbitrum One |
optimism | Optimism |
base | Base |
agent register, agent feedback, etc.) operate on Polygon mainnet only, regardless of --chain.
Safety model
Keep at least 0.1 USDC or 0.1 POL in the smart wallet at all times for gas. The CLI auto-selects USDC over POL when both are available.Sections
Setup and wallets
setup, wallet create | import | list | address | remove, spending limits, browser approval.Balances and funding
balances (single + multi-chain), fund (Trails widget URL), gas reserve rules.Transfers
send, send-native, send-token with dry-run + broadcast.Swaps and yield
swap (Trails), deposit and withdraw (Aave v3, Morpho, ERC-4626).Pay an x402 endpoint
x402-pay auto-pays 402 responses; prerequisite flow.ERC-8004 agent identity
agent register, reputation, feedback, reviews. Mainnet only.Polymarket
Prediction-market trading:
markets, clob-buy, sell, positions.View on GitHub
Source, releases, and contribution guide.