Skip to main content
The package is @polygonlabs/agent-cli, and it requires Node.js 22 or later. The command is agent, with polygon-agent as an alias. Output is JSON: {"ok": true, ...} on success, or {"ok": false, "error", "code", "hint", "command"} on failure.

Global behavior

Chains

--chain takes a name or chain ID: polygon, amoy, mainnet (Ethereum), arbitrum, optimism, base, bsc, avalanche, and katana. The wallet address is the same on every chain. ERC-8004 commands run on polygon only.

Wallet

Balances and transfers

Trading and yield

Price watches

x402

Agent identity (ERC-8004)

Polymarket

Workspace installs

Environment variables

None are required.

Files

State lives in ~/.polygon-agent/, or <workspace>/.polygon-agent/state/ for a workspace install. Keys are encrypted at rest with AES-256-GCM.

Session-mode errors