Futures
Hundreds of contracts settled in USDT or BTC
TradFi
Gold
One platform for global traditional assets
Options
HOT
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Futures Kickoff
Get prepared for your futures trading
Futures Events
Participate in events to win generous rewards
Demo Trading
Use virtual funds to experience risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Launchpad
Be early to the next big token project
Alpha Points
New
Trade on-chain assets and enjoy airdrop rewards!
Futures Points
New
Earn futures points and claim airdrop rewards
Investment
Simple Earn
Earn interests with idle tokens
Auto-Invest
Auto-invest on a regular basis
Dual Investment
Buy low and sell high to take profits from price fluctuations
Soft Staking
Earn rewards with flexible staking
Crypto Loan
0 Fees
Pledge one crypto to borrow another
Lending Center
One-stop lending hub
VIP Wealth Hub
Customized wealth management empowers your assets growth
Private Wealth Management
Customized asset management to grow your digital assets
Quant Fund
Top asset management team helps you profit without hassle
Staking
Stake cryptos to earn in PoS products
Smart Leverage
New
No forced liquidation before maturity, worry-free leveraged gains
GUSD Minting
Use USDT/USDC to mint GUSD for treasury-level yields
Polygon Launches Agent CLI Toolkit Enabling AI Agents to Transact Onchain with Stablecoins
The March 5, 2026 launch provides developers with pre-integrated infrastructure allowing agents to operate entirely in stablecoins without managing native gas tokens, while keeping private keys outside the language model context to mitigate prompt injection risks.
Infrastructure Fragmentation Problem
The Polygon Agent CLI addresses the infrastructure challenges development teams face when equipping AI agents with onchain financial capabilities. Previously, integrating agents with blockchain required assembling separate components including wallet libraries, gas abstraction layers, swap APIs, bridge APIs, and identity systems, each from different providers and none designed specifically for agent-related threat models.
This fragmented approach created fragile infrastructure underlying systems intended to operate autonomously. The Polygon Agent CLI replaces this stack with an integrated toolkit installable with a single npm command.
Technical Architecture and Components
Installation and Setup
The toolkit installs via a single command:
npm install -g @polygonlabs/agent-cli
From installation, agents can create wallets, check balances across chains, send tokens, execute swaps, bridge assets, register onchain identity, build reputation, and pay for x402 endpoints. All operations occur in stablecoins without requiring native gas token management.
Three-Layer Architecture
The CLI is built on three integrated layers:
Wallet Infrastructure: Session-scoped smart contract wallets with per-token spending limits, contract whitelists, and 24-hour expiration. Private keys never enter the agent’s context window, preventing prompt injection attacks from extracting credentials.
Transaction Orchestration: Polygon Trails handles routing, price discovery, and execution behind a single command. Agents can execute swaps, bridges, or any onchain action without needing to know which DEX or protocol handles each operation.
ERC-8004 Identity Standard: Native support for the Ethereum standard for agent identity, co-authored by MetaMask, the Ethereum Foundation, Google, and Coinbase. Agents can register verifiable onchain identity, accumulate portable reputation, and become discoverable by other agents and services.
Stablecoin-Native Design and Gas Abstraction
No Gas Token Management
Agents pay for every onchain action in USDC or other stablecoins, eliminating the need to hold POL, ETH, or any native gas token. The abstraction layer handles all gas management automatically.
x402 Protocol Support
The toolkit includes support for the x402 protocol, enabling agents to pay for HTTP requests and API data feeds per-request directly in stablecoins. This eliminates API key management and subscription models, allowing agents to pay only for consumed resources as part of normal HTTP flow.
Security Features
Key Isolation
The session wallet architecture keeps private keys encrypted at rest and outside the agent’s context window. Prompt injection attacks cannot convince an agent to reveal keys it does not have access to.
Dry Run Mode
Every command executes a dry run by default, showing agents exactly what will happen before any transaction broadcasts. In agentic contexts where agents may make thousands of decisions, this preview-before-commit mechanism maintains human oversight over actual onchain activity.
Configurable Guardrails
Wallets include built-in guardrails with configurable allowances, spending limits, and contract permissions, mitigating prompt injection risk at the infrastructure level rather than relying solely on agent behavior.
Integrated Capabilities
The Polygon Agent CLI provides comprehensive onchain functionality through a unified interface:
Wallet creation and management with session-scoped security
Token sending, swapping, and bridging across chains
DeFi deposits and other onchain actions
Onchain agent identity registration via ERC-8004
Portable, verifiable reputation building
Cross-chain token balance queries
Transaction history and onchain state access via dedicated RPCs and built-in token indexer
Framework Compatibility
The toolkit installs as a skill via Openclaw with a single line, as a Claude skill, or directly from the GitHub repository. It works with LangChain, CrewAI, and any framework supporting tool use, allowing agents to execute wallet, token, swap, and identity operations autonomously with full context.
Standards Development Context
ERC-8004 represents an emerging Ethereum standard for agent identity, enabling agent-to-agent commerce through verifiable onchain identity and reputation. The standard was co-authored by major industry participants including MetaMask, the Ethereum Foundation, Google, and Coinbase, indicating broad support for interoperable agent identity infrastructure.
The x402 protocol for HTTP micropayments enables per-request payments in stablecoins, allowing agents to access APIs and data services without traditional subscription or API key models.
FAQ: Polygon Agent CLI
Q: What is the Polygon Agent CLI and what does it enable?
A: The Polygon Agent CLI is an integrated command-line toolkit that provides AI agents with everything needed to operate onchain in a single installation, including wallet creation, token sending and swapping, cross-chain bridging, onchain identity registration, and stablecoin payments. Agents can perform all operations without managing native gas tokens.
Q: How does the Polygon Agent CLI protect against prompt injection attacks?
A: The toolkit uses session-scoped smart contract wallets where private keys never enter the language model’s context window. Keys remain encrypted at rest outside the agent’s awareness, preventing prompt injection attacks from extracting credentials. Configurable spending limits and contract permissions provide additional guardrails.
Q: What are ERC-8004 and x402, and why are they important for the agent economy?
A: ERC-8004 is an Ethereum standard for agent identity, co-authored by MetaMask, the Ethereum Foundation, Google, and Coinbase, enabling agents to register verifiable onchain identity and build portable reputation. The x402 protocol allows agents to pay for HTTP requests and API data feeds per-request directly in stablecoins, eliminating API key management and enabling micropayments for data services.
Q: How do agents pay for transactions without holding native gas tokens?
A: The Polygon Agent CLI includes native gas abstraction, allowing agents to pay for every onchain action in USDC or other stablecoins. The abstraction layer handles all gas management automatically, so agents never need to hold POL, ETH, or any other native gas token.