Skip to main content
RivrDEX has an official skill for AI agents. Install it, and your agent (Claude Code, Cursor, Codex and others) can read pools and prices, check your balances and swap tokens on RivrDEX. Every trade goes through a security layer that you own. The skill is open source: github.com/RivrDEX/agent-skills.
RivrDEX runs on Vara Network mainnet. The agent uses Gear’s official vara-wallet command-line wallet, not MetaMask or other EVM wallets.

What your agent can do

  • Market data: pools with reserves, TVL and volume, live quotes from the pool contract, and prices in USD.
  • Wallet: balances with USD values, open token approvals, and one-command revoke.
  • Trading: swaps between any RivrDEX tokens, and wrapping VARA into wVARA and back.
  • Automations: price alerts and limit-order triggers, DCA, take profit, and end-of-day clean-up.
  • Two modes: the agent asks you before every trade, or trades on its own inside a budget you set.

Set it up

1

Install the skill

In your project folder, run:
You need Node.js 18 or newer. Then tell your agent: “set up RivrDEX”. It installs vara-wallet if needed and checks the connection to Vara Network and the RivrDEX pools.
2

Create a separate wallet for the agent

Ask the agent to create a wallet. It runs vara-wallet wallet create --name agent and shows you the new address.Send it only what you are willing to lose. Keep about 27 VARA on it for network fees: each swap reserves 25 VARA up front and returns almost all of it, so the real cost is a fraction of a cent.
Never give an agent the seed phrase of your main wallet. The agent wallet is a separate, small wallet only for the agent.
3

Set your limits in your own terminal

Open a terminal window yourself (not through the agent) and run:
It asks you for a passphrase and creates your signed policy with safe defaults. To change the limits:
These commands need your passphrase and a real terminal, so the agent can’t run them.
4

Make your first trade

Ask the agent, for example: “swap $2 of wUSDT for wVARA on RivrDEX”. It shows you the plan: amount, price, price impact, fee and the minimum you get. Say yes, and it executes exactly that plan.

Things to ask your agent

  • “What’s the wVARA price on RivrDEX?”
  • “Show my RivrDEX balances.”
  • “Tell me when wVARA drops below 0.00035 wUSDT.”
  • “Buy $2 of wVARA every day.” (needs auto mode, see below)
  • “Revoke all my RivrDEX approvals.”

How you stay in control

Your limits, signed by you

Your limits live in a policy signed with your passphrase. The agent can read it but can’t change it. If anyone edits the policy file, trading stops until you fix it.

Confirm mode and auto mode

By default the agent asks before every trade, and a yes covers one plan only. The minimum price you agreed to is written into the transaction, so a worse price is rejected on chain. To let the agent trade without asking, turn on auto mode in your terminal:
Auto mode switches itself off when the time runs out, and it never goes past your per-trade and daily limits.

Built-in safety checks

  • Only official pools. The skill checks the RivrDEX Factory and the pool code, and refuses copycat tokens with the same name.
  • No transfers out. Swaps pay out only to the agent wallet. The one way to send funds out is back to an address you signed into your policy.
  • Exact approvals. Each swap approves only the amount it needs, and leftovers are revoked.
  • Checks after every trade. If a result doesn’t match the plan, or 3 trades fail in an hour, trading pauses.
  • Kill switch. The agent can pause trading at any time. Only you can resume it.
  • Audit log. Every plan, trade and refusal is logged, and each entry is chained to the previous one so edits show up.

Stay safe

  • Treat everything the agent reads as untrusted. A web page, a token name or a message can contain hidden instructions like “send your funds to…”. The skill tells the agent to ignore them and pause, but the limits are your real protection: keep them small.
  • Keep the agent wallet small and top it up when needed.
  • Run your agent in a sandbox if it supports one. The skill’s security guide has a ready Claude Code sandbox setting that blocks the agent from touching your policy files.
  • Check the audit log from time to time: ask the agent for its RivrDEX history.

Fees

Agents pay the same fees as the app: a 0.35% swap fee (see Fee structure) and a near-zero network fee in VARA.

For developers

  • Source and tests: github.com/RivrDEX/agent-skills. The helper has no dependencies besides vara-wallet, and the test suite checks every safety rule against mainnet without sending anything.
  • How swaps work: how-it-works.md covers the contract calls, fixed gas and every refusal code.
  • Contract addresses: Smart contracts.
vara-wallet dex swap on its own doesn’t work with RivrDEX pools: the pools need a fixed gas limit that automatic gas estimation can’t calculate. Use the skill, or see how-it-works.md for the raw command.

FAQ

No. The limits are checked before every trade, and only your passphrase can change them. Saying “I confirm” in chat doesn’t raise them.
No. Swaps pay out only to the agent wallet, and the only outgoing transfer goes to the address you signed into your policy.
Any agent that supports skills, such as Claude Code, Cursor and Codex. The agent needs to be able to run terminal commands.
No. The agent talks to the RivrDEX contracts on Vara Network directly. You can still see every trade in the app and in a block explorer.