Skip to main content
balances reports holdings for one chain or many. fund returns a Trails widget URL that lets a finance operator fund the smart wallet in fiat (card, ACH, wire) or in crypto from another wallet. The CLI never constructs funding URLs manually, fund always uses the official Trails surface so the recipient address is correct. 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 native POL when both are available.

How it works

Funding flow
1OperatorCLIpolygon-agent fund —wallet treasury
2CLITrailsReturns funding URL (wallet.polygon.technology)
3FinanceTrailsPays via card, ACH, wire, or crypto
4TrailsSmart walletUSDC lands at the wallet address
5OperatorCLIpolygon-agent balances → confirms credit
The Trails widget is the same surface end customers use elsewhere in the Polygon stack. It handles KYC if required and supports off-ramp in the reverse direction.

Commands

balances

polygon-agent balances --wallet main --chain polygon
polygon-agent balances --chains polygon,base,arbitrum
FlagDefaultPurpose
--walletmainWallet name
--chainnoneSingle chain (defaults to wallet’s chain)
--chainsnoneComma-separated chain list, up to 20. Overrides --chain.
When --chains lists two or more chains, output is multi-chain JSON keyed by chain. Single-chain output is a markdown table.

fund

polygon-agent fund --wallet main --chain polygon
FlagDefaultPurpose
--walletmainWallet name to fund
--chainnoneChain to fund on
Returns the Trails widget URL as a clickable link. Hand the URL to a finance approver who completes the funding step in the browser. The recipient address is always the wallet’s onchain address; the CLI never accepts a manual destination here.
Always run polygon-agent fund to get the URL. Constructing one manually risks sending funds to the wrong address.

Worked example

# Get the funding URL
polygon-agent fund --wallet treasury --chain polygon
# → https://wallet.polygon.technology/fund?wallet=0xABC...&chain=polygon

# Confirm receipt after the finance team completes the on-ramp
polygon-agent balances --wallet treasury --chain polygon
# → 100.00 USDC, 0.5 POL

# Check across multiple chains
polygon-agent balances --wallet treasury --chains polygon,base,arbitrum

Implementation

Setup and wallets

Create the wallet before funding it.

Trails

The underlying funding surface.

Transfers

Move funds out of the wallet once they arrive.