# Sui · Walrus · Seal · MemWal

Cortex supports a local **mock path** for development and a **live path** built around
user-controlled infrastructure for identity, storage, encryption, and persistent memory.
This is what makes memory *sovereign*: durable, encrypted, and aligned with ownership
instead of platform lock-in.

## The four primitives

| Primitive | Role |
| --- | --- |
| **Sui** | Identity and coordination: on-chain pointers, capabilities, and access policy |
| **Walrus** | Durable artifact storage, where encrypted blobs physically live |
| **Seal** | Encryption and access gating: threshold encryption enforced on-chain |
| **MemWal** | Persistent memory namespaces and recall |

```text
            ┌── identity & coordination ──┐
   Sui  ◀───┤  pointers · caps · policy   │
            └─────────────────────────────┘
                       │
   client ──encrypt──▶ Seal ──ciphertext──▶ Walrus  (durable blobs)
                       │
   MemWal ◀── namespaces · recall ── persistent memory plane
```

## How they work together

::::steps

##### Encrypt with Seal

Before anything leaves the client, [Seal](/concepts/encryption) encrypts it, under the
owner's identity (threshold) or a wallet-derived key (AES fallback).

##### Store on Walrus

The ciphertext blob is written to Walrus for durable storage. Walrus only ever sees
encrypted bytes.

##### Coordinate on Sui

A pointer to the manifest is recorded on Sui, and access is governed by the
[capability model](/concepts/sharing#the-capability-model) (`AdminCap` / `ExecutorCap`)
and Seal's `seal_approve` policy.

##### Persist with MemWal

MemWal maintains the per-user memory namespaces and serves recall, owner-or-delegate
keyed, so the right identities can read.

::::

## Mock vs live

<Tabs stateKey="infra-mode">
  <Tab title="Mock path">
    The default. The deterministic core runs with **none** of the above, ideal for building
    the product, testing the pipeline, and iterating on extraction and prompts without live
    dependencies.
  </Tab>

  <Tab title="Live path">
    Enabled once the required config is present. You get durable Walrus storage, Sui-coordinated
    identity and permissions, Seal-encrypted blobs, and persistent MemWal namespaces. See
    [Configuration](/getting-started/configuration).
  </Tab>
</Tabs>

## On-chain contracts

The Move contracts under `backend/sui/contract/cortex` implement the live coordination and
access model:

| Module | Responsibility |
| --- | --- |
| `access` | Capabilities (`AdminCap` / `ExecutorCap`) and revocation |
| `agents` | The on-chain agent roster and workspace coordination |
| `sharing` | SuiNS-handle-addressed, Seal-encrypted memory sharing |
| `workspace` | The shared task board + message bus for agents and loops |

## Reach it directly

The MCP server exposes raw access to these primitives for advanced flows: `walrus_put_blob`,
`walrus_get_blob`, `sui_record_pointer`, `sui_read_pointer`, and `memwal_restore`. See the
[Tool Reference](/mcp/tools#infrastructure).

## Keep reading

* What gets encrypted and how: [Encryption](/concepts/encryption).
* How sharing rides on these primitives: [Sharing & Permissions](/concepts/sharing).
