# System Flow

Nimbus ensures private, decentralized, and intelligent messaging by combining the Matrix protocol, local AI processing, and end-to-end encryption. This section explains how data flows through Nimbus, ensuring privacy and efficiency at every step.

***

### **Flowchart Overview**

The flowchart below illustrates how Nimbus handles messages and integrates AI locally, ensuring that no data ever leaves the user’s control.

<figure><img src="/files/O0WUc1ttYfVOyo4Lat5R" alt=""><figcaption></figcaption></figure>

***

### **Step-by-Step Breakdown**

#### **1. User Input**

* The process begins when a user sends a message or interacts with the Nimbus app interface.
* All input remains within the **user's device (Private Zone)** and is processed locally without external data transfer.

***

#### **2. Encryption at the Source**

* Messages are encrypted at the device level using **end-to-end encryption keys**.
* The encryption ensures that no one—including Nimbus or the homeservers—can access the unencrypted content.

***

#### **3. Matrix Network Handling**

* The encrypted message is routed through the **Matrix protocol**:
  * **End-to-End Encryption Layer**: Ensures the message stays secure during transmission.
  * **Encrypted Sync Protocol**: Syncs messages across devices securely.
  * **Matrix Home Server**: Acts as a relay but never accesses unencrypted data.

***

#### **4. Local Processing on User Device**

* Once the message is sent, Nimbus AI processes the encrypted data locally to enable features like:
  * **Smart Replies**: AI-generated responses based on the conversation context.
  * **Real-Time Translation**: On-device translation of messages into different languages.
  * **Context Analysis**: Insights to enhance communication efficiency.
* **Key Point**: All AI features are powered by a **Local AI Model**, ensuring that no data is transferred to external servers for processing.

***

#### **5. Secure Sync Across Devices**

* The Matrix protocol ensures that encrypted messages are synchronized across multiple devices owned by the user.
* The **Encrypted Sync Protocol** guarantees that:
  * Messages remain encrypted during syncing.
  * Decryption is possible only on devices with the user's private keys.

***

### **Why This Flow Matters**

* **Complete Privacy**: Encryption keys remain with the user, ensuring no external entity can access the data.
* **Decentralization**: By leveraging the Matrix protocol, Nimbus avoids centralized data storage or processing.
* **AI Integration Without Compromise**: Intelligent features like translations and smart replies work locally, maintaining data confidentiality.


---

# 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://docs.nimbuschat.ai/how-nimbus-works/system-flow.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.
