# Memory Layer

The Memory Layer gives Toggle the ability to preserve the continuity of a user’s work. Instead of saving static notes or raw history logs, it stores the structure of ongoing activity: decisions made, assumptions taken, progress achieved and the context surrounding each step.

This design allows Toggle to restore an entire working state when the user returns to a project. Context, intent and prior reasoning are all instantly available without requiring the user to recall or reconstruct anything manually.

#### The Memory Layer is divided into three operational zones

* **Short-Term Memory** captures the transient state of immediate tasks.
* **Session Memory** maintains coherence across active work sessions.
* **Long-Term Continuity Memory** stores the semantic structure of long-running or high-value efforts.

All memory operations are encrypted and scoped at the user level to preserve privacy and data integrity.


---

# Agent Instructions: 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:

```
GET https://toggle.gitbook.io/togglex/oldgitbook-below/architecture-overview/memory-layer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
