Skip to main content
In this tutorial, you’ll give the CLI a wallet with a $20 allowance, add a few dollars of USDC, and swap $1 of it. Along the way you’ll see the two things every agent built on OMS relies on: a limit the person approves, and a preview before money moves. Everything in this tutorial is live. You need Node.js 22 or later, a browser on the same computer, and a few dollars of USDC on Polygon in any wallet or exchange account.
1

Install the CLI

You’ll see the version number. The CLI is also available as polygon-agent.
2

Connect a wallet with an allowance

A sign-in page opens in your browser. Sign in with your email or Google account. The page shows what you’re approving: up to $20 over 7 days for this install.Back in the terminal, the CLI prints your wallet address and a dashboard link. The wallet is yours. The CLI holds only a key that can spend within the $20.
3

Check the connection

Notice connected: true, mode: "session", and the allowance you have left. Run this whenever you want to know where the agent stands.
4

Add funds

The dashboard opens with your wallet address. Send $3 or more of USDC on Polygon to it. When it arrives, check:
You’ll see the USDC in a table of tokens and amounts.
5

Preview a swap

Nothing moves yet. The CLI shows a quote: what you’d sell, what you’d get at minimum, the fees, and when the quote expires. It also prints an intentId and the command to execute it.
6

Execute the swap

Run the command the preview printed, with your intentId:
The swap goes through, and the CLI shows the transaction link. Run agent balances again to see about 1 USDT next to your USDC.
7

See what's left of the allowance

The swap came out of your $20. When the allowance runs out or the 7 days end, the CLI asks you to sign in again before it spends more.
You’ve connected an agent to a wallet you own, limited what it can spend, and watched it preview and then execute a trade.

Next

Use it from your assistant

Give Muse, Grok, Claude Code, or another assistant the same wallet.

Move money

Send, bridge, set price watches, and earn yield.