Store text and retention
Text (prompts, answers, chunk text, tool inputs, results and errors) is stored apart from the rest of the data, so it can be deleted without touching metrics, hashes, ids or lineage.
The project settings
Section titled “The project settings”On the project page, section Text:
| Setting | Default | Meaning |
|---|---|---|
| Store text | On | On: content attributes are split off at ingestion and stored. Off: the request is accepted and its spans are stored, but content attributes of spans, events and links and the status message are dropped and never stored. |
| Keep text (days) | 30 | Retention, 1 to 3650 days. After it, the text is deleted; everything else stays. |
Only owners and admins can change them. Turning Store text off does not delete text already stored: it expires with the retention. Through the API: PATCH /api/projects/<projectId>/settings with { "storeText": false } or { "textRetentionDays": 7 }.
How it is stored
Section titled “How it is stored”- At ingestion, each top-level attribute of a span, its events or links that holds content (at any depth) is stored as text, apart from the span. A non-empty status message is stored as
status.message. Allowed C1 keys ofdocument.metadatastay with the span, so lineage still works. - Content in a resource or scope attribute is always rejected (
400): those are shared by many spans. - Caps: 64 KiB (UTF-8) per value, cut at a code point (
truncated); 512 KiB of text per span, past which a text is not kept (its key and size are); at most 256 text rows per span and 10,000 per request. The texts a turn shows are kept first: inputs, outputs and the status message, then item texts. - Retention: text older than the project’s retention is deleted. Ctxflow keeps the fact that it expired.
In the turn detail
Section titled “In the turn detail”Every text block says why text is missing, never a silent blank:
| State | Shown as |
|---|---|
stored |
The text |
truncated |
“First X of Y kept.” |
expired |
“Text expired: the project keeps text N days.” |
over_cap |
“Not stored: this step sent more text than the size cap.” |
not_shown |
“Not shown: this turn has more text than one page holds.” (a response holds at most 2 MiB of text) |
not_received |
“No text received.” / with Store text off: “Not stored: Store text is off for this project.” |
The API: GET /api/environments/<environmentId>/turns/<turnId>/text returns the prompt, the answer, the input, result and error of each tool call (first 100), and the text of each context item, each with its state.