The Polygon Agentic CLI is a command-line toolkit that gives AI agents and autonomous applications full access to the Polygon payments stack in a single install. It handles wallet creation, token transfers, cross-chain bridging, x402 micropayments, and ERC-8004 onchain identity without requiring agents to manage multiple SDKs or dependencies.Documentation Index
Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
Use this file to discover all available pages before exploring further.
View on GitHub
Source code, releases, and contribution guide.
What it includes
| Capability | Description |
|---|---|
| Smart contract wallets | Session-based wallets via Sequence. Create and manage wallets with scoped permissions per agent session. |
| Token operations | Send, swap, bridge, and deposit tokens via Trails routing. Single command for any cross-chain transfer. |
| x402 micropayments | Pay x402-protected API endpoints and register resources as a seller. Built-in buyer and seller flows. |
| ERC-8004 identity | Register and update onchain agent identity and reputation. Interact with Identity, Reputation, and Validation registries. |
| Encrypted storage | AES-256-GCM encrypted local storage for keys and session state. No plaintext secrets on disk. |
Install
Quick start
1. Create a walletKey commands
Wallet
| Command | Description |
|---|---|
wallet create | Create a new session-based smart contract wallet |
wallet list | List all managed wallets |
wallet balance | Show token balances for a wallet |
wallet export | Export wallet credentials |
Token operations
| Command | Description |
|---|---|
token send | Transfer tokens to an address |
token swap | Swap tokens via Trails routing |
token bridge | Bridge tokens cross-chain |
token deposit | Deposit tokens to a protocol |
x402
| Command | Description |
|---|---|
x402 pay | Pay an x402-protected endpoint |
x402 serve | Protect a local endpoint with x402 payment gating |
x402 status | Check payment status for a resource |
Identity (ERC-8004)
| Command | Description |
|---|---|
identity register | Register onchain agent identity |
identity update | Update identity metadata |
identity reputation | Read reputation score for an agent address |
identity verify | Verify an agent’s credentials against the Validation registry |
Configuration
The CLI reads from~/.polygon-agent/config.json by default. You can override with --config:
Security
- Private keys are encrypted at rest with AES-256-GCM
- Session keys are scoped per operation with configurable spending limits
- No keys are transmitted to external services
Related
x402 Protocol
HTTP-native micropayments that the CLI uses under the hood.
ERC-8004
Onchain identity and reputation standard for agents.
LLM Wallet MCP
MCP server for wallet operations inside Claude and Cursor.
Agentic Wallets
Wallet infrastructure designed for autonomous agent use.