How to give an AI agent limited access

On Hyperliquid, an account approves a second key to trade for it, with an end date. The sizes, the leverage, the markets and the orders a day are not part of that approval: they have to come from somewhere else.

Last updated: Oct 16, 2026

The short answer

Approve a Hyperliquid API wallet, also called an agent key, with an expiry, and keep the account's own key where the computer cannot reach it. Then bound the sizes, the leverage, the markets and the orders a day in limits a program you trust checks before every order: the approval carries none of them.

Those are two separate jobs. Hyperliquid decides what kind of action the second key may sign, not how large, how levered, how often, or in which market.

Approve an agent key, with an end date

The approval is one signed action, ApproveAgent, sent by the account itself. It names the key's address and, optionally, a name; an expiry is written by appending valid_until and a timestamp after that name, at most 180 days in the future.

An account may keep one unnamed approved wallet and up to three named ones, plus two more per sub-account. The API wallet holds no funds: the documentation says it is only used to sign.

lpa init makes such a key on your computer, seals it on disk under a password you choose, and has your wallet sign the approval: Locker Vault, on an offline phone, as a QR code, or your extension or mobile wallet. Its default end sits an hour short of the 180-day ceiling.

What an agent key alone does not bound

An approved key can place, change and cancel orders, and set a market's leverage and margin. The approval names no largest order, no highest leverage, no markets and no count of orders a day.

  • Size. No notional, per order or per day.
  • Leverage. Any whole number from 1 to the market's maximum.
  • Markets and dexes. Any market the account can reach, builder dexes included.
  • Time. Only the expiry, and a revocation you sign yourself.

The mandate: limits signed by your wallet

A limits file on the computer is a start, and lpa keeps one: the largest order, the highest leverage, the dexes and the markets, the orders a day. Its defaults are $100 an order, three times leverage, the main dex, twenty orders a day. Anyone with a shell there can edit it, so a wider limit waits for your password at the next lpa unlock, while a narrower one holds at once.

The mandate is the same kind of limits, signed once by your wallet, where no program on the computer can reach them. Locker Vault, on the offline phone, decodes the request itself and shows every bound on its own row before you sign; with an extension or a mobile wallet, the page of this computer explains each raw field first.

BoundWhat it holds
Largest order, leverage, markets, orders a daythe computer's limits as they stand when you sign
Opened per day, at mosta ceiling in notional the local limits lack
Service fee, at most, and its recipientthe one rate and one address the agent may pay
Allowed usestrade, copy, pilot: whether orders go out without asking you
Traders copied, and the copy budgetten at most, and the dollars live copies share
Valid untilthe key's own end at the latest, 180 days

Before every opening, the guardian checks the signature, the term, the revocation, that the mandate is not older than the last one signed here, that the use is allowed, that the day's notional stays under the ceiling, and that the fee carried is the one named. It applies the narrower of the two, and closing a position is always allowed.

Keeping the access narrow

  • It ends with the key. 180 days at most, the longest Hyperliquid lets a trading key live. A shorter mandate is yours to sign, and each renewal brings you back to read the limits.
  • Lock the key when you stop. lpa unlock holds it eight hours by default, twenty-four at most; lpa lock ends that.
  • Two ways to stop. lpa mandate revoke needs no wallet and refuses every mandate up to that one; lpa agent revoke retires the key itself.
  • One account for this. Not the one holding your savings: one funded with what you are ready to lose.
What limits cannot do

The mandate binds the guardian, not the key. A program that reads the guardian's memory, or steals the sealed key file with its password, can talk to Hyperliquid without lpa, and no file on your computer stops it. What holds then is the venue's refusals, the expiry, and a small account.