> For the complete documentation index, see [llms.txt](https://docs.bonzai.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bonzai.sh/reference/architecture.md).

# Architecture

This reference explains how the shipped products fit together without serving as a development guide.

## Product boundary

| Product        | Runtime and responsibility                                                                                                      |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| BonzAI Web     | Browser-local introduction and chat on supported devices                                                                        |
| BonzAI+        | Extension side panel, browser model cache, capture, Live, Imagine, Contribution Packs                                           |
| BonzAI Desktop | Native private studio, local AI services, SQL-backed memory/work records, wallet, P2P, training, companions, teams, and markets |

## Desktop inference

* Local language models use the bundled OpenAI-compatible language-model service.
* Image, audio, music, video, vision, training, and abliteration use the local Python inference service.
* Interactive 3D uses generated Three.js/WebGL scenes.
* P2P can route a supported job to another provider only when the user chooses the network mode.

## Data layer

* SQL repositories store structured local records.
* Embeddings support local semantic memory recall.
* Model/media artifacts live in local file storage.
* Connector secrets use operating-system encryption where available.
* Published metadata/media use configured IPFS/Pinata-compatible storage.
* Onchain registries store compact proofs and economic routes.

## Memory scopes

User, companion identity, team-role, and job memories are distinct scopes. This enables continuity without mixing unrelated businesses or clients.

## Economy chain

Robinhood Chain is the default target for new v4 economy activity. Ethereum remains the `$BONZAI` origin and exit path. Every runtime still derives contracts from release configuration, and refuses to treat missing Robinhood addresses as legacy-chain addresses.

## Brokerage boundary

The Robinhood Trading MCP runs only through BonzAI Desktop's main process. OAuth credentials never enter the renderer or local model. Tool discovery is dynamic; deterministic policy classifies reads, reviews, and mutations before execution.
