> 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/files-and-record.md).

# Files and folders

What lpa keeps on your computer, where, and how to export or back it up.

Everything `lpa` keeps lives in one folder, `~/.lpa`, at mode 700, with every file at 600 and every write atomic. `LPA_HOME` points it elsewhere.

## The folder

| Path                                                        | What it holds                                                                                                                                                                                                   |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `config.json`                                               | the account and how it signs, the agent, simulation mode, the assistant's settings                                                                                                                              |
| `agents/`                                                   | the sealed agent keys, encrypted under your password                                                                                                                                                            |
| `policy.json`                                               | this computer's limits                                                                                                                                                                                          |
| `journal.jsonl`                                             | the journal, one JSON line per entry                                                                                                                                                                            |
| `activity.db` (with `-wal`, `-shm`) and `store-health.json` | the record of what `lpa` does, and what it knows of its own interruptions                                                                                                                                       |
| `day.json`                                                  | left by an lpa before 2.4.0, for the daily loss limit that no longer exists. No longer read nor written; `lpa reset` removes it                                                                                 |
| `paper/`                                                    | the simulation account, its orders at a trigger and the stops and targets of its positions, the recorded tape, the replay reports                                                                               |
| `walletconnect/`                                            | the link with a mobile wallet, only when the account signs with one. `lpa signer forget` closes it at the relay and removes it                                                                                  |
| `copies/`                                                   | the copies, in simulation and live                                                                                                                                                                              |
| `mandate.json`, `mandate-state.json`                        | the mandate signed in your wallet, its signature, and the marks that only go up                                                                                                                                 |
| `pilot/`                                                    | the charter, the strategies you wrote, the days played, the plans, the brain, the calibrations, the measured universe of markets, the replays, the calendar cache. [Its own table](#the-pilots-folder) is below |
| `pilot.json`                                                | the continuous pilot: its state and its counters of the day                                                                                                                                                     |
| `setup.json`                                                | what `lpa setup` remembers of the steps you passed                                                                                                                                                              |
| `day-count.json`                                            | the guardian's count of the day's real openings                                                                                                                                                                 |
| `journal.1.jsonl`                                           | the older part of the journal, once it was rotated past 64 MB                                                                                                                                                   |
| `agentd.log`                                                | what a guardian started in a terminal wrote on its error output                                                                                                                                                 |
| `plugins-running.json`                                      | the plugins running now, and the `lpa` running each                                                                                                                                                             |
| the `*.lock` files and `agentd.starting/`                   | one writer at a time; left behind by one that died holding it                                                                                                                                                   |
| `logs/pilot.log`                                            | one line per step of the pilot, one line per call to a model                                                                                                                                                    |
| `plugins/`, `plugins.json`                                  | the plugins installed, and what you approved of each                                                                                                                                                            |
| `agentd.token`                                              | the token the running guardian answers to, written at each start                                                                                                                                                |
| `agentd.sock`                                               | the guardian's local socket, a named pipe on Windows                                                                                                                                                            |
| `hyperkeel.json`                                            | the hyperkeel connection: your account, its plan and the key of the included model                                                                                                                              |
| `hyperkeel-switch.json`                                     | hyperkeel turned off on this computer (`lpa hyperkeel off`)                                                                                                                                                     |
| `mcp.json`                                                  | the server for assistants turned off on this computer (`lpa mcp off`), and the assistants taken out of its list                                                                                                 |
| `notices.json`                                              | the notices sent to your hyperkeel account, turned on (`lpa notices on`)                                                                                                                                        |
| `egress/`                                                   | the register of the calls that left this computer, one file a UTC day, thirty days (`lpa doctor --egress`)                                                                                                      |
| `assistant-keys.json`                                       | API keys typed on the settings page. The included model has none                                                                                                                                                |
| `console.json`                                              | the hash of the console's password                                                                                                                                                                              |
| `service.log`                                               | the service's output on macOS. systemd keeps its own journal                                                                                                                                                    |
| `node/`, `lib/`, `bin/`                                     | the program, when the one-line installer or the application put it there                                                                                                                                        |
| `profiles.json`, `profiles/<name>/`                         | the profiles of this computer, each a folder of its own with every file above ([lpa profile](https://doc.lockerprotocol.com/hyper-agentic-trader/commands/profile.md))                                          |
| `memory-shared.db`, `memory-shared-health.json`             | the memory every account shares: lessons and lines written for all, nothing of an account                                                                                                                       |
| `vault-sync.json`                                           | the public addresses of the Vault's last sync, so that another profile takes one without a scan                                                                                                                 |

## The pilot's folder

Everything the daily pilot keeps is under `~/.lpa/pilot/`, private to your user like the rest.

| Path                                   | What it holds                                                                                                                                                                             |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `charter.json`                         | the charter: how much, and the name of the strategy in use. A charter written before the strategies reads exactly as it did, and becomes one of the new shape the first time it changes   |
| `strategies/<name>.json`               | **the strategies you wrote**, one file each, never under a shipped name. `lpa pilot strategy save` writes them, `remove` takes one out                                                    |
| `days/<date_time>/`                    | one folder per day played, with every step written before the next one starts. A day played under `--variant <name>` keeps its own folder of that name inside it                          |
| `days/<date_time>/choix.json`          | **the strategy of the day**: which one the pilot played, who chose it (the table, the model, or the one in use) and why. `lpa pilot day` says it                                          |
| `plans/<market>.json`                  | what the pilot holds on that market: a position by steps with its steps, a grid with its levels and its resting orders, a range with its session, or a trade with its stop and its target |
| `brain/<name>/`                        | what the pilot learned: its experiences and its lessons, `main` unless you name another                                                                                                   |
| `calibration/`                         | what `lpa pilot calibrate` measured, one file per measure, with its markets, its strategy and its date                                                                                    |
| `universe.json`                        | the markets the measured universe kept, with the date and the bounds it was measured with                                                                                                 |
| `replays/<name>/`                      | a replay's own account, days and report                                                                                                                                                   |
| `schedule.json`, `schedule-marks.json` | whether the service plays a day every day, and what its clock did last                                                                                                                    |
| `armed.json`                           | left by an lpa before 2.4.0, for the drawdown stop that no longer exists. No longer read nor written, and harmless                                                                        |
| `cache/`                               | the economic calendar, kept an hour, because its host refuses a second reading within minutes                                                                                             |

{% hint style="info" %}
**A strategy is read, never run.** The files under `strategies/` are descriptions: figures the code reads by the charter's own rules and bounds. Nothing in them is executed. See [The strategies](https://doc.lockerprotocol.com/hyper-agentic-trader/strategies.md).
{% endhint %}

{% hint style="warning" %}
**Back up the folder like a wallet, not like a log.** `agents/` holds the sealed agent key. It is encrypted under your password, and a thief with both can trade your account (never withdraw from it). Do not copy `~/.lpa` into a cloud folder.
{% endhint %}

## Environment variables

| Variable                                                                                                                       | What it changes                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LPA_HOME`                                                                                                                     | another folder than `~/.lpa`: an absolute path of its own. The root, a system folder or your home folder itself are refused                                                                                                                                                                                                                         |
| `LPA_PROFILE`                                                                                                                  | the profile a command runs in, as `--profile` names it                                                                                                                                                                                                                                                                                              |
| `LPA_NO_BROWSER`                                                                                                               | never open a browser of its own accord; the address is printed instead. One exception: when the account signs with a browser extension, your Enter on the waiting line still opens the signing page, since you asked, through an address good for one visit. With Locker Vault or a mobile wallet, and on a machine reached over SSH, nothing opens |
| `LPA_CONSOLE_PORT`                                                                                                             | the console's port, 7717 by default. `0` takes any free port, which `lpa service status` then names                                                                                                                                                                                                                                                 |
| `LPA_ASSISTANT_MODEL`                                                                                                          | the assistant's model                                                                                                                                                                                                                                                                                                                               |
| `ANTHROPIC_API_KEY` (or `ANTHROPIC_AUTH_TOKEN`), `OPENAI_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY`, `LM_STUDIO_API_KEY` | the assistant's key for that provider. A key in the environment is never copied to disk                                                                                                                                                                                                                                                             |
| `ANTHROPIC_BASE_URL`                                                                                                           | another address for Anthropic: https, or on your own machine                                                                                                                                                                                                                                                                                        |
| `LPA_HYPERKEEL_API`, `LPA_HYPERKEEL_SITE`                                                                                      | another hyperkeel address, for tests or a local server                                                                                                                                                                                                                                                                                              |
| `LPA_HAT_API`                                                                                                                  | another address for the included model's gateway, for tests or a local gateway, judged as the hyperkeel ones                                                                                                                                                                                                                                        |
| `NO_COLOR`                                                                                                                     | no colours                                                                                                                                                                                                                                                                                                                                          |

## The journal and the record: two different things

|                  | The journal                                                                                                                   | The record                                                 |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| File             | `journal.jsonl`                                                                                                               | `activity.db`                                              |
| What it is       | what was **done**: orders, closes, cancels, refusals, liquidations, deposits, withdrawals, transfers, agent approvals, copies | what every activity **did and thought**, for the live page |
| What it decides  | it is the authority on the day's counters, and it bounds what may be traded                                                   | nothing at all                                             |
| If it is missing | the day's counters are lost                                                                                                   | you lose what you can see, never an order                  |

```sh
lpa journal --since 24h
lpa journal --since 20260929 --limit 10
lpa store status
```

The record never holds a key, a password, a token or a signature. It does hold what a model was asked and what it answered, in full, which is the point: a decision can be read back.

Who writes in the record, each as an activity of its own: the guardian (what it signed, who refused what, the key unlocked and locked, the copies, every refusal), the session (what you typed, the assistant's reasoning, each tool call), the MCP server (one activity per client, named by what the client says of itself), and a plugin, inside the activity that ran it.

## Keeping it in hand

```sh
lpa store status                               # what it holds, how large, what it lost
lpa store prune                                # keeps 90 days and 512 MiB without figures
lpa store prune --days 30 --max-mb 128
lpa store prune --calls-before 30d             # the one hand that takes from the model register
lpa store export --out ~/record.jsonl --since 7d
lpa store export --out ~/calls.jsonl --what calls
lpa store backup --out ~/lpa-record-backup.db
```

* `prune` clears the old **text** and gives the pages back. Every act, count, note, rule and summary stays.
* `export` writes one JSON object per line, at mode 600, never through a symbolic link.
* `backup` copies the record page by page while it stays in use, so it is safe to run while the pilot works.

90 days and 512 MiB are what `lpa store prune` keeps when you give it no figures. Nothing prunes the record on its own: the command is the hand that does it. `lpa doctor` says when the model register weighs more than 2 GiB.

## Starting over

| Command                   | What goes                                                                                                                                                                                                                                                                                                              |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lpa paper init --reset`  | the simulation account's history                                                                                                                                                                                                                                                                                       |
| `lpa pilot brain --reset` | what the pilot learned                                                                                                                                                                                                                                                                                                 |
| `lpa mandate release`     | the mandate and the marks, after your password                                                                                                                                                                                                                                                                         |
| `lpa reset`               | the local state: settings, sealed agent key, policy, simulation account, journal, record, copies, mandate, plugins, hyperkeel connection, console password, assistant keys, the link with a mobile wallet (closed at the relay), and the pilot (`pilot/`, `pilot.json`, `logs/`), with `setup.json`. The program stays |
| `lpa uninstall`           | what the one-line installer put on the computer                                                                                                                                                                                                                                                                        |
| `lpa uninstall --all`     | that, plus the whole `~/.lpa`: the settings, the sealed agent key, the journal, the record and the pilot's folder, after closing the link with a mobile wallet at the relay                                                                                                                                            |

`lpa reset` names every path that goes before it asks. A folder that holds nothing of `lpa` is refused, so an `LPA_HOME` pointed at the wrong place removes nothing. The agent stays approved on Hyperliquid until its date: `lpa agent revoke` first, with your wallet, to retire it now.

## What goes over the network

| Host                                                                                                             | When                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `api.hyperliquid.xyz`                                                                                            | markets, quotes, orders, account reads, live views                                                                                                                                                                                                                                                                                                                                                                       |
| `arb1.arbitrum.io`, `arbitrum-one-rpc.publicnode.com`, `arbitrum.drpc.org`                                       | Arbitrum balances and deposits, the first node that answers                                                                                                                                                                                                                                                                                                                                                              |
| `api.hyperkeel.com`                                                                                              | the daily pilot's dossier and the MCP server's brief, through public routes for agents that need no account, sending only the program's name and version; the rest (the session's views, the traders you follow, alerts, your plan) only while you are connected with `lpa hyperkeel login`; the notices of the service only once you turned them on with `lpa notices on`, each one a kind and at most one whole number |
| `api.hyperagentictrader.com`                                                                                     | the model included with your plan, when it is the assistant's provider: the question and the context, under a pseudonym; its answer says what the call cost in credits                                                                                                                                                                                                                                                   |
| `api.anthropic.com`, `api.openai.com`, `generativelanguage.googleapis.com`, `openrouter.ai`                      | only the provider you chose, if any. A local model stays where you point it                                                                                                                                                                                                                                                                                                                                              |
| `nfs.faireconomy.media`, `api.alternative.me`, `www.federalreserve.gov`, `www.ecb.europa.eu`, `www.coindesk.com` | only the daily pilot, once a day, for the economic calendar, the fear and greed index and those headlines. Plain reads, with no key, no account, no address and no positions                                                                                                                                                                                                                                             |
| `relay.walletconnect.org` (WebSocket)                                                                            | only when the account signs with a mobile wallet, while a signature is asked: the requests to your phone, end-to-end encrypted. The relay, run by Reown, sees this computer's IP address and the time, not the content. Locker Vault and a browser extension reach no relay                                                                                                                                              |
| `127.0.0.1`                                                                                                      | its own pages, the ceremony, the settings, the console, and the guardian's local socket                                                                                                                                                                                                                                                                                                                                  |
| whatever a plugin reaches                                                                                        | a plugin runs in its own process, which can reach the network. `lpa` itself reaches nothing for it                                                                                                                                                                                                                                                                                                                       |

Nothing else. No analytics, no crash reports, no update check. Every call that leaves is one line of the register under `egress/`, which `lpa doctor --egress` reads: the host, the method, the path without its query, the moment, the bytes sent, the status and the time, never a body or a header.

## Learn more

* [lpa store](https://doc.lockerprotocol.com/hyper-agentic-trader/commands/store.md) and [lpa journal](https://doc.lockerprotocol.com/hyper-agentic-trader/commands/journal.md)
* [The guardian and the keys](https://doc.lockerprotocol.com/hyper-agentic-trader/guardian-and-keys.md)
* [Privacy](https://doc.lockerprotocol.com/reference/privacy.md)
