# Architecture A Space brings people, an assistant and shared data together. The turn enclave is the center of a confidential Space: it opens the room for a turn, runs the assistant and its tools, and seals the results. The components around it keep keys, carry requests, store encrypted records and connect to models and outside services. ## The architecture at a glance This diagram follows a **confidential room** in Spaces or an SDK app using vault mode. Each green box is a separate protected execution boundary. The surrounding infrastructure is not one large enclave. The device enclave and cloud computer are optional services; an ordinary conversation needs neither.
Open the full-size diagramDownload SVGOn a small screen, swipe across the diagram. A text description follows.
The app uses the vault and key worker to send sealed requests through the API relay to the turn enclave. The turn enclave uses encrypted storage, confidential inference, tools and the Sentinel. Optional device and cloud computer enclaves are separate. The text below describes each path.
## Follow a message {#architecture-description} 1. **The app asks the vault to act.** The app draws the conversation and approvals. The vault holds the account; its key worker performs ordinary room encryption and signing. In a raw SDK integration without vault mode, keys and the app share the same environment instead. [The client boundary](./app-os.md). 2. **The device checks the turn enclave, then seals the request to it.** The message and room key travel through the API and relay as a sealed envelope. Those routing services can see traffic metadata, but cannot open that envelope. [The confidential tier](./the-attested-tier.md). 3. **The turn enclave opens the room and runs the assistant.** It checks admission and applies the room's rules, reads the sealed room state, calls the model and tools, and records proposals where approval is required. [How a turn runs](./how-a-turn-runs.md). 4. **Each dependency has its own boundary.** The turn enclave checks the model gateway; that gateway checks the confidential inference environment. Tool execution and connection credentials live in separate services, described below. An outside service receives the inputs sent to it. 5. **The results are sealed again.** Persistent messages, files and room state are encrypted. The reply returns sealed to the device. Reads can retrieve sealed entries for the device to open without running another assistant turn. The turn's room key is dropped when the turn ends; the enclave service itself remains available. The solid arrows show logical request and response paths, not every network hop. Dotted lines show verification. The same encrypted-storage symbol groups several stores; it is not a claim that every service shares one bucket or key. ## Components | Component | Responsibility | Boundary | |---|---|---| | **App** | Draws messages, shared views and approval cards. | The screen sees the content it renders. A raw SDK app is not automatically isolated from its builder. | | **Vault and key worker** | Account, device unlock, room keys, encryption and signing. | Separate from the hosted app frame. The unlocked attested chat-cache key is an in-memory exception in the app. | | **API and relay** | Route requests and carry sealed replies. | Outside the turn enclave; traffic metadata remains visible. | | **Turn enclave** | Admission, room state, assistant turns, tool orchestration and approval enforcement. | Opens confidential room content inside measured execution. | | **Attested model gateway** | Routes model requests and supplies signed receipts. | Checked by the turn enclave; checks the inference environment in turn. | | **Confidential inference** | Runs the model on confidential compute. | A separate provider and protected execution environment. | | **Sentinel enclave** | Holds connection credentials and makes authenticated calls under the connection's grant. | Credentials are added inside the enclave, never supplied to the model. [Connections](./connections.md). | | **Confidential tools** | File and image understanding, search, document generation and fetching pages. | Attested external tools handle understanding and search; Witbitz's tools enclave handles operations such as PDF writing and page fetching. Search queries and fetched URLs reach their outside providers. | | **Encrypted storage** | Persists room records and files; services also persist their separately sealed state. | Storage operators see ciphertext and metadata, not a universal decryption key. | ### Optional: the device enclave The **cloud device** acts on the owner's behalf while their phone and computer are asleep. The owner grants it selected verified, solo, confidential rooms. Schedules and incoming work wake an account worker, which sends sealed turns through the same room API. The assistant still runs in the **turn enclave**. Its sealed record holds only the granted room access, not the owner's whole account backup. When work needs a human decision, it can notify the owner's other devices. It is separate from the Sentinel that holds connection credentials. ### Optional: the cloud computer enclave A **cloud computer** runs a coding agent, workspace and browser in its own protected environment. The user opens it through a verified, sealed connection; the workspace persists encrypted. It has its own model, tool and network policy, rather than being a step every room turn passes through. The diagram shows its access path only. [Cloud computers](./sdk-computers.md). ## Verification runs alongside the data flow Published source, reproducible builds and public release records let verifiers connect a running component to its published code. At runtime, the device checks the turn enclave, the turn enclave checks its attested dependencies, and the model gateway checks the inference environment. These are separate checks, not one blanket certification. Client verification depends on the platform. An installed app can be checked against its published release; a browser page checking its own files still starts with code delivered by its server. Device admission may also require hardware proof under the room's policy. [Verifying the client](./client-architecture.md) · [Verify it yourself](./verify.md). ## What changes in a standard room? The turn runs on the standard server instead of inside the turn enclave, and can call a frontier model provider. The server can read the room content during the turn, and the model provider receives the model input. Stored room records remain encrypted. Connections still go through the Sentinel. The confidential diagram's in-use protection does not apply to that standard path. [Compare privacy tiers](./privacy-tiers.md). ## Outside this diagram Account services, tenant administration, billing and notification delivery support these components. Their full protocols are outside this room-flow diagram. [Accounts](./accounts.md) · [Your server](./sdk-builder.md).