Skip to main content
Available on paid plans. Configuring retention needs a paid plan. On the Free plan every project keeps data for the platform default of 49 days. Enterprise plans and self-hosted deployments with a license also get the longer presets and a custom period. Retained data over the plan volume is billed per extra GB, see the pricing page.

What retention covers

A retention policy sets a number of days for one scope. Every stored row carries the period it was ingested under, and LangWatch deletes the row after that many days. Changing a period leaves the rows already stored on their old period, unless you apply the change to existing data. The policy covers three categories of data: LangWatch resolves each category on its own. A project takes its traces period from the closest policy that sets traces, and its scenarios period from the closest policy that sets scenarios, so the three can differ. The settings page writes all three categories together, so a policy you add there starts with the same period for all three. Data stored in Postgres is not covered: annotations, datasets, prompts, and the settings pages keep their rows. The LangWatch AI Gateway spend records are outside retention. They keep a fixed 13-month lifetime, so you can reconcile invoices after the traces behind them are gone.

Scopes

Write a policy at the organization, a team or a project. For each category a project uses the most specific policy: its own, then its team’s, then the organization’s, then the platform default of 49 days. The Data Retention panel at the top of the page shows the period that applies to the current project, and Data Storage shows how much space the projects you can see use today. The All you can see filter narrows the table to one scope.
Settings > Data Retention with the retention and storage panels, one organization policy and the Add retention policy button

Periods

Periods are whole weeks. The presets round up so that the label is always covered: The longest period is 65,534 days.

Add a policy

Open Settings > Data Retention. Reading the page needs project:view. Writing a policy needs organization:manage for the organization, team:manage for a team and project:update for a project. The scope picker only offers the scopes you can write.
1

Click Add retention policy

The drawer opens with the Scope picker and the Retention select.
2

Pick one or more scopes

The picker is multi-select. One Create writes the same period to every scope you pick.
3

Pick the retention period

Choose a preset, or Custom… on Enterprise and self-hosted, and enter an amount and a unit.
4

Decide about existing data

Apply this change to existing data is off by default. Off: the period applies to data ingested from now on. On: LangWatch also restamps the rows already stored for the current project, and rows older than the new period become eligible for deletion.
5

Click Create

The policy appears in the table. The row menu has Edit, which reopens the drawer with the scope locked and saves with Save changes, and Remove, after which the scope falls back to the next policy in the chain.
Deletion is permanent. Export data you need to keep before its period ends.

How deletion runs

ClickHouse deletes expired rows during its background merges through a TTL expression, so a row disappears some time after its period ends, not at the exact second. Shortening a period without Apply this change to existing data leaves stored rows on their old period. Lengthening a period never brings back deleted rows.

Self-hosted deployments

Retention works the same way on your own ClickHouse. Files that traces reference in object storage, for example images, are not deleted by retention. Each file is stored under its content hash and shared by every trace in the project that references the same bytes, so deleting a trace never deletes its files. LangWatch removes them when the project is deleted. To remove them earlier, delete them from your bucket yourself, and check that no other trace still references them. Without a license the deployment keeps the platform default of 49 days and cannot add a policy. An Enterprise license opens the same presets and custom period as the Enterprise plan. Also check: Data Privacy for what LangWatch stores in the first place, and self-hosting for the storage setup.
Last modified on September 6, 2026