> 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/hyper-agentic-trader/guardian-and-keys.md).

# The guardian and the keys

Where the agent key lives, what the guardian does with it, and what lpa status tells you.

Two keys exist, and they are not the same thing.

| Key                 | Where it lives                                                                                                                           | What it can do                                                                                                        |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **The account key** | in your wallet: Locker Vault on an offline phone or tablet, the safest; or your browser extension, or your mobile wallet. Never in `lpa` | everything: withdraw, send, approve an agent, sign a mandate                                                          |
| **The agent key**   | on the computer, sealed on disk under a password you choose                                                                              | place, change and cancel orders, set the leverage and the margin of a market, and set the referral code. Nothing else |

Which wallet holds the account key is chosen once, at `lpa setup` (Locker Vault first), and `lpa signer show` says it. Locker Vault is the safest because the key never touches a device that is online; an extension or a mobile wallet keeps it on a device that is. Whatever signs, `lpa` checks that each signature comes from the account before it sends anything. See [Three ways to sign](https://doc.lockerprotocol.com/hyper-agentic-trader/agent.md#three-ways-to-sign-for-your-account).

## The agent key

`lpa init` makes it on your computer, seals it under your password, and has your wallet approve it on Hyperliquid. Measured on Hyperliquid mainnet on 28 September 2026, with an approved agent key:

| Action signed by the agent key                                      | Hyperliquid's answer |
| ------------------------------------------------------------------- | -------------------- |
| Place, change and cancel orders, set leverage                       | accepted             |
| `withdraw3`, `usdSend`, `spotSend`, `sendAsset`, `usdClassTransfer` | refused              |
| `approveAgent` (approving another agent), `approveBuilderFee`       | refused              |
| `vaultTransfer` (depositing the account into a Hyperliquid vault)   | **accepted**         |

{% hint style="danger" %}
**A stolen agent key cannot withdraw, but it can lose money.** By trading against an accomplice on a thin market, or by depositing the account into someone else's Hyperliquid vault. `lpa` never signs that last one: its guardian signs a closed list of trading actions. But a thief with the key file and the password does not need `lpa`. The real protection is an account that holds only what you are ready to risk.
{% endhint %}

The key expires on its own, 180 days at most, which is the longest Hyperliquid allows. The default is written an hour short of that ceiling, so a clock running a little ahead is never refused.

```sh
lpa agent show      # the address, the end, the time left, what it can and cannot do
lpa agent renew     # a new one, one signature in your wallet
lpa agent revoke    # retire it now, with your wallet
```

Warnings about the end come at 30, 14, 7, 3, 1 and 0 days: in the session's banner and in `lpa agent show` whenever you are past a rung, and once each in the console and in your alerts when a service runs.

## The guardian

The guardian is a small background process. `lpa unlock` starts it, and it does four things:

1. Holds the agent key in memory for a while. The password never leaves your terminal, and the key never reaches whatever called `lpa`.
2. Checks every order against the policy a **second** time, after the command already checked it.
3. Checks the mandate's signature again before every opening.
4. Signs a closed list of trading actions, and nothing else.

It answers only requests that carry the token it writes in `~/.lpa` when it starts, and it signs nothing for a program of another version.

```sh
lpa unlock              # asks the password, 8 hours by default
lpa unlock --hours 2
lpa lock                # the key leaves memory
```

```
Password:
Unlocked: the guardian of this terminal signs for 0x8c1f...9a2e until 2026-09-30 18:40 UTC (or `lpa lock`). The agent itself is approved until 2027-03-30 11:12 UTC: this terminal keeps the key for the hours asked (8 unless `--hours`, 24 at most), so `lpa unlock` again then; the service keeps it for the agent's whole life (`lpa service install`).
Mandate in force until 2027-03-30 11:12 UTC.
```

{% hint style="info" %}
**Widening a limit takes effect at the next unlock.** The guardian keeps the policy it was unlocked with. So a program that loosens `policy.json` gains nothing on the real account until **you** type the password again. Tightening takes effect at once, and simulated orders, which the guardian does not sign, follow the file as it is.
{% endhint %}

## How long the key is held

| Where                 | How long                                                                 | Set by                       |
| --------------------- | ------------------------------------------------------------------------ | ---------------------------- |
| A terminal's guardian | 8 hours, 0.1 to 24                                                       | `lpa unlock --hours`         |
| The service           | the agent key's whole life, until `lpa lock` or a restart of the machine | `lpa unlock`, or the console |
| A console session     | 12 hours                                                                 | its sign-in                  |

With a service running, `lpa unlock` sends it the password instead of starting a guardian of its own, and `--hours` is refused. One term for everything: the agent key, the mandate and the service's hold end together, and the countdown of the key's end, from thirty days before, is the one to watch. A restart of the machine always locks the service, since the key is never kept open on disk: `lpa unlock`, or the console, opens it again, and `lpa pilot status` says a day that could not start meanwhile.

## Running round the clock

```sh
lpa service install
lpa service status
lpa console
```

The service runs the guardian as a service of your system: a systemd user service on Linux, a launchd agent on macOS. On Windows, `lpa agentd --service` in a terminal left open does the same job.

It starts **locked**: it signs nothing until you unlock it. It comes with a small console on `127.0.0.1:7717`, behind a password of its own, never the agent key's. From the console you unlock the service, renew the agent (your wallet signs through the console's page), read the pages of commands typed on that machine, and see the warnings.

