# Architecture & Privacy

Sanctum prioritizes security through its multi-layered architectural design. Built on robust open-source foundations including Llama.cpp, LlamaIndex, and Tauri framework, Sanctum delivers powerful functionality while maintaining strict security standards. The architecture incorporates multiple security layers to protect user data.

<div align="left"><figure><img src="https://1891114197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmg3HKXD3HjGi6xEGl48g%2Fuploads%2FNQl1kRtIaNsRJHYLoflc%2Fimage.png?alt=media&#x26;token=b4484a1f-2d19-4a8f-a26b-39e80c5d24f7" alt=""><figcaption></figcaption></figure></div>

Sanctum follows a local-first approach—all data is stored locally on your device. The app runs offline, meaning your data never leaves your device unless you choose to share it.

### Why do I need an account?

Creating an account ensures top-level security with encrypted data protected by a unique 24-word recovery phrase that acts as your personal access

You'll also set up a password for convenient daily access, balancing security with ease of use.

### What if I forget my password?

Due to our focus on security, we never store your password. If you forget it, you can restore access using your recovery phrase. However, if you haven't safely stored your recovery phrase during setup, there's no way to recover your account or data. Make sure to keep your recovery phrase in a secure location to prevent permanent loss.

### Where is my data stored?

All your data—chats, file embeddings, models, and settings—is stored **locally** on your device. Sanctum never sends your data to external servers or third-party services. This ensures that none of your information leaves your device without your permission.

### Is my data encrypted?

Yes, Sanctum is encrypted using **AES-256 encryption**. This is the same standard used by the U.S. government for classified information.

### Does the model learn from my chats?

No, the local models in Sanctum do **not learn from your chats**. Interactions are session-based, meaning your inputs are processed in real-time without being stored for training. You can add files to the context or fine-tune models if you wish, but this requires explicit action and advanced setup.

### **Manage your data**

Sanctum offers advanced data management capabilities, allowing you full control over every category of data within the app.

* **Analyze and Control:** You can analyze each component—such as Chats, File Manager, Models, etc.
* **Reset Your Account:** You can reset your account (Settings > Account), deleting all chat history and permanently erasing all conversations. Once deleted, data cannot be recovered.

<div align="left"><figure><img src="https://1891114197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmg3HKXD3HjGi6xEGl48g%2Fuploads%2Fiw9WkUe9fCN4dZhmu77W%2Fimage.png?alt=media&#x26;token=be876717-ee48-4bd4-9cfe-66dcc761083b" alt="" width="563"><figcaption></figcaption></figure></div>


---

# 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://help.sanctum.ai/architecture-and-privacy.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.
