Skip to main content
Retention controls how long Braintrust keeps your data before it’s deleted. Your plan sets a base retention window (14-day retention on Starter and 30-day retention on Pro) that applies across your organization. From there, you can:
Retention automations only shorten retention. Setting an automation period longer than your plan-level window doesn’t keep data longer. To retain data beyond your plan’s base window, extend your retention window as described below.

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.
  • Starter: 14-day retention window. Not extendable.
  • Pro: 30-day retention window. Extend up to 180-day retention in Settings > Billing, in 30-day increments.
  • Enterprise: Custom retention window, up to 365-day retention, configured with your account team.
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

only available on the Enterprise plan.
A retention automation permanently deletes one object type in a project 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 project’s compliance requirements. Create a separate automation for each object type (logs, experiments, or datasets) you want to limit.
  1. Go to Settings > Data management.
  2. Click + Create automation.
  3. Select Data retention type.
  4. Configure settings:
    • Object type: Logs, Experiments, or Datasets.
    • Retention period: Days to keep data before deletion.
  5. Click Save.
Retention policies 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 policies

ScenarioRetention periodRationale
Production logs90-day retentionKeep recent logs for debugging, delete older data you no longer need.
Development logs7-day retentionKeep short-term history for active development, clean up test data quickly.
Experiments180-day retentionRetain completed evaluations for half a year, then archive or delete.
Compliance30-day retentionAutomatically delete user data after the 30-day retention period to meet regulatory requirements.

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.

Self-hosted deployments

Soft deletion

For self-hosted deployments (data plane v1.1.21+), data is soft-deleted by marking it unused. A background process purges unused files within 24 hours, providing a grace period to restore accidentally deleted data.
Configure a service token for your data plane to enable retention. See Data plane manager for details.

Cloud provider policies

For self-hosted deployments, review your cloud provider’s bucket retention policies at the project and organization level before configuring retention in Braintrust. Org-wide policies are common and can conflict with Braintrust retention settings or delete data independently of Braintrust. All Braintrust deletes are recorded in a delete log. If data goes missing, contact Braintrust support and Braintrust will audit these logs to determine whether the deletion was caused by a Braintrust retention policy or another process. Braintrust recommends enabling audit logging on your storage bucket to help trace the root cause of unexpected deletes.

Next steps