> For the complete documentation index, see [llms.txt](https://docs.perception.cx/perception/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perception.cx/perception/enma-ai/memory.md).

# Memory

## Project memory

Each project gets persistent memory the AI keeps across sessions: notes, plans, and a recovery state file. Store it centrally or inside the repo (`.enma/`), switchable per project, and browse or edit everything in the Memory panel. Agents read it at the start of every run, so a fresh chat picks up where the last one left off.

## ENMA.md

Put an `ENMA.md` file at your project root and its contents become standing house rules every agent follows for that project: conventions, "always run X", "never touch Y". Read fresh each run.

## Long sessions

* Automatic context compaction (at run start and mid-run) keeps long chats going instead of dying at the window limit.
* A context gauge shows how full the window is, plus per-response and per-chat token totals.
* **The model knows its own window.** Crossing roughly 60/80/90% adds a short advisory to its next tool result: prefer targeted reads, save important state, wrap up. After compaction it's told older rounds were folded so it re-reads files instead of trusting memory of them.
* Compact on demand or save a recovery checkpoint whenever you want.
