How to Provide Liquidity on Uniswap With AI

With Zerion CLI and Uniswap Skills, you can use Claude, Codex, or another AI agent to make it easier to provide liqudity and earn a yield.

How to Provide Liquidity on Uniswap With AI

Providing liquidity on Uniswap gives you control over the price range your capital covers. But that also means making more decisions, including which pool, fee tier, and range to choose.

This post shows how to plan the position with a clear view of everything else in your wallet, using an AI agent, the Zerion CLI, and Uniswap’s liquidity-planner skill.

First, remember the impermanent loss

Impermanent loss happens when your two pooled tokens move apart in price. 

The pool rebalances as people trade, so you end up holding more of the token that fell and less of the one that rose. Withdraw at that point and you can come out with less than if you'd just held both tokens and done nothing.

It's "impermanent" because the gap can close if prices recover. Often it doesn't, and the fees don't always cover it.

The key point: the main danger is deploying capital without knowing where you already stand.

LP into a pool built on a token you're already holding at a loss, and impermanent loss just deepens a position that's already underwater. Avoiding that starts with your portfolio, not the pool.

Plan the LP with portfolio context

Two tools do the work, with an AI agent driving it.

The Zerion CLI, powered by Zerion API, brings your wallet to the command line. An agent can read your positions, your PnL, and your total portfolio across every chain in real time, so any LP decision starts from what you actually hold.

The Uniswap liquidity-planner skill takes that context and turns your inputs (pool, fee tier, price range) into a position plan plus a deep link to create a Uniswap LP in a few clicks.

The LP workflow is one of the Zerion CLI's 30+ agent skills: uniswap-lp. You don't run each step by hand. You point your agent at the skill and let it work through the checks.

Step 1: Set up the Zerion CLI and Uniswap skill

Open Claude Code (or any AI agent with terminal access) and point it to zerion.io/agents and Uniswap skills.

Grab a free Zerion API key and share it with your agent. Keep your key in your environment, never in public code.

You can use this prompt to install both Zerion CLI with your API key (copy it from https://dashboard.zerion.io/) and Uniswap skills:

Prompt
Install Zerion CLI and Uniswap AI skills:
npx -y zerion-cli init -y --browser
npx skills add Uniswap/uniswap-ai
Set ZERION_API_KEY as an env var:
export ZERION_API_KEY="[PASTE_YOUR_ZERION_API_KEY_HERE]"
Docs: https://github.com/zeriontech/zerion-ai and https://developers.uniswap.org/docs/uniswap-ai/skills#install-skills

That's the whole setup. From here, you talk to your agent.

Step 2: Check your PnL before committing

Have the agent review unrealized gains and losses per asset. This rule saves you money. You don't deploy into a pool whose asset you're already holding at a loss. Impermanent loss would only pile onto it.Here is a simple prompt: 

Prompt
Check my positions, PnL, and total portfolio for  across all chains.

Step 3: Confirm the size

Tell the agent how much you’re considering allocating to the LP. It can calculate what percentage of your total portfolio that amount represents and flag whether the position is unusually large relative to everything else you own. Great fees don’t matter if one position concentrates too much risk.

Prompt
I’m considering allocating $5,000 to an ETH/USDC LP on Base. Calculate what percentage of my portfolio that would represent and flag whether it would create too much concentration.

Run the Uniswap /liquidity-planner skill. It takes your pool, fee tier, and price range (this is where concentrated liquidity comes in) and returns a position plan plus a Uniswap link you can review and execute.

Prompt
Use Uniswap’s /liquidity-planner skill to plan the position. Go with your recommendations.

The agent will give you the plan and a deep link to Uniswap to create your LP.

Alternative: Use the LP Planner app

0:00
/0:43

To show what’s possible, our intern vibecoded a simple LP Planner app that demos the use of Zerion and Uniswap skills. Just enter your address and it will find the best LP opportunity for it. 

Keep in mind that it’s just a demo (and it’s definitely not investment advice). It’s better to use your personal Zerion API key with your AI agent.

Why this beats LPing by hand

When you provide liquidity manually, you need to keep a lot of things in mind while also switching between tabs. This takes time and effort. So most people just skip it and let the LP ride if it's no longer optimal. 

With portfolio context built in, every LP becomes a deliberate decision that can be based on an algorithm. You know what you hold, you know where you stand, and you size the position on purpose. Instead of going by vibes, you can let the algorithm do the calculations on a regular basis. And then just review the results and sign the messages if needed. 

Try it

Set up the Zerion CLI, point your agent at it, and plan your next Uniswap LP with full context. Get your free Zerion API key and ask your AI agent to get started.


P.S. Represent a protocol or dapp? Open a PR to contribute your own skill to the Zerion CLI and get featured in future content.