# How it works

> From a message in the chat to a change in your project, and where each part lives.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://app.docs.sypnia.com/start/how-it-works/

For agents: Flow: you write in a session (web, phone or desktop) → App server stores the message and hands it to Sypnia Agent with the session's project, your level and memory → the agent works through the products' MCP servers with your token (Cases proposal, Git branch, Run preview) → answers, questions and approval requests stream back (Server-Sent Events) → the side panel opens what the answer refers to (case, diff, preview) → approvals are recorded by the App server and passed to the product → spending is written to the credits ledger by the product that spent. The board reads each product's API with your session. App never holds product data of its own beyond sessions, messages, attachments, notifications and the ledger.

### 1. You write

In a session of the project «La Espiga», Ana writes «Customers can order bread for pick-up today». The message goes to the App server, which keeps it with the session.

### 2. The agent works

The App server passes the message to Sypnia Agent with the session's project, Ana's level and her memory. The agent reads the map in Sypnia Cases and proposes a new case. Everything it does goes through the products' MCP servers, signed in as Ana and with her permissions.

### 3. The answer streams back

The answer arrives as it is written. When it refers to something you can look at (the proposed case, a diff, the preview), the side panel opens it.

### 4. You decide

Questions show their options as buttons. An approval shows what will happen and how to undo it. Ana approves the case; App records her decision and passes it to Cases.

### 5. Credits are counted

Each product that spends (the agent's task, the domain Ana buys) writes an entry to the credits ledger, with the project, the case and the task. Ana sees it in **Account → Credits**.

## Where things live

| Thing                                    | Where                                                           |
| ---------------------------------------- | --------------------------------------------------------------- |
| Your sessions, messages and attachments  | the App server's Postgres; attachments in Sypnia Files          |
| Your identity and session                | Sypnia Data (the same sign-in for every product)                |
| Your level and memory                    | your Sypnia account, read by App, Agent, Cases and Learn        |
| The map, the code, the data, the deploys | each product: Cases, Git, Data, Run; App only shows them        |
| Production health                        | Sypnia Telemetry, read by the board                             |
| Credits and the ledger                   | your organization's credit account in Sypnia Cloud **\[Cloud]** |

## One interface, three places

The web at `app.sypnia.com`, the installable web app on your phone and the desktop app share one interface, built with Sypnia's component library. A session started on one continues on the others.
