# Architecture

```text
Studio-derived chat UI
    | DreamLake session API
Built-in backend (TypeScript / Node)
    | context + messages + tool schemas
Model provider (currently OpenRouter)
    | tool request
Authorized tool dispatcher
    | service account grants
DreamLake resources / future sandbox
```

The LLM receives messages, tool definitions and selected tool results. It does not automatically see the browser DOM, Vault or every project. Page changes should notify the backend; the backend assembles state and the agent queries content on demand. That state-message change has local verification but is held from release.

Babble integration must preserve the same authorization boundary. Model providers, execution engines and messaging transports are separate choices.
