Skip to main content
Retention controls how long your logs, experiments, and datasets stay available in Braintrust. Your plan sets a base retention window for logs and playground data (14-day retention on Starter and 30-day retention on Pro) that applies across your organization. From there, you can: Experiments are retained separately from this window, with up to 365-day retention on all plans.
Retention windows and automations don’t apply to audit logs.

Extend the retention window

Pro and Enterprise plans can extend the base retention window to keep logs and playground data, including each row’s activity history, queryable for longer, for an additional storage charge. Extending applies org-wide. To keep less data on specific projects, automate data deletion. Retention storage is billed on the highest amount retained during the billing month, so extending mid-month isn’t prorated. See Retention storage for how it’s measured. Increasing your retention window takes effect immediately. Decreasing it, or removing the extension, is scheduled for the end of the current billing period and can be canceled before then.

Automate data deletion

Custom retention policies are only available on the Enterprise plan.
A retention automation permanently deletes one object type once its data is older than a period you set. Use it to keep less data than your plan-level window, for example to meet a compliance requirement. Create a separate automation for each object type (logs, experiments, or datasets) you want to limit. You can scope an automation to a single project or to the whole organization.
Retention automations only shorten retention. When more than one automation applies, the shortest retention period wins, so an automation can’t keep data longer than your organization’s retention window. To keep data longer, extend the retention window instead.

Set retention for one project

  1. Go to Settings > Data management > Project.
  2. Click Project automation. If another automation already exists, click Automation.
  3. Set Type to Data retention.
  4. Configure settings:
    • Retention target: Logs, Experiments, or Datasets.
    • Retention period (days): Number of days to keep data before deletion.
  5. Click Create automation.

Set retention for all projects

An organization-level retention automation applies a retention period for one object type to every project in the organization, including projects created later. Use it to enforce consistent retention without configuring each project.
  1. Go to Settings > Data management.
  2. Click Organization automation. If another automation already exists, click Automation.
  3. Select a Retention target and enter the Retention period (days).
  4. Click Create.
A project-level automation can shorten retention further for a specific object type, but it can’t extend retention beyond the organization-level automation.
Retention automations permanently delete data. Deleted logs, experiments, and dataset rows cannot be recovered.

What gets deleted

  • Logs: Individual logs older than the retention period are deleted.
  • Experiments: The entire experiment (metadata and all rows) is deleted once its creation timestamp passes the retention period.
  • Datasets: Individual dataset rows older than the retention period are deleted. The dataset itself remains and can accept new rows.

Example automations

Delete data manually

To remove specific data before it ages out of your retention window, delete it directly. Manual deletion is available on all plans.
  • Traces and logs: Select traces in the log table and delete them. See Delete traces.
  • Dataset records: Select records in a dataset and delete them, or delete them programmatically. See Delete records.
  • Experiment rows: Select rows in an experiment table and delete them, or delete them through the API.

Next steps