# Conceptual Guide

## Actors

<mark style="color:blue;">⫸</mark> **Workload Provider**: The organization that owns and manages the Privacy-preserving compute workload. The workload provider sets up the system, uploads the executable logic, and handles operations such as resource management and credit maintenance.&#x20;

<mark style="color:blue;">⫸</mark> **End User**: The individual interacting with a deployed computation by sending encrypted queries. They use a provider-issued access token to securely communicate with the system.

<mark style="color:blue;">⫸</mark> **LatticaAI Backend**: Our cloud-based core system securely manages providers data, he compute artifacts, access tokens, and financial transactions. It handles all encrypted queries and responses.

<mark style="color:blue;">⫸</mark> **Worker**: A hardware accelerator that runs encrypted computations. We currently use GPUs, but our hardware-agnostic architecture - powered by [**HEAL**](https://platformdocs.lattica.ai/www.lattica.ai/HEAL), our integration layer, enables support for any FHE-compatible acceleration hardware.

***

## System Workflow and Stages

LatticaAI’s platform is organized into five key stages, combining one-time setup and ongoing operations across different roles. Each stage defines a specific set of responsibilities handled via either the **Lattica Web Console** (or **Python SDK)** or the [**Query Client**](/architecture-overview/query-client.md), depending on the actor.

Below is a breakdown of each stage, detailing the responsibilities, timing, and actors involved.

<figure><img src="/files/ISGwsRTgRvTgkAmDCM9q" alt=""><figcaption><p>Diagram of system workflow and stages</p></figcaption></figure>

{% stepper %}
{% step %}

### AI Provider Workspace Preparation (One-Time Setup)

*Prepares your environment to support encrypted computation processing.*

* **Account Creation**: Register on the LatticaAI platform.
* **Consultation and Confirmation**: [Contact us](http://www.lattica.ai/company#contact-us) to verify your workload's compatibility with the homomorphic encrypted processing.
* **Computation Management Tooling:** Use the **Web Console** or [install ](/how-to-guides/client-installation/how-to-install-management-client.md)the **Management Client** to manage computation onboarding and operations.
* **Computation Submission**: [Submit your computation](/how-to-guides/workload-lifecycle/how-to-deploy-workload.md) via the chosen interface. LatticaAI prepares it for secure execution and notifies you when it’s ready.

{% hint style="danger" %}
Typically a one-time setup. Only revisit if your computation or infrastructure undergoes major changes.
{% endhint %}
{% endstep %}

{% step %}

### Interaction Setup (As Needed)

*Manages access and financial readiness for secure computation.*

* [**Access Token Generation**](/how-to-guides/access-control/how-to-create-user-access-token.md): Create tokens to control who can access your deployed computation.
* [**Credit Management**](/platform-workflows/credit-management.md): Maintain credit balance to keep worker nodes active. If credits run out, workers will automatically shut down.
  {% endstep %}

{% step %}

### End-User Workspace Setup (One-Time Setup)

*Sets up the environment for secure, encrypted communication with your deployed computation.*

* [**Query Client Installation**](/how-to-guides/client-installation/how-to-install-query-client.md): Installs the [query client](/architecture-overview/query-client.md) on the user device.
* [**Evaluation Key Generation**](/how-to-guides/secure-query-processing/how-to-upload-evaluation-key.md): Generates an evaluation key (EVK) for encrypted data transmission and secure execution.
  {% endstep %}

{% step %}

### Worker Lifecycle Management (Ongoing)

*Optimizes compute usage and cost through manual control of worker activity.*

* **Worker Activation/Deactivation**:  [Start ](/how-to-guides/resource-management/how-to-start-worker.md)workers when needed; [stop ](/how-to-guides/resource-management/how-to-stop-worker.md)them when idle to control costs.
  {% endstep %}

{% step %}

### Secure Query Processing (Ongoing)

*Executes encrypted queries from end users to your deployed computation.*

* [**Query Submission**](/how-to-guides/secure-query-processing/how-to-execute-query.md): The end user sends encrypted input for secure execution.
* **Encrypted Response**: The worker processes the query and returns a fully encrypted result.
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
🔧 **Note:**\
Most provider-side activities (Stages 1, 2, and 4) can be performed either via the **Management Client's** Python SDK (for integration into your systems) or through our **Web Console** (for ease of use).\
End-user operations (Stages 3 and 5) are handled exclusively through the **Query Client**.
{% endhint %}

***

## Summary of Responsibilities

| Actor             | Responsibilities                                                                                                                                                     |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AI Provider       | Initial account setup, workload configuration, token and credit management, worker administration, and Lattica Query Client deployment in the end-user's environment |
| End User          | Evaluation Key generation, ongoing query submission                                                                                                                  |
| LatticaAI Backend | Manages accounts, execution resources, access tokens, and encrypted data handling throughout the process.                                                            |
| Worker            | Executes homomorphic computations in the cloud as directed by the  provider, based on available credits                                                              |

***

## Pricing Model

Our platform uses a credit system.&#x20;

Workload providers are charged for active worker time and must maintain enough credits to keep the service running.

Workers remain active while credits are available, but the provider can also stop them manually. \
When credits run out, all active workers automatically shut down.&#x20;

This approach optimizes resource usage and helps providers control their costs effectively.

***

## Key Points

<mark style="color:blue;">⫸</mark>  **Cost Control with Credits**: Workload providers must maintain enough credits to activate and keep workers running. If credits are depleted, active workers will automatically stop.

<mark style="color:blue;">⫸</mark>  **One-Time vs. Ongoing Tasks**: Workspace Preparation and End-User Connection Setup are one-time tasks, while Worker Management and Query Processing are ongoing, based on resource needs.

<mark style="color:blue;">⫸</mark>  **Encryption Throughout**: All interactions with the workloads are encrypted, ensuring end-to-end data privacy.


---

# 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://platformdocs.lattica.ai/conceptual-guide.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.
