# Data and retention

> What Sypnia AI keeps about each call, for how long, and what it never keeps.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://ai.docs.sypnia.com/safety/data-and-retention/

For agents: Kept: call record metadata (time, project, key id, route+version, model, attempts, tokens, credits, case, end-user id, latency, status, error code) for 90 days in Cloud (configurable when self-hosted, SYPNIA_GATEWAY_CALL_RETENTION_DAYS); usage totals as long as the organization exists (ledger). Not kept by default: messages, files, answers. Opt-in: route store {days 1–30} or Sypnia-Store header within it; encrypted with a per-project key in object storage, deleted at the end; readable in the console by owners/admins and via GET /v1/calls/{id}/body with an admin key; every read audited. Providers: zero-retention only (Cloud). Deleting a person: DELETE /v1/end-users/{id} removes their stored bodies and replaces the id in records with a hash.

## What is kept

| What                                                                                                                                                        | For how long                                        | Who can see it        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | --------------------- |
| **The call's record**: time, project, key, route and its version, model, attempts, tokens, credits, case, the id of the person of your app, timings, result | 90 days **\[Cloud]**, or what you set **\[Engine]** | the project's members |
| **Usage totals** per day, case, task, key and model                                                                                                         | as long as the organization exists                  | the project's members |

## What is not kept

**What was asked and what was answered**: messages, images, files and answers. They pass through the gateway to the provider and back, and are gone.

## When you want them kept

Sometimes you need to look at real questions, for example to improve the instructions of `allergen-answer`. A route can keep them for **1 to 30 days**:

`sypnia.toml`

```toml
[ai.tasks.allergen-answer]
store = { days = 14 }
```

- They are encrypted with a key of the project and deleted when the days are over.
- Only owners and admins can read them, in the console or with `GET /v1/calls/{id}/body`, and every read is recorded.
- A single call can opt out with `Sypnia-Store: false`.

## The providers

In Sypnia Cloud, providers are used only where they commit to keeping nothing and training on nothing ([Providers](https://ai.docs.sypnia.com/models/providers)).

## Deleting a person

When someone asks your app to forget them, `DELETE /v1/end-users/{id}` deletes anything kept from their calls and replaces their id in the records with an unreadable one. Usage totals stay, without them.
