> For the complete documentation index, see [llms.txt](https://doc.lockerprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lockerprotocol.com/browser-extension/hyperliquid-perps/agent-key.md).

# The agent key

A time-limited trading key that lets you trade without a QR loop for every order.

Hyperliquid lets an account delegate *trading only* to a separate key, called an **agent**. The wallet generates one, your Vault approves it once by QR, and from then on orders are signed by the agent, in the browser. The agent **cannot withdraw** funds; only the Vault can.

{% stepper %}
{% step %}

### Activate trading

After your first deposit, tap **Activate trading**. Read and accept **Leverage trading involves risk** (**I understand**). The wallet creates the agent and shows the approval as a QR: scan it on the Vault, sign, scan back. Status: *Trading agent awaiting vault approval* → active.

<figure><img src="https://3674012151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2jyfPJ4rcVavAvTU9nL%2Fuploads%2Fgit-blob-f8563dfe3dcf0974464c9738a86d14b56fc5abc0%2F01-agent-setup.png?alt=media" alt="agent setup"><figcaption><p>The Perps tab once funded: balance, Add funds / Withdraw, and the markets below.</p></figcaption></figure>
{% endstep %}

{% step %}

### Expiry

<figure><img src="https://3674012151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2jyfPJ4rcVavAvTU9nL%2Fuploads%2Fgit-blob-b748b1f36b431b5f2ad31b8d7e27f4e871c0a0ca%2F02-agent-until.png?alt=media" alt="agent until"><figcaption><p>The trading agent and its expiry, with Renew and Cancel.</p></figcaption></figure>

**Settings → Perps trading agent** shows when it *expires*. The wallet warns you *in less than 3 days*, then *Your trading agent expired. Renew it with one vault scan.*
{% endstep %}

{% step %}

### Renew or replace

**Renew**, or **Generate a new agent** if *this trading agent no longer works on Hyperliquid*. One Vault scan each time.

<figure><img src="https://3674012151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2jyfPJ4rcVavAvTU9nL%2Fuploads%2Fgit-blob-b5942cd23a6c10792951f91e6bb1f848e8aa5515%2F03-agent-renew.png?alt=media" alt="agent renew"><figcaption><p>Trading agent awaiting vault approval, with Renew and Cancel.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The agent key is stored in the extension, encrypted with your **wallet password** (*protects the trading key at rest*). Set one in [Password & auto-lock](/browser-extension/password-and-auto-lock.md); when the wallet is locked, trading is locked too (*Wallet locked: unlock to trade*).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.lockerprotocol.com/browser-extension/hyperliquid-perps/agent-key.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
