Agentic PaymentsPolygon Agent CLI

CLI Reference

Complete reference for all Polygon Agent CLI commands.

All commands are invoked as polygon-agent <command>. Write operations are dry-run by default. Append --broadcast to execute onchain.


setup

Creates a local EOA and provisions a Sequence Builder project. Returns a SEQUENCE_PROJECT_ACCESS_KEY.

polygon-agent setup --name <name> [--force]
FlagDescription
--name <name>Name for the agent setup
--forceOverwrite existing builder configuration

wallet

wallet create

polygon-agent wallet create [options]

Opens a browser approval flow to create a session-based Sequence Ecosystem Wallet. The CLI auto-waits for approval unless --no-wait is passed.

FlagDefaultDescription
--name <name>mainWallet name
--chain <name|id>polygonTarget chain
--timeout <seconds>300Approval window timeout
--no-waitSkip auto-wait; return URL for manual approval
--native-limit <amount>Max native token (POL) per session
--usdc-limit <amount>Max USDC per session
--usdt-limit <amount>Max USDT per session
--token-limit <SYM:amount>Max for any token, e.g. WETH:0.1
--usdc-to <address>Pre-approve a USDC transfer to this address
--usdc-amount <amount>Amount for the pre-approved USDC transfer
--contract <address>Whitelist a contract address for this session

wallet import

polygon-agent wallet import --ciphertext '<blob>|@<file>' [--name <name>] [--rid <rid>]

Imports an encrypted session blob returned by the Connector UI in manual callback mode.

wallet list

polygon-agent wallet list

Lists all locally stored wallets.

wallet address

polygon-agent wallet address [--name <name>]

Prints the address of the specified wallet (defaults to main).

wallet remove

polygon-agent wallet remove [--name <name>]

Removes a wallet from local storage.


balances

polygon-agent balances [--wallet <name>] [--chain <chain>]

Queries ERC-20, ERC-721, and ERC-1155 token balances via the Sequence indexer.


send

polygon-agent send --to <address> --amount <number> [--symbol <SYM>] [--broadcast]

Sends tokens from the active wallet. Omit --symbol to send native POL.


send-native

polygon-agent send-native --to <address> --amount <number> [--broadcast] [--direct]

Sends native currency. Pass --direct to bypass the ValueForwarder contract and send directly.


send-token

polygon-agent send-token --symbol <SYM> --to <address> --amount <number> [--broadcast]

Sends an ERC-20 token.


swap

polygon-agent swap --from <SYM> --to <SYM> --amount <number> [--to-chain <chain>] [--slippage <number>] [--broadcast]

Swaps tokens via Trails. Use --to-chain for cross-chain swaps.


deposit

polygon-agent deposit --asset <SYM> --amount <number> [--protocol aave|morpho] [--broadcast]

Deposits into a lending protocol via Trails.


fund

polygon-agent fund [--wallet <name>] [--token <address>]

Opens the Trails funding widget to bridge or deposit assets from another chain.


x402-pay

polygon-agent x402-pay --url <url> --wallet <name> [--method GET] [--body <string>] [--header Key:Value]

Makes an x402 micropayment to an HTTP endpoint. Signs an EIP-3009 transferWithAuthorization from the specified wallet.


agent

agent register

polygon-agent agent register --name <name> [--agent-uri <uri>] [--metadata <k=v,k=v>] [--broadcast]

Registers the agent as an ERC-721 NFT via ERC-8004 on Polygon mainnet.

agent wallet

polygon-agent agent wallet --agent-id <id>

Returns the wallet address associated with a registered agent.

agent metadata

polygon-agent agent metadata --agent-id <id> --key <key>

Reads a metadata field for a registered agent.

agent reputation

polygon-agent agent reputation --agent-id <id> [--tag1 <tag>]

Returns the reputation score for a registered agent.

agent reviews

polygon-agent agent reviews --agent-id <id>

Lists all reviews submitted for a registered agent.

agent feedback

polygon-agent agent feedback --agent-id <id> --value <score> [--tag1 <tag>] [--tag2 <tag>] [--endpoint <url>] [--broadcast]

Submits a reputation feedback score for a registered agent.

Edit on GitHub

Last updated on