Skip to main content
A platform paying suppliers, contractors, or marketplace sellers across borders typically holds dozens of banking relationships and a half-dozen currency accounts. Each new corridor adds another set of operational dependencies. The Agent CLI collapses that to a single USDC treasury on Polygon plus one command per recipient. Same-chain payouts go through send-token; cross-chain payouts go through swap --to-chain. Recipients who want fiat get a Trails off-ramp URL. Each disbursement carries dry-run + broadcast, so finance reviews the entire batch before any funds move. Each broadcast produces an onchain receipt that maps one-to-one with a row in your payout schedule. Who this is for:
  • AP managers running weekly or monthly multi-corridor disbursements
  • Marketplaces paying international sellers in their local rails
  • Gig and payroll platforms with contractors across regions
  • Payouts networks settling to vendors on different chains

How it works

Per-recipient payout
1APCLILoads schedule: recipient, address, chain, amount
2CLIDry-runs every row: send-token (same chain) or swap —to-chain (cross-chain)
3FinanceAPReviews total variance, signs off on the batch
4Smart walletTrailsBroadcasts batch with --broadcast; routes cross-chain via Trails
5TrailsRecipientUSDC lands on the destination chain (or off-ramps to fiat)
6CLIAPReturns per-recipient transaction hash for GL mapping
Each row in the schedule maps to one CLI command. Same-chain rows use send-token. Cross-chain rows use swap --from USDC --to USDC --to-chain <chain>. Recipients that want fiat receive a Trails widget URL via polygon-agent fund --wallet <theirs>; they complete the off-ramp themselves.

Get started

Same-chain payouts use send-token. Cross-chain payouts use swap --to-chain to bridge through Trails. Recipients who want fiat receive a Trails widget URL via fund. Every command is dry-run by default; broadcast the batch only after finance signs off.

Install

npm install -g @polygonlabs/agent-cli
polygon-agent setup --name "ap-treasury"
polygon-agent wallet create --usdc-limit 100000
No extra flags are needed for transfers and cross-chain swaps. Size --usdc-limit to cover a typical disbursement batch.

Drive it from an LLM

Read https://agentconnect.polygon.technology/SKILL.md and pay this week's vendor schedule: 500 USDC to 0xVendorA on Base, 250 USDC to 0xVendorB on Arbitrum, and 1000 USDC to 0xVendorC on Polygon. Dry-run the full batch first, then broadcast once I confirm. Report each transaction hash and the final balance on every chain.

Run the commands directly

# Same-chain payout
polygon-agent send-token --to 0xVendor --symbol USDC --amount 250
polygon-agent send-token --to 0xVendor --symbol USDC --amount 250 --broadcast

# Cross-chain payout (Polygon → Base)
polygon-agent swap --from USDC --to USDC --amount 500 \
  --chain polygon --to-chain base
polygon-agent swap --from USDC --to USDC --amount 500 \
  --chain polygon --to-chain base --broadcast

# Confirm balances across both chains
polygon-agent balances --chains polygon,base
Full reference: Transfers and Swaps and yield.

Implementation

Transfers

send-token reference: flags, dry-run, broadcast.

Swaps and yield

swap --to-chain for cross-chain payouts.

Balances and funding

Check balance before the batch; share fund URL with fiat-preferring recipients.

Trails

The underlying cross-chain router.