On a server you reach the console through the SSH connection you open anyway:

```
LocalForward 7717 127.0.0.1:7717
```

in `~/.ssh/config` under that machine, then `ssh` as usual and open `http://127.0.0.1:7717/`.

{% hint style="warning" %}
On Linux, if "linger" is off, the service stops with your last SSH session. The command says so, and `sudo loginctl enable-linger $USER` fixes it once.
{% endhint %}

Details: [lpa service and lpa console](https://doc.lockerprotocol.com/hyper-agentic-trader/commands/service-and-console.md).

## What `lpa status` says

```sh
lpa status
```

It reads nothing from the network and signs nothing.

```
account    0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE
agent      0x8c1f4e2b7d3a9c6f0e1b5a4d3c2b1a0f9e8d9a2e, until 2026-10-07T09:12, 6 days left
key        unlocked until 2026-09-30T16:40, held by the guardian of this terminal
policy     $100 an order, 3x, the main dex, 20 orders a day, no end
mandate    no mandate: the local policy alone bounds the agent
copies     1 trader copied (lpa copy status)
service    not running here
assistant  anthropic claude-sonnet-5
today      2 of 20 orders, $180.00 opened
mode       real
next       Nothing to do: 'lpa' opens the session, and 'lpa journal' says what was done.
```

| Line        | What to look at                                                |
| ----------- | -------------------------------------------------------------- |
| `account`   | the address the agent trades for. Compare it with your wallet  |
| `agent`     | its address, its end, and the days left                        |
| `key`       | locked or unlocked, who holds it, and until when               |
| `policy`    | this computer's limits, in one line                            |
| `mandate`   | in force, or the reason it opens nothing                       |
| `copies`    | how many traders are being copied                              |
| `service`   | whether a service runs here                                    |
| `assistant` | the model set up for the session                               |
| `today`     | the orders and the notional used of the day's allowance        |
| `mode`      | `real`, or `SIMULATION` in capitals when simulation mode is on |
| `next`      | the one step to take. The same sentence `lpa doctor` ends with |

The `next` line is a real guide: on a fresh computer it points at `lpa setup`; with an expired key, a locked guardian, a mandate that opens nothing, or simulation mode on, it names the command that moves things along. In JSON, `journey` gives that state as one word: `fresh`, `practice`, `account`, `pending`, `expired`, `expiring`, `locked`, `mandate`, `paper` or `ready`.

A guardian left running by an older version of `lpa`, one still up from before an update, is named on the `key` line with both versions and the way out, because it signs nothing for this one: `lpa lock`, then `lpa unlock`, or `lpa service restart` for a service.

## Learn more

* [The mandate](https://doc.lockerprotocol.com/hyper-agentic-trader/mandate.md)
* [Go live under the mandate](https://doc.lockerprotocol.com/hyper-agentic-trader/go-live.md)
* [Files and folders](https://doc.lockerprotocol.com/hyper-agentic-trader/files-and-record.md)
* [Safety rules for the agent wallet](https://doc.lockerprotocol.com/hyper-agentic-trader/safety-rules.md)
