> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Security & Data Handling

> What DecimalAI stores, how it's encrypted, retention policies, and deletion.

This page is the source of truth for what DecimalAI does with your data. For a quick scan, jump to **[Data we store](#data-we-store)** or **[How to delete data](#how-to-delete-data)**.

## Data we store

For each trace ingested via the SDK or API:

| Field          | What it contains                                                                                                                         |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `agent_name`   | A free-form string you choose in `decimalai.init()`.                                                                                     |
| `user_input`   | The text passed into your agent. Stored verbatim.                                                                                        |
| `final_output` | The agent's response. Stored verbatim.                                                                                                   |
| `spans`        | Per-step span tree (tool calls, retrieval, sub-spans).                                                                                   |
| `llm_calls`    | For each LLM invocation: rendered prompt (all messages), completion text, model name, provider, token counts, tool calls, finish reason. |
| `metadata`     | Cost estimate, latency, timestamps, manifest hash, and arbitrary tags you attach.                                                        |
| `eval_scores`  | Any quality or compatibility scores you push or that we compute.                                                                         |

For each manifest registered via the SDK:

| Field                 | What it contains                                                                                |
| --------------------- | ----------------------------------------------------------------------------------------------- |
| `components`          | Tool names, tool JSON schemas, model names + params, prompt text, skill names + content hashes. |
| `agent_models_json`   | The full model config block from your framework.                                                |
| `graph_topology_hash` | Hash of the multi-agent topology (no graph contents stored).                                    |

<Warning>
  **Prompt and output text is stored in plaintext.** If your prompts or agent outputs contain PII, credit card numbers, or other sensitive data, you must scrub it client-side **before** traces are sent. The SDK does not redact for you — run your own sanitizer between agent execution and `decimalai.send()`.
</Warning>

## What we do NOT store

* **Your LLM API keys.** Pre-deploy regression checks don't need them. The Playground stores BYOK keys encrypted at rest, scoped to the workspace, never logged.
* **Your source code.** The SDK never reads files outside the SKILL.md auto-discovery paths (`.claude/skills/`, `.agents/skills/`).
* **Inbound request bodies** to the platform API beyond what's documented as an endpoint payload.

## Encryption

* **At rest.** All data in Postgres is encrypted at rest by Cloud SQL (Google-managed AES-256); object storage is Google Cloud Storage, encrypted at rest by default (AES-256).
* **In transit.** All API traffic uses TLS 1.2+. HSTS is enabled on `api.decimal.ai` and `app.decimal.ai`.
* **Secrets.** API keys are stored as SHA-256 hashes; only the prefix (`dai_sk_...`, or `dai_pk_...` for a public key) is visible after creation. BYOK LLM keys are encrypted at rest with Fernet (AES-128-CBC with an HMAC-SHA256 authentication tag) using a server-managed key.

## Retention

| Plan       | Trace retention | Manifest retention | Skill / dataset retention |
| ---------- | --------------- | ------------------ | ------------------------- |
| Free       | 14 days         | Forever            | Forever                   |
| Core       | 30 days         | Forever            | Forever                   |
| Pro        | 90 days         | Forever            | Forever                   |
| Enterprise | 365 days        | Forever            | Forever                   |

Traces older than your retention period are deleted automatically (rolling, daily). Manifests, skills, and datasets are kept indefinitely so your version history stays intact.

## How to delete data

| What you want to delete             | How                                                                                                                          |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| All traces for an agent             | Settings → Agents → click agent → **Purge traces** (admin role)                                                              |
| All traces for your org             | `DELETE /api/v1/admin/purge/traces` (admin role) — purges all traces, spans, LLM calls, and eval scores for the organization |
| A workspace + everything in it      | Settings → Workspaces → **Delete workspace** (workspace admin)                                                               |
| All data for a specific user (GDPR) | Email [support@decimal.ai](mailto:support@decimal.ai) — endpoint on the [roadmap](/roadmap)                                  |

Deletions are hard deletes — the row is removed, not soft-flagged. Backups retain deleted data for up to 30 days for disaster recovery; after that the row is unrecoverable.

## Compliance

DecimalAI is **not currently SOC 2 certified.** The certification is in progress (target: late 2026).

| Item                                    | Status                          |
| --------------------------------------- | ------------------------------- |
| SOC 2 Type II                           | In progress (target: late 2026) |
| Security questionnaire (SIG Lite, CAIQ) | Available on request            |
| Architecture diagram + threat model     | Available on request            |
| Penetration test summary                | Available on request            |
| DPA / standard contractual clauses (EU) | Available on request            |

<Accordion title="Procurement & enterprise review package">
  For enterprise procurement reviews, we provide:

  * Detailed security questionnaire (SIG Lite, CAIQ)
  * Architecture diagram + threat model
  * Penetration test summary (available on request)
  * DPA / standard contractual clauses for EU data flows

  Email [security@decimal.ai](mailto:security@decimal.ai) for the docs package.
</Accordion>

## Hosting region

Production runs on Google Cloud Platform (Cloud Run + Cloud SQL for PostgreSQL) in region `us-central1` (project `decimalai-prod`). Enterprise customers can request a different GCP region; we'll spin up an isolated stack and migrate.

## Reporting a vulnerability

If you find a security issue, please **do not** open a public GitHub issue. Email [security@decimal.ai](mailto:security@decimal.ai) — PGP key available on request. We respond to security reports within 24 hours and follow [coordinated disclosure](https://en.wikipedia.org/wiki/Coordinated_disclosure) practice. We do not currently run a paid bug bounty.
