<!-- https://zerolog.ch/docs/memory · Docs / Chat -->
# Memory and writing style

Facts worth carrying between conversations, plus an optional writing-style profile so replies sound the way you want.

## What carries over

**one conversation** **the next one**

- How you like code formatted
- What stack you use
- What you are working on
- Your writing style optional

carried across

## Off until you switch it on

Memory is **off** by default. You switch it on per chat, and it is never available in anonymous chats. When it is on, ZeroLog proposes facts to remember; an entry is kept only after you **confirm** it, and it records the chat it came from. The switch is in the chat's settings, or type `/memory on` or `/memory off`.

## Encrypted per account

Entries are stored **encrypted per account** on the ZeroLog server in Switzerland (AES-256-GCM, one key per account). This is **not end-to-end**: the server holds the key, and the model receives the text in plain form when it is added to a chat. When memory is on for a chat, your entries go into every turn and the chat says so. The agent memory your coding agents keep is stored the same way.

The optional **encrypted memory** (Settings, Memory, Encrypted memory) is separate. Your browser encrypts each entry before upload, so the server stores only ciphertext and the key stays on your device. This protects storage only and is **not end-to-end**: while it is unlocked, matching entries (up to about 1,500 characters) are decrypted in your browser and sent in plain text with the message, through the server to the model provider, but only when memory is on for that chat. The chat shows how many entries went along, and a switch in the same settings panel (kept per browser, on by default) stops the sending without locking. “Suggest memories from a recent chat” sends the last 30 messages to a model. The server sees how many entries you have, when they changed and how large they are. Lose both passphrase and recovery code and the entries are gone. Setup never overwrites an existing key (replacing it is an explicit reset that deletes all entries), the passphrase needs at least 12 characters, and the key is cleared when you sign out.

## Never between accounts

your account

any other account

*Memory is yours alone. It is never shared between accounts.*

## Read, edit, delete

You can **read**, **edit** and **delete** every entry under Settings, Memory, Memory & Writing Style. An entry is a fact or a standing instruction; you can also add one by hand or with `/remember`. Nothing is stored that you cannot see. Limits: 200 entries and 20 writing samples (each at least 40 characters) in the normal memory, 2,000 entries in the encrypted one.

## What memory stores and what reaches the model

Mermaid source of the diagram on this page:

```mermaid
%% Memory: two stores and what reaches the model. Facts from server/memory.js (per-chat switch, proposals, MAX_MEMORIES), server/zkmemory.js, web/apps/web/lib/zkmem.ts, server/routes/chats.js.
flowchart TB
  chat["Memory switched on<br/>for this chat"]
  subgraph ST["Two stores, both yours alone"]
    direction LR
    plain["Memory: encrypted<br/>per account on the server,<br/>server holds the key"]
    zk["Encrypted memory (optional):<br/>your browser encrypts,<br/>key stays on your device"]
  end
  turn["Matching entries are added<br/>to the turn in plain text,<br/>the chat shows a notice"]:::hot
  model["Model provider<br/>receives the text"]
  prop["ZeroLog proposes new facts,<br/>kept only after you<br/>confirm each one"]

  chat --> ST
  ST --> turn --> model
  chat --> prop

  linkStyle 1 stroke:#8f7ac9
  linkStyle 2 stroke:#8f7ac9
```
