> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/occ-v1/architecture.md).

# Architecture

OCC v1 is four layers connected by the SDK: protocol contracts, a blockchain, encryption and storage.

{% hint style="warning" %}
**Status: Legacy (reference).** OCC v1 is the first-generation 4thTech protocol. It is documented for existing integrations and as reference; new agent-to-agent work uses OCC v2 ([AgentLink](/agentlink/agentlink.md)).
{% endhint %}

OCC v1 is designed to be light and modular. With encryption on, only the sender and the receiver can read the content. The [4thTech SDK](/sdk-and-white-label/sdk.md) connects four layers.

| Layer      | What it does                                                     | Read more                                   |
| ---------- | ---------------------------------------------------------------- | ------------------------------------------- |
| Protocol   | The smart contracts that record mail, chat, public keys and fees | [Protocol contracts](/occ-v1/contracts.md)  |
| Blockchain | The network that runs the contracts and keeps the records        | [Blockchain layer](/occ-v1/blockchain.md)   |
| Encryption | Keeps content readable only by sender and receiver               | [Encryption options](/occ-v1/encryption.md) |
| Storage    | Holds encrypted content that is too large for the chain          | [Storage](/occ-v1/storage.md)               |

```mermaid
flowchart TB
    App["Your app (for example BlockMail & BlockChat)"]
    SDK["4thTech SDK"]
    App --> SDK
    SDK --> Contracts["OCC v1 contracts"]
    SDK --> Enc["Encryption"]
    SDK --> Store["Storage"]
    Contracts --> Chain["Blockchain network"]
    Store --> Remote["Remote storage (decentralised or cloud)"]
    Enc --> Keys["Keys held by the user"]
    SDK --> Local["User local storage"]
```

*Figure: An app talks to the SDK, which uses the contracts on a blockchain, an encryption handler, remote storage and the user's local storage.*

## Original schematic

![Infrastructural layer schematic](https://raw.githubusercontent.com/4thtech/static-assets/main/image/infrastructural-layer-schematic-4thtech-v4.svg)

*Figure: The original 4thTech infrastructural layer schematic.*
