> For the complete documentation index, see [llms.txt](https://docs.envector.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.envector.io/1.4.x/core-concepts/architecture.md).

# Architecture

This page outlines enVector’s high-level architecture, its core components, and the data flow for encrypted indexing and search.

## Components

* Application (Client + SDK):
  * Generates/holds keys; never shares secret keys with the service
  * Encrypts vectors and queries; decrypts scores and metadata
  * Manages local index config (dimension, presets, query/index encryption)
* API Gateway:
  * Public API endpoint (gRPC/HTTP), authn/authz, request validation
  * Routes calls to the appropriate plane; applies rate limits and observability
* Data Plane:
  * Runs encrypted compute (e.g., inner‑product scoring) on uploaded ciphertext
  * Batches and schedules work; streams data to/from storage as needed
  * Stateless by design; does not require or persist client secret keys
* Index Plane:
  * Owns index lifecycle: create → load → unload → drop
  * Builds and maintains encrypted index artifacts used for fast lookup
  * Persists and retrieves artifacts from storage; exposes index‑level stats/health
* Object Storage:
  * S3‑compatible storage for encrypted payloads (items, blobs, artifacts)
  * No plaintext vectors or secret keys are stored by the service
* Encrypted Index (at rest):
  * The persisted, encrypted representation of each index (separate from raw item blobs)
  * Produced and maintained by the Index Plane; read by the Data Plane for scoring

The abstract roles above map to concrete services as deployed:

| Abstract role | Concrete service(s) |
| ------------- | ------------------- |
| API Gateway   | `endpoint`          |
| Data Plane    | `compute`           |
| Index Plane   | `backend`, `shaper` |
| Coordination  | `orchestrator`      |

`orchestrator` coordinates index lifecycle and leader election across the Index and Data planes; see [Server Environment Variables](/1.4.x/operations-and-management/server-environment.md) for the per-service configuration surface.

## System Overview

Key points:

* The server never requires client secret keys. It only receives the keys and parameters needed for encrypted evaluation.
* Index data is stored encrypted at rest; query processing is currently supported only with plaintext queries to prioritize the protection of the DB itself.
* All similarity computations (e.g., inner product) execute on encrypted data.

Notes:

* Index encryption is always enabled; indexes are never stored in cleartext.
* Queries are currently sent and processed only in plaintext, prioritizing the protection of the database itself.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.envector.io/1.4.x/core-concepts/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
