Skip to content
0%

Give your AI agent a wallet without giving it your keys

Last updated: May 8, 20263 min read
Agent wallets in the Alchemy CLI

AI agents can now send, swap, bridge, and deposit onchain. From your terminal, without ever holding a private key.

Today we're shipping agent wallets in the Alchemy CLI. Developers can create a wallet from the Alchemy dashboard, grant the CLI scoped, time-bound access to it, and let an agent execute real transactions from the command line. The dashboard is the only place a wallet is created or revoked. The wallet's private key never touches the CLI, never touches Alchemy, and never sits in a .env file.

In the demo above, Claude finds the best Aave market for USDC, bridges funds to the right chain, and deposits into the pool. Until today, that workflow required either custom agent code holding a private key or a hand-built integration between a wallet SDK and a coding assistant. Now it is a few commands and a dashboard click.

How agents have transacted onchain until now

Until now, developers generally had two workable paths, and neither was a good default. Either a developer pastes a private key into .env and accepts that the agent now has full control of those funds, or they wire a wallet SDK into a custom backend and reproduce auth, signing, and revocation logic themselves. The first option is one stray prompt away from a drained wallet. The second is weeks of work that most teams should not be doing.

Agent wallets in the CLI replace both. You keep custody of the wallet through the Alchemy dashboard. The agent gets a scoped session you approved from the terminal. You can revoke that session in one click.

How it works

The architecture splits responsibilities three ways. Privy is our embedded wallet partner and securely holds the wallet's private key. We hold the CLI session and the verification layer in between. You hold approval and revocation control through the dashboard.

When you run alchemy wallet connect, the CLI generates a fresh P-256 keypair on your machine. The private key never leaves the device. Your browser opens to the Alchemy dashboard, where you create or pick the wallet you want the agent to use and approve the session. Approval attaches your CLI's public key as a signer on that wallet, scoped to specific capabilities and bounded by a session expiry you set in the dashboard.

Every signing call is a two-step challenge: Alchemy's backend builds the canonical payload Privy expects, your CLI signs the exact bytes locally, and only then does the request reach Privy. If the session expires, gets revoked from the dashboard, or fails any binding check, the next signing attempt is rejected before it leaves our infrastructure. Revocation is one click and takes effect immediately.

Once a session is live, the agent has access to the full transaction surface: send, swap, bridge, contract calls. Transactions go through our Wallet APIs, so gas sponsorship, batching, automatic retries, ERC-20 gas payments, and cross-chain swaps come along for the ride. The same CLI that already wrapped our Data APIs for queries now sends transactions through the wallet you authorized.

Built for coding agents from the start

The Alchemy CLI was designed from the ground up as a tool surface for AI agents. Two flags carry that intent: --json returns structured output for parsing, and --no-interactive disables prompts so commands never block on input. There is also an alchemy agent-prompt command that emits a JSON document describing every command, every flag, every error code, and runnable examples. Drop it into a system prompt and your agent learns the full surface in one shot.

That means agents pick up the new wallet commands automatically. No SDK to integrate, no docs page to interpret, no prompt engineering to teach the model how the new commands work. The CLI tells the agent itself.

What's available today

Agent wallets in the CLI are live now, with no waitlist and no separate tier. You need Node 22 or higher and an Alchemy account. The session and wallet-management surface lives in the dashboard; the transaction surface lives in the terminal.

bash
Copied
npm i -g @alchemy/cli@latest alchemy auth alchemy wallet connect

Three commands and you have an agent-controllable wallet ready to use. The full reference, including every command, every flag, and every supported network, is in the CLI docs.

If you ship agents that need to act onchain, the CLI is the surface we want you on. Install the CLI and sign in to the dashboard.

Alchemy Newsletter

Be the first to know about releases

Sign up for our newsletter

Get the latest product updates and resources from Alchemy

A
O
D
+
Over 80,000 subscribers

By entering your email address, you agree to receive our marketing communications and product updates. You acknowledge that Alchemy processes the information we receive in accordance with our Privacy Notice. You can unsubscribe anytime.