TL;DR:
- Polygon launched the Agent CLI, an onchain toolkit for AI agents that includes wallets, payments, identity, and bridging in a single installation.
- Agents operate entirely in stablecoins, with no need to manage native gas tokens. Private keys remain outside the LLM context.
- The CLI includes native support for ERC-8004 and the x402 protocol.
PolygonĀ launched theĀ Agent CLI, a command-line tool that unifies inĀ a single installationĀ everything anĀ artificial intelligence agentĀ needs to operate onchain: wallet creation, token sending and swapping, cross-chain bridging, identity registration, and stablecoin payments. The initiative aims toĀ eliminate the infrastructure fragmentationĀ that development teams face when trying to equip their agents with autonomous financial capabilities.
Until now, integrating an agent with the chain requiredĀ assembling separatelyĀ a wallet library, a gas abstraction layer, a swap API, a bridge API, and an identity system, each component coming from a different provider with no specific design for the threat models unique to agents. Polygon’s CLIĀ replaces that fragmented stackĀ with an integrated system that installs with a single npm command.
Polygon Proposes an Agent Economy on Onchain Rails
The architecture is built onĀ three layers. The first consists ofĀ smart contract walletsĀ with session scope, per-token configurable spending limits, and a 24-hour expiration.Ā Private keys never enter the language model’s context, which neutralizes prompt injection attack vectors aimed at extracting them.
The second isĀ transaction orchestrationĀ throughĀ Polygon Trails, which handles routing, price discovery, and execution without the agent needing to know which DEX it uses in each operation. The third isĀ native support for ERC-8004, an Ethereum standard for agent identity, co-authored byĀ MetaMask,Ā the Ethereum Foundation, Google, and Coinbase.
ERC-8004 and x402: The Standards Defining Agent-to-Agent Commerce
The ERC-8004 standard allows each agent to register its identity onchain, accumulate portable reputation, and become discoverable by other agents and services. Complementarily, support for theĀ x402 protocolĀ enablesĀ micropayments per HTTP request to be executed directly in stablecoins, with no need to manage API keys or subscriptions. Agents pay exclusively for what they consume in each interaction.
Another important security element is theĀ dry run mode enabled by default: before any transaction is broadcast to the network, PolygonĀ presents a full preview of what will occur. In contexts where an agent can make thousands of decisions, that confirmation step keeps humans in control over what actually touches the chain. TheĀ toolkit is compatible with Claude, Openclaw, LangChain, and CrewAI, among other frameworks that support the use of this type of tool.